I have an email server configured with multiple-instance of sendmail running each on different IPv4 and IPv6 addresses. Everything is running smooth until a point where for some domains/emails (apparently random) sendmail try to send the email from the IPv6 address instead of the IPv4 and I begin to receive messages like:
SYSERR(root): makeconnection: cannot bind socket [IPv6:2001:db8::2]: Address family not supported by protocol to=<email@example.com>, delay=04:23:07, xdelay=00:00:00, mailer=esmtp, pri=11918385, relay=bad-domain.example. [198.51.100.5], dsn=4.0.0, stat=Deferred: Address family not supported by protocol
The IPv6 and IPv4 addresses was obfuscated.
What I observed, but I'm not sure that this is the issue, the MX record for the bad-domain is a CNAME instead of direct A or AAAA record.
I'm using Sendmail 8.14.5 on Fedora 16 all the IP's are statically configured (IPv4 + IPv6) If the base issue can't be solved there is a way to instruct sendmail to use only IPv4 for a list of specified domains ?
An extract from the sendmail.mc:
CLIENT_OPTIONS(`Family=inet,Addr=192.0.2.2')dnl CLIENT_OPTIONS(`Family=inet6,Addr=2001:db8::2')dnl DAEMON_OPTIONS(`Name=MTA-v4,Family=inet,Addr=192.0.2.2')dnl DAEMON_OPTIONS(`Name=MTA-v6,Family=inet6,Addr=2001:db8::2')dnl
some example for bad-domain: donpac.ru, montevideo.com.uy, dalia-ingenierie.fr, opela.cz, orange.net, poisl.com.br, tamil.com, zerong.cn
LE: all seems to have a CNAME as MX record and no one of the CNAME's resolv to IPv6