Linux – Centos postfix smtp problems

linuxpostfix

i compose a email in mailbox by clicking user in webmin, and try to send to someone@gmail.com, of couse someone@gmail.com don't have received my email, how to troubleshoot it?

my testing env:
-linux centos 6 192.168.0.13 (in my vmware server windows 7 192.168.0.10)
-postfix package installed through webmin & virtualmin
-router dmz 192.168.0.13
-everything work ok including (ssh/ftp/http)

any ideas?

error message in /var/log/maillog

Sep 16 22:58:50 localhost postfix/qmgr[7736]: D1048943: from=<rlinux@mydomain.zapto.org>, size=582, nrcpt=1 (queue active)
Sep 16 22:59:11 localhost postfix/smtp[8615]: connect to gmail-smtp-in.l.google.com[74.125.127.26]:25: Connection timed out
Sep 16 22:59:32 localhost postfix/smtp[8615]: connect to alt1.gmail-smtp-in.l.google.com[74.125.159.27]:25: Connection timed out
Sep 16 22:59:53 localhost postfix/smtp[8615]: connect to alt2.gmail-smtp-in.l.google.com[74.125.93.27]:25: Connection timed out
Sep 16 23:00:14 localhost postfix/smtp[8615]: connect to alt3.gmail-smtp-in.l.google.com[74.125.113.27]:25: Connection timed out
Sep 16 23:00:35 localhost postfix/smtp[8615]: connect to alt4.gmail-smtp-in.l.google.com[209.85.143.27]:25: Connection timed out
Sep 16 23:00:35 localhost postfix/smtp[8615]: D1048943: to=<hkon99man@gmail.com>, relay=none, delay=3472, delays=3367/0.03/105/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[209.85.143.27]:25: Connection timed out)

mailq:

AF9CA94A 585 Fri Sep 16 22:27:48 rlinux@mydomain.zapto.org
(connect to alt4.gmail-smtp-in.l.google.com[209.85.143.26]:25:
Connection timed out)
hkon99man@gmail.com

— 5 Kbytes in 7 Requests.


i have tested my port 25
telnet aspmx.l.google.com (can't connect)
telnet smtp.hutchcity.com (my isp smtp address)(can connect)

so i change the postfix config to: relayhost = smtp.hutchcity.com

but there is a error message in var/log/maillog
sorry, that domain isn't in my list of allowed rcpthosts


Sep 17 03:13:54 localhost postfix/pickup[14151]: CD5F4907: uid=0 from=<ray@localhost.localdomain>
Sep 17 03:13:54 localhost postfix/cleanup[16350]: CD5F4907: message-id=<1316200434.16392@localhost.localdomain>
Sep 17 03:13:54 localhost postfix/qmgr[14152]: CD5F4907: from=<ray@localhost.localdomain>, size=579, nrcpt=1 (queue active)
Sep 17 03:13:54 localhost postfix/smtp[16375]: CD5F4907: to=<hkon99man@gmail.com>, relay=smtp.hutchcity.com[202.45.84.105]:25, delay=0.07, delays=0.03/0/0.02/0.02, dsn=5.0.0, status=bounced (host smtp.hutchcity.com[202.45.84.105] said: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) (in reply to RCPT TO command))
Sep 17 03:13:54 localhost postfix/cleanup[16350]: DEE5390E: message-id=<20110916191354.DEE5390E@xxxxx.zapto.org>
Sep 17 03:13:54 localhost postfix/qmgr[14152]: DEE5390E: from=<>, size=2541, nrcpt=1 (queue active)
Sep 17 03:13:54 localhost postfix/bounce[16376]: CD5F4907: sender non-delivery notification: DEE5390E
Sep 17 03:13:54 localhost postfix/qmgr[14152]: CD5F4907: removed
Sep 17 03:13:54 localhost postfix/local[16352]: DEE5390E: to=<ray@localhost.localdomain>, relay=local, delay=0.07, delays=0.03/0/0/0.04, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Sep 17 03:13:54 localhost postfix/qmgr[14152]: DEE5390E: removed

Best Answer

Start by reading the mail logs at /var/log/mail.log. If should tell you if the mail ever left your server and if it left, was it accepted by GMail or not.

Also check out if mailq returns you something.

Can you successfully send mail to anywhere else than GMail?

EDIT after your own edit: Something is blocking outgoing traffic from your server to SMTP port (25). This can be due a iptables settings at your server, firewall settings somewhere else or then you have such a connection you need to use your ISPs mail host as relay host.

Many ISPs block connections from clients to :25, since that's the way spammers and botnets tend to send their spam.

My second edit: It's the smtp.hutchcity.com which does not allow you to send mail through it. Contact your ISP.

My third edit Now that I took a closer look, your server seems to send helo as localhost.localdomain. That can make your ISP mail server upset. Correct that, try again, then contact your ISP if fixing your hostname does not help.