postfix can't forward email

Posted November 12, 2013 6k views
tail /var/log/mail.log Nov 12 05:25:28 localhost postfix/smtp[20314]: connect to[2a00:1450:4001:c02::1a]:25: Network is unreachable telnet 25 Trying Connected to Escape character is '^]'. 220 ESMTP a4si20693693eew.354 - gsmtp

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers
Has it worked before? Have you tried restarting your droplet? If you installed a firewall, did you open the necessary ports? Have you created an SPF record?

Also, I don't think Google allows unsecure connections (i.e. on Port 25). I think it requires TLS on the default port: 465. See How To Use Google's SMTP Server.
by Pablo Carranza
A carefully tailored SPF record will reduce the likelihood of your domain name getting fraudulently spoofed and keep your messages from getting flagged as spam before they reach your recipients. 1800 IN TXT "v=spf1 ip4: -all"
telnet 25 works (it uses ipv4)
telnet to my host works as well.
I'm not trying to use it's smtp,-it's an email forward (via /etc/postfix/virtual)
OK, this one seems resolved - the issue was in IPv6,
Just set inet_protocols=ipv4 in /etc/postfx/, restart postfix.

Now emails are forwarded:
postfix/smtp[3819]: EFC4D1C11D5: to=, orig_to=,[]:25, delay=6.3, delays=0.3/0/5.2/0.73, dsn=2.0.
0, status=sent (250 2.0.0 OK 1384239619 cl1si1153461bkc.228 - gsmtp)

status sent, but not appear come to gmail, but this is another story :)
RE: your SPF record

Change the -all to ~all. You may also want to run through the SPF Wizard.

I tried the SPF Wizard, but I’m still having a problem getting everything to pass on mailtester. I get too many spf lookups as the error.