Mail server IP SPF from multiple IP domains

GamesNET2 used Ask the Experts™
Hi there,

I have a Plesk server with 3 IP addresses. one of our domains has one IP address but it seems our mail server sends email from a different IP address ( our 'main' IP address) Therefore the SPF record for the domain that wantsto send email, comes back with problems.
Do I have to change a setting somewhere to make sure that the domain sends from its own IP address rather than the main server IP. Or do I just have to change the SPF record?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


Do I need to put an ipv4 IP address in there?
I'm unfamiliar with Plesk,

Just to make sure I understand your question correctly - based on what you have stated, you have traffic coming in one interface but leaving another.  The egress traffic is going out the default gatway which does not have a valid SPF record.

Just basic feed back -  

Your server main ip is a public address right?
Your SPF record interface is on a public address right?
do you have a firewall (that may be the Plesk server) which nat's all the traffic?

Awarded 2009
Top Expert 2010
You can only send using one IP address.  This is a limitation of most firewalls/routers.

Your SPF record should match the MX and/or IP address.

Check out my article here on DNS configuration for email: it's written for Exchange specifically but the concept is the same regardless of the mail server you are using.

There is also a handy wizard here on the Microsoft site that will help you generate the correct SPF record:
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

I think I missed something, is he not just having a problem where mail is being sent from one ip (interface) but coming in another.  And the SPF record does not correspond to the right ip/hostname/interface?
So I have a plesk mail server on IPADDRESS1, it also has a further 2 ipaddresses going to this machine.

One of my sites uses one of these other address and has the following SPF Record

v=spf1 +a +mx -all

I think this is the problem,

If I make it this is that correct -->

v=spf1 +a +mx +ip4:IPADDOFMAILSERVER -all

I think that might fix it....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial