More mail servers are now accepted e-mail via IPv6. I have had a dynamically assigned IPv6 block on my Comcast Business account for awhile and I have let Sendmail decide what to use, and about 99.9% of mail is delivered via IPv4. Just recently it appears Comcast has assigned an IPv6 MX record for their mail server. My Sendmail picked this up and now happily attempts to deliver the mail via the IPv6 address. Unfortunately, it is immediately rejected due to the IPv6 address does not have a PTR record. Of course Comcast Business is far behind on assigning IPv6 blocks so there is no way to get a static IPv6 block and a PTR entry.
How do I get Sendmail to deliver to the IPv4 address instead? It’s called the mailertable feature.. You will need this feature enabled in your sendmail.mc file. Most likely it is already enabled.
Now you need to make an entry into the mailertable file with the domain and IPv4 address. In order to get the IPv4 MX address for the domain you can do so by using the host command. We first look up the main domain name to get the MX records. Then lookup the IPv4 address for the MX record. We now have the IPv4 address to where we want to deliver the mail.
[root@superstar ~]# host comcast.net comcast.net has address 184.108.40.206 comcast.net mail is handled by 5 mx2.comcast.net. comcast.net mail is handled by 5 mx1.comcast.net. [root@superstar ~]# host mx1.comcast.net mx1.comcast.net has address 220.127.116.11 mx1.comcast.net has IPv6 address 2001:558:fe16:1b::15
We now add these lines to our mailertable file.
.comcast.net esmtp:[18.104.22.168] comcast.net esmtp:[22.214.171.124]
Don’t forget to issue make to update the db files for Sendmail to see the changes to the mailertable file. And then restart Sendmail. It will now deliver to the specific IPv4 address.
[root@superstar mail]# make [root@superstar mail]# service sendmail restart Redirecting to /bin/systemctl restart sendmail.service