Question

postfix can't forward email

  • Posted November 12, 2013

tail /var/log/mail.log

Nov 12 05:25:28 localhost postfix/smtp[20314]: connect to aspmx.l.google.com[2a00:1450:4001:c02::1a]:25: Network is unreachable

telnet aspmx.l.google.com 25 Trying 173.194.70.27… Connected to aspmx.l.google.com. Escape character is ‘^]’. 220 mx.google.com ESMTP a4si20693693eew.354 - gsmtp

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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.

RE: your SPF record <br> <br>Change the <code>-all</code> to <code>~all</code>. You may also want to run through the <a href=“http://spfwizard.com/”>SPF Wizard</code>.

OK, this one seems resolved - the issue was in IPv6, <br>Just set inet_protocols=ipv4 in /etc/postfx/main.cf, restart postfix. <br> <br>Now emails are forwarded: <br>postfix/smtp[3819]: EFC4D1C11D5: to=dfd@asdfasdf.com, orig_to=ttt@sdfsdf.com, relay=aspmx.l.google.com[173.194.69.27]:25, delay=6.3, delays=0.3/0/5.2/0.73, dsn=2.0. <br>0, status=sent (250 2.0.0 OK 1384239619 cl1si1153461bkc.228 - gsmtp) <br> <br>status sent, but not appear come to gmail, but this is another story :)

triavi.com. 1800 IN TXT “v=spf1 ip4:37.139.30.113 -all” <br>telnet aspmx.l.google.com 25 works (it uses ipv4) <br>telnet to my host works as well. <br>I’m not trying to use it’s smtp,-it’s an email forward (via /etc/postfix/virtual) <br>

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 <a href=“https://www.digitalocean.com/community/articles/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability”>SPF record</a>? <br> <br>Also, I don’t think Google allows unsecure connections (i.e. on Port 25). I think it requires TLS on the default port: 465. <i>See</i> <a href=“https://www.digitalocean.com/community/articles/how-to-use-google-s-smtp-server”>How To Use Google’s SMTP Server</a>.