How to use private IP for outgoing email (including PHP...)

1 post / 0 new
#1 Sun, 04/05/2015 - 17:05
leon05

How to use private IP for outgoing email (including PHP...)

Hi guys

I've about 100 domains and 6 private IP on my server. Some clients need to send (small) newsletter from this server. In order to avoid to fail into SPAM folder I've configured their SPF record with their own private IP, simplify like that :

IN "v=spf1 a mx ~all"

My problem is that all outgoing email (from PHP) are sent by system's default IP address, which isn't mentioned in SPF....

So email's header :

Received: from XXXXXXXXX (XXXXXXXXX. [37.187.YY.YY])...
Received-SPF: neutral (google.com: 37.187.YY.YY is neither permitted nor denied by domain of contact@example.com) client-ip=37.187.XX.XX;

For real user's email hosted on this server we found this really good tutorial : https://www.virtualmin.com/documentation/email/dependent

But how to force the private IP for all outgoing email from this domain ?

Thanks for your help !