I have my new cloud server running on ipv6 only. I have set the AAAA mx record. Postfix installed with the following config:
$ sudo nano /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 3.6 on
# fresh installs.
compatibility_level = 3.6
# 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_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = ubuntu-4gb-fsn1-1
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv6
myorigin = /etc/mailname
virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual_forwards
I also set to forward all incoming emails to my googlemail account:
$ sudo nano /etc/postfix/virtual_forwards
[email protected] [email protected]
I tested it and sent emails to other gmail addresses and all went through ok, for example:
$ echo "test email" | sendmail -F "L XXX" -f "[email protected]" [email protected]
$ sudo tail /var/log/mail.log
Jul 18 15:48:22 ubuntu-4gb-fsn1-1 postfix/pickup[46761]: 6766367234: uid=0 from=<[email protected]>
Jul 18 15:48:22 ubuntu-4gb-fsn1-1 postfix/cleanup[48067]: 6766367234: message-id=<20230718154822.6766367234@ubuntu-4gb-fsn1-1>
Jul 18 15:48:22 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 6766367234: from=<[email protected]>, size=271, nrcpt=1 (queue active)
Jul 18 15:48:23 ubuntu-4gb-fsn1-1 postfix/smtp[48069]: 6766367234: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c08::1a]:25, delay=0.8, delays=0.02/0.02/0.12/0.65, dsn=2.0.0, status=sent (250 2.0.0 OK 1689695303 a5-20020adfeec5000000b003143d46910bsi1155011wrp.645 - gsmtp)
Jul 18 15:48:23 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 6766367234: removed
But I got the following errors when trying to send emails to yahoo addresses, for example:
$ echo "test email" | sendmail -F "L XXX" -f "[email protected]" [email protected]
$ sudo tail /var/log/mail.log
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/cleanup[48086]: 7FC9567234: message-id=<20230718155217.7FC9567234@ubuntu-4gb-fsn1-1>
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 7FC9567234: from=<[email protected]>, size=271, nrcpt=1 (queue active)
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/smtp[48088]: warning: no MX host for yahoo.co.uk has a valid address record
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/smtp[48088]: 7FC9567234: to=<[email protected]>, relay=none, delay=0.04, delays=0.02/0.02/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mx-eu.mail.am0.yahoodns.net type=AAAA: Host found but no data record of requested type)
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/cleanup[48086]: 8D9F567235: message-id=<20230718155217.8D9F567235@ubuntu-4gb-fsn1-1>
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/bounce[48089]: 7FC9567234: sender non-delivery notification: 8D9F567235
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 8D9F567235: from=<>, size=2440, nrcpt=1 (queue active)
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 7FC9567234: removed
Why? Any ideas how to fix this?
It was ok with yahoo addresses when my old server was on ipv4. But it seems yahoo has some issues with ipv6?