Postfix & SMTP Issues

February 21, 2014 10.4k views
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 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 = mydomain = alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $mydomain, $myhostname, localhost.domain relayhost = mynetworks = [::ffff:]/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 TXT "v=spf1 ~all" The PRT is this: PTR 24 hrs So, when I try to send e-mail: root@elusive:~# echo "Teste" | mail -s Teste Feb 21 08:17:23 elusive postfix/pickup[15561]: C5F7862D14: uid=0 from= Feb 21 08:17:23 elusive postfix/cleanup[15682]: C5F7862D14: message-id=<> Feb 21 08:17:23 elusive postfix/qmgr[15562]: C5F7862D14: from=, size=438, nrcpt=1 (queue active) Feb 21 08:17:24 elusive postfix/smtp[15684]: connect to[2607:f8b0:400d:c01::1a]:25: Network is unreachable Feb 21 08:17:54 elusive postfix/smtp[15684]: connect to[]:25: Connection timed out Feb 21 08:17:54 elusive postfix/smtp[15684]: connect to[2a00:1450:4013:c01::1a]:25: Network is unreachable Feb 21 08:18:24 elusive postfix/smtp[15684]: connect to[]:25: Connection timed out Feb 21 08:18:24 elusive postfix/smtp[15684]: connect to[2a00:1450:400c:c03::1a]:25: Network is unreachable Feb 21 08:18:24 elusive postfix/smtp[15684]: C5F7862D14: to=, relay=none, delay=60, delays=0.01/0.01/60/0, dsn=4.4.1, status=deferred (connect to[2a00:1450:400c:c03::1a]:25: Network is unreachable)
3 Answers

This means your MTA is trying to connect to the Google SMTP via IPv6. This doesn't work as your network probably doesn't support IPv6.

To get rid of the error message, you can configure Postfix not to use IPv6 by editing your /etc/postfix/ with this directive:

inet_protocols = ipv4

Afterwards you'll have to restart postfix:

/etc/init.d/postfix restart
Can you open up a support ticket so we can look into it? Thanks!

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

i have check my 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 i will observe.

Have another answer? Share your knowledge.