1

I have Postfix on an Ubuntu server.

postconf mail_version
mail_version = 3.6.4

Every email i send to any recipient ( tried gmail , hotmail and yahoo ) , is stuck in the queue

(connect to alt2.aspmx.l.google.com[2404:6800:4003:c00::1a]:25: Connection timed out)

Is it a conf issue?

My conf:

postconf -n 
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 3.6
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = $myhostname, comunitasolidali.it, cs1, localhost.localdomain, localhost
myhostname = cs1
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level = may
virtual_alias_maps = hash:/etc/postfix/virtual

postconf -M
smtp       inet  n       -       y       -       -       smtpd
pickup     unix  n       -       y       60      1       pickup
cleanup    unix  n       -       y       -       0       cleanup
qmgr       unix  n       -       n       300     1       qmgr
tlsmgr     unix  -       -       y       1000?   1       tlsmgr
rewrite    unix  -       -       y       -       -       trivial-rewrite
bounce     unix  -       -       y       -       0       bounce
defer      unix  -       -       y       -       0       bounce
trace      unix  -       -       y       -       0       bounce
verify     unix  -       -       y       -       1       verify
flush      unix  n       -       y       1000?   0       flush
proxymap   unix  -       -       n       -       -       proxymap
proxywrite unix  -       -       n       -       1       proxymap
smtp       unix  -       -       y       -       -       smtp
relay      unix  -       -       y       -       -       smtp -o syslog_name=postfix/$service_name
showq      unix  n       -       y       -       -       showq
error      unix  -       -       y       -       -       error
retry      unix  -       -       y       -       -       error
discard    unix  -       -       y       -       -       discard
local      unix  -       n       n       -       -       local
virtual    unix  -       n       n       -       -       virtual
lmtp       unix  -       -       y       -       -       lmtp
anvil      unix  -       -       y       -       1       anvil
scache     unix  -       -       y       -       1       scache
postlog    unix-dgram n  -       n       -       1       postlogd
maildrop   unix  -       n       n       -       -       pipe flags=DRXhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp       unix  -       n       n       -       -       pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail     unix  -       n       n       -       -       pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp      unix  -       n       n       -       -       pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n       n       -       2       pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman    unix  -       n       n       -       -       pipe flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}

/etc/resolve.conf:

#nameserver 127.0.0.53
nameserver 8.8.8.8
options edns0 trust-ad
search .

Also i have tried this and it seems to be stuck , no answer , and i have to CTRL+C

openssl s_client -connect alt2.aspmx.l.google.com:25 -starttls smtp -crlf

If i do the command above from my local computer , it works.

This is what i get with traceroute from server

traceroute -p 25 alt2.aspmx.l.google.com
traceroute to alt2.aspmx.l.google.com (74.125.200.26), 64 hops max
  1   *  *  * 
  2   162.55.118.157  2.360ms  0.169ms  0.118ms 
  3   *  *  * 
  4   213.239.235.21  2.152ms  0.836ms  0.771ms 
  5   *  *  * 
  6   213.239.227.202  1.618ms  0.301ms  0.209ms 
  7   213.239.224.114  5.190ms  5.004ms  4.951ms 
  8   213.239.239.118  5.102ms  5.251ms  5.133ms 
  9   *  *  * 
 10   *  *  * 
 11   *  *  * 
 12   *  *  * 
 13   *  *  * 
 14   *  *  * 
 15   *  *  * 
 16   *  *  * 
 17   *  *  * 
 18   *  *  * 
 19   *  *  * 
 20   *  *  * 
 21   *  *  * 
 22   *  *  * 
 23   *  *  * 
 24   *  *  * 
 25   *  *  * 
 26   *  *  * 
 27   *  *  * 
 28   *  *  * 
 29   *  *  * 
 30   *  *  * 
 31   *  *  * 
 32   *  *  * 
 33   *  *  * 
 34   *  *  * 
 35   *  *  * 
 36   *  *  * 
 37   *  *  * 
 38   *  *  * 
 39   *  *  * 
 40   *  *  * 
 41   *  *  * 
 42   *  *  * 
 43   *  *  * 
 44   *  *  * 
 45   *  *  * 
 46   *  *  * 
 47   *  * ^C

I still have not configured a PTR record , but i think if that was the problem , i should get a different error , right?

1
  • Your ISP probably blocks outgoing connections on port 25 to combat spam.
    – vidarlo
    Commented Jun 17 at 22:54

1 Answer 1

1

The short answer is we don't know. But there are a couple of obvious things to try.

Firstly, your log entry shows posftix failing to connect using IPv6, your traceroute command didn't get very far with IPv4, but it would be helpful if you checked if Postfix was also failing on IPv4. You can turn off IPv6 to test....

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

Next you might want to verify that you're getting a valid DNS lookup - compare the results of nslookup mail.google.com on the host and on your local machine.

After that, as vidario says, your ISP may be blocking your mail, you can test the connection with nc -zv mail.google.com 25.

Yes, you'd get a different error if the issue was due to the lack of a PTR record. Establishing connectivity is jut the start of your journey to getting mail delivered.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .