I must confess a I am completely new to Gentoo, but a customer of us is a control freak and feels better when he can watch all the output of the compilers working on a emerge command ;-)
The thing was supposed to be easy, Postfix was setup as a relay in this Gentoo EC2 instance, and Google was supposed to take care of mail delivery and such. It should just required SMTP to localhost, but...
The Rails application didn't responded, in the end it was blocked trying to send the mail, and finally timed out with a Timeout::Error (execution expired): /usr/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
Back to basics, I went to the command line to check if evrything was properly set up, and according to mutt, sending mail was no problem. Ok, mail relaying is fine.
Using a simple Ruby script, I got the same Timeout::Error (execution expired): /usr/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
Where could I get more information? In the Postfix logs of course! Those logs were supposed to be in something like /var/logs/mail/postfix.log or something like that. But I found noting around...
Fortunately I found that Postfix logs end in /var/messages by default in Gentoo (Getting postfix to log properly in Gentoo) where finally I found, the following errors:
Apr 30 15:37:11 localhost postfix/local[13107]: fatal: open database /etc/mail/aliases.db: No such file or directory
Apr 30 15:37:12 localhost postfix/master[7178]: warning: process /usr/lib/postfix/local pid 13107 exit status 1
Apr 30 15:37:12 localhost postfix/master[7178]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Google came to my rescue, and that the problem was associated to a missing configuration step in the Postfix setup and running the newaliases command allowed me to send mail from my simple Ruby script.
Mail was being delivered, but there was a still a 501 5.1.3 Bad recipient address syntax around, that basically was Postfix asking for the mail address to be enclosed
in < >
Back to Rails I got a 501 Syntax: HELO hostname, that was simple to get rid of as the :domain => "yourshere.com" was missing from the config/mail.yml
The thing was supposed to be easy, Postfix was setup as a relay in this Gentoo EC2 instance, and Google was supposed to take care of mail delivery and such. It should just required SMTP to localhost, but...
The Rails application didn't responded, in the end it was blocked trying to send the mail, and finally timed out with a Timeout::Error (execution expired): /usr/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
Back to basics, I went to the command line to check if evrything was properly set up, and according to mutt, sending mail was no problem. Ok, mail relaying is fine.
Using a simple Ruby script, I got the same Timeout::Error (execution expired): /usr/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
Where could I get more information? In the Postfix logs of course! Those logs were supposed to be in something like /var/logs/mail/postfix.log or something like that. But I found noting around...
Fortunately I found that Postfix logs end in /var/messages by default in Gentoo (Getting postfix to log properly in Gentoo) where finally I found, the following errors:
Apr 30 15:37:11 localhost postfix/local[13107]: fatal: open database /etc/mail/aliases.db: No such file or directory
Apr 30 15:37:12 localhost postfix/master[7178]: warning: process /usr/lib/postfix/local pid 13107 exit status 1
Apr 30 15:37:12 localhost postfix/master[7178]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Google came to my rescue, and that the problem was associated to a missing configuration step in the Postfix setup and running the newaliases command allowed me to send mail from my simple Ruby script.
Mail was being delivered, but there was a still a 501 5.1.3 Bad recipient address syntax around, that basically was Postfix asking for the mail address to be enclosed
in < >
Back to Rails I got a 501 Syntax: HELO hostname, that was simple to get rid of as the :domain => "yourshere.com" was missing from the config/mail.yml
Leave a comment