IPv6 enabled sendmail does not send to domains with IPv4 only MX which results in “config error: mail loops back to me”

thorsten23 thorsten23 at googlemail.com
Fri Dec 14 10:56:48 UTC 2018

I encountered a strange problem after enabling IPv6 on my sendmail. BTW,
reverse resolution is fine for my domain A and AAAA wise.

Sending mail to a domain with MX A and AAAA records switched now from
IPv4 to IPv6. e.g with gmail:

sm-mta[42339]: wBE9nxJl042337: to=<example at gmail.com>,
ctladdr=<user at myserver> (1001/1001), delay=00:00:01, xdelay=00:00:01,
mailer=esmtp, pri=30389, relay=gmail-smtp-in.l.google.com.
[IPv6:2a00:1450:400c:c06:0:0:0:1b], dsn=2.0.0, stat=Sent

but sending mail to a domain with only MX A records does not take that
IPv4 address for the relay but replaces it with my own servers IPv6
address which results in the "config error: mail loops back to me (MX
problem?)" error. e.g. with gmx.net:

sm-mta[42369]: wBE9oqO5042367: to=<example at gmx.net>,
ctladdr=<user at myserver> (1001/1001), delay=00:00:00, xdelay=00:00:00,
mailer=esmtp, pri=30390, relay=mx00.emig.gmx.net.
[IPv6:myservers_IPv6_Address!!!here should be the IPv4 address of the
mx00.emig.gmx.net!!!], dsn=5.3.5, stat=Local configuration error which
furthermore leads to the "loops back to me" error.

That's what I added to sendmail.mc: DAEMON_OPTIONS(`Name=MTA-v6,

How can a IPv4 and IPv6 enabled sendmail communicate with IPv4 only MX
of a foreign domain? Why doesn't it resolve the MX's IPv4 address but
instead uses it's own IPv6 address? DNS resolv works fine.

More information about the freebsd-questions mailing list