How to stop Sendmail sending mail from IPv6 instead of IPv4

tfe asked:

Today I noticed that Gmail sends all messages received from my server to the Spam folder.
I checked message header and found the following:

Authentication-Results: mx.google.com;
       spf=neutral (google.com: 2001:4ba0:cafe:........ is neither permitted nor denied by best guess record for domain of root@myserver.com) smtp.mail=root@myserver.com

So, it looks that Sendmail is sending mail from IP6 adress insrtead of IPv4 and there is no SPF and PTR records for IPv6. How do I force Sendmail to send mail from IPv4?

Thanks.

My answer:


Don’t disable IPv6. It is not optional anymore and you will not be able to communicate with some people without it.

Instead, fix your SPF record so that it passes mail originating from your IPv6 address.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.