I have many problems with sending an emails from my hosting provider.
Sometimes email just get to the spam folder and user never gets it. If it was an important email it is a big problem.
I have purchased a VPS with my own dedicated IP address just to create a SMTP server.
My server is on Debian 5.0 and I have chosen Postfix as my mail server.
Installation is as easy as “apt-get install postfix”.
Everything worked as expected (I have followed few online tutorials) and I got my server up and running with small exception – I WASN’T ABLE TO SEND EMAILS
I kept getting errors:
Sep 3 02:55:49 debian postfix/qmgr[22990]: 68BB22B125: from=<sender@mail.myserver.com>, size=621, nrcpt=1 (queue active)
Sep 3 02:56:19 debian postfix/smtp[23055]: connect to gmail.com[xxx.xxx.xxx.xxx]:25: Connection timed out
Sep 3 02:56:19 debian postfix/smtp[23055]: 68BB22B125: to=<user@gmail.com>, relay=none, delay=1010, delays=980/0.02/30/0, dsn=4.4.1, status=deferred (connect to gmail.com[xxx.xxx.xxx.xxx]:25: Connection timed out)
It took me few hours of research and dozen of different configuration tests etc but solution was as easy as setting:
disable_dns_lookups = no
in /etc/postfix/main.cf
hope it help someone and saves you a lot of time