Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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=<xxx@bad-domain.example>, delay=04:23:07, xdelay=00:00:00, mailer=esmtp, pri=11918385, relay=bad-domain.example. [], 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


some example for bad-domain:,,,,,,,

LE: all seems to have a CNAME as MX record and no one of the CNAME's resolv to IPv6

share|improve this question
I edited the Question to include a part from the config file. – szjozsef Feb 24 '13 at 20:30
Yes. Is working perfectly for a few hours sending hundred of emails, but after a while maybe because of some strange destionation address, begins to try to send from IPv6 to IPv4 destinations.... – szjozsef Feb 24 '13 at 20:51
It seems the issue is with non-RFC compliant domains which has MX servers which resolves to CNAME records instead of A records. An example domain:, their MX records is: which resolves to : CNAME which resolves to an IP address. More example domains:, – szjozsef Feb 24 '13 at 21:00
This is my question also, respectively is there any method to force the delivery in IPv4 for this kind of domains ? – szjozsef Feb 24 '13 at 21:20
None of those MX records/CNAME's end up with IPv6 addresses; they're all IPv4. So my best guess is.. obscure Sendmail bug? – Michael Hampton Feb 24 '13 at 21:21

Whilst the comments above seem to suggest that this isn't a v4-by-domain issue, I had cause to need to do exactly what you describe, today, and found this question whilst searching.

The method I found to force v4 delivery on a domain-by-domain basis is to enable mailertable, by having


in my (if it's already there, you don't need to add it again). Then I force v4-based delivery by overriding the DNS And instructing delivery to go to a v4 address in the mailertable file; this is from /etc/mail/mailertable:    esmtp:[]     esmtp:[]

I don't normally redact domain names, but I don't wish to embarrass the colleagues who have wrongly implemented smtp-over-ipv6, and thus need me to force delivery over v4. The IP address is obviously false, also; but in production it's the v4 address of their primary MX, taken from the DNS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.