Report this

What is the reason for this report?

Postfix & SMTP Issues

Posted on February 21, 2014

I need to setup an send-only e-mail server. Also, I have Google Apps for my domain. So, the main issue is:

  • Over php mail() function, I want to send from my server (not from Google due sending limits).
  • Also, I want to send and receive e-mails in my Google Apps gmail app.

So, after installing postfix, my postfix main.cf is this:

TLS parameters

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

information on enabling SSL in the smtp client.

myhostname = mail1.elusive.com.br mydomain = elusive.com.br alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $mydomain, $myhostname, localhost.domain relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = +

I removed Gmail’s MX records form my DNS records for testing if was it causing the issue. I think isn’t. Anyway, my DNS records are:

MX 10 mail1.elusive.com.br. TXT “v=spf1 include:_spf.google.com include:elusive.com.br ~all”

The PRT is this:

PTR 162.243.76.132 elusive.com.br 24 hrs

So, when I try to send e-mail:

root@elusive:~# echo “Teste” | mail -s Teste lucas@lucasveiga.com

Feb 21 08:17:23 elusive postfix/pickup[15561]: C5F7862D14: uid=0 from=<root> Feb 21 08:17:23 elusive postfix/cleanup[15682]: C5F7862D14: message-id=20140221131723.C5F7862D14@mail1.elusive.com.br Feb 21 08:17:23 elusive postfix/qmgr[15562]: C5F7862D14: from=root@elusive.com.br, size=438, nrcpt=1 (queue active) Feb 21 08:17:24 elusive postfix/smtp[15684]: connect to ASPMX.L.GOOGLE.com[2607:f8b0:400d:c01::1a]:25: Network is unreachable Feb 21 08:17:54 elusive postfix/smtp[15684]: connect to ASPMX.L.GOOGLE.com[173.194.76.27]:25: Connection timed out Feb 21 08:17:54 elusive postfix/smtp[15684]: connect to ALT2.ASPMX.L.GOOGLE.com[2a00:1450:4013:c01::1a]:25: Network is unreachable Feb 21 08:18:24 elusive postfix/smtp[15684]: connect to ALT1.ASPMX.L.GOOGLE.com[173.194.66.27]:25: Connection timed out Feb 21 08:18:24 elusive postfix/smtp[15684]: connect to ALT1.ASPMX.L.GOOGLE.com[2a00:1450:400c:c03::1a]:25: Network is unreachable Feb 21 08:18:24 elusive postfix/smtp[15684]: C5F7862D14: to=lucas@lucasveiga.com, relay=none, delay=60, delays=0.01/0.01/60/0, dsn=4.4.1, status=deferred (connect to ALT1.ASPMX.L.GOOGLE.com[2a00:1450:400c:c03::1a]:25: Network is unreachable)



This textbox defaults to using Markdown to format your 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.

By default, port 25 is disabled on all Cloud Servers for the first 40 days of a server contract due to spam issue. We have to open manually on our end. I just opened the port. It usually updates within the hour. I would recommend testing again in about 30-40 minutes

I’m getting the same issue, the cloud server doesn’t send emails to outside the domain. So I believe that it could be due this 40 days to avoid spam. But for me it’s extremely necessary to my application works… I opened a ticked… now, i’m waiting for an answer.

Yes indeed. i am having problem with emails which have been already send in the past…are being send again…

i have check my main.cf config file…and added the inet_protocols = ipv4. after that i have not seen the error on not being able to reach the ipv6 address. maybe this is the reason why postfix is retrying to send some of the emails…now i will observe.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.