Le 09/12/2012 06:33, Cameron Smith a écrit : > Having trouble getting postfix configured correctly to relay to Google Apps > some of the time. > > I am seeing the following error in /var/log/mail.log > > Dec 8 21:15:08 vps postfix/master[3924]: daemon started -- version 2.9.3, > configuration /etc/postfix > Dec 8 21:16:05 vps postfix/smtpd[3930]: warning: hostname vps.abw.co does > not resolve to address 199.101.51.160
postfix found that 199.101.51.160 resolves to vps.abw.co but not the opposite. many possibilities: - transient dns error. - dns misconfiguration (postfix points to a dns server that doesn't give the right answer). - postfix is chrooted and /etc/resolv.conf is not copied to the chroot cage. to see whether postfix is chrooted, run egrep -i "^[0-9a-z].*smtpd" /etc/postfix/master.cf | awk '{print $5}' this command should show only 'n'. if you see 'y' or '-', then at least one smtpd is chrooted. > Dec 8 21:16:05 vps postfix/smtpd[3930]: connect from unknown[199.101.51.160] > Dec 8 21:16:05 vps postfix/smtpd[3930]: lost connection after RSET from > unknown[199.101.51.160] For some reason, the client (or an intermediary router/firewall) dropped the connection. => postfix did not reject the client. > Dec 8 21:16:05 vps postfix/smtpd[3930]: disconnect from > unknown[199.101.51.160] > > If I use a sendmail command from the CLI I am able to send with a 250 > response code. it is unclear whether your phpmail runs on the same machine as your postfix server or whether they run on different boxen. and whether you run sendmail on the postfix server or another box. etc. > > I only see the other error when using php and phpmailer. > Since that makes it probably a phpmailer issue what things could be set > incorrectly there that would cause postfix to log the errors listed above whatever is connecting to your postfix server drops the connection. > > I have tried removing vps.abw.co from my destination with the same result. > > 199.101.51.160 is my server IP > vps.abw.co is my server hostname > > RDNS is set correctly: > host 199.101.51.160 > 160.51.101.199.in-addr.arpa domain name pointer vps.abw.co for the future (and for the archive), this alone is not enough to s"R is set correctly". You must test the "forward" query as well. yes, it woks from here (now). $ host vps.abw.co vps.abw.co has address 199.101.51.160 > [snip] > > > > >