Configure Email Send from SMTP Host IP Rather than Server

Kurieuo

Well-Known Member
Dec 13, 2002
106
0
166
Australia
Hi,

Hoping someone can help me configure this.

I have assigned a dedicated IP and setup a DNS for mail.domain.com to the dedicated IP address.

Now mail.domain.com is used to send email (SMTP). However, when I look at the headers of the received email, it is the domain and IP address of my primary reseller domain.

I want the IP address and domain to be sent from mail.domain.com in the headers. I've enabled "Send mail from account’s dedicated IP address" under Exim configuration, but it isn't doing it.

What do I need to change, so when email is sent via SMTP via mail.domain.com the dedicated IP address for this domain is used rather than something else.

Many thanks!
 

Kurieuo

Well-Known Member
Dec 13, 2002
106
0
166
Australia
To provide more info:

I've assigned a dedicated IP address to userdomain.com which is hosted under a reseller account and mail.userdomain.com.

However, when I send email from Outlook via SMTP mail.userdomain.com the headers are:

Received: from server.host.com (differentresellerdomain. [xxx.xxx.xx.xx])
by mx.google.com with ESMTPS id sadsadadgasdaserqz.254.2012.07.18.02.40.58
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 18 Jul 2012 02:41:00 -0700 (PDT)

I have no idea why it is using a differentresellerdomain and its assigned IP address.

However, I want the "Received" header to be something like:

Received: from server.host.com (userdomain.com. [xxx.xxx.xx.xx])​

Why am I trying to do this? Because the main server host IP got blacklisted. It should be de-listed shortly, but I'm trying to get around it for a hosted client by assigning them their own IP address to send through for their SMTP host.
 

Infopro

Well-Known Member
May 20, 2003
17,090
519
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Why mail.userdomain.com? Are you saying you created a sub domain here? I'm unclear on that.

Your email settings in your mail client will use mail.userdomain.com, but you don't have to do anything special there.

1) Give an account a dedicated IP.

2) At:
WHM > Service Configuration > Exim Configuration Manager, Domains and IPs tab:
Send mail from account’s dedicated IP address
Automatically send outgoing mail from the account’s IP address instead of the main IP address. Warning: If you turn this setting on, make sure that reverse DNS entries match the ones in /etc/mail_reverse_dns.
Set to On.

Should get you:

Received: from mydomainwithnewdedicatedip.com (123.45.678.130-static.reverse.softlayer.com. [123.45.678.130])
by mx.google.com with ESMTPS id o20si8494801qct.82.2012.07.18.05.06.30
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 18 Jul 2012 05:06:30 -0700 (PDT)

In this case that domain is on a softlayer server. Or is it that part you want to change?
 

Kurieuo

Well-Known Member
Dec 13, 2002
106
0
166
Australia
Thanks Infopro,

Ok, it's a bit more complicated.

Regarding mail.userdomain.com -- this is just a "mail" A record that points to the new dedicated IP address.

userdomain.com A actually points to an external IP address.

resellerdomain.com has been assigned the new dedicated with reverse DNS -- the main reseller domain which userdomain.com is under.

I've switched the setting to on, and the headers list the server host, main domain listed under my own reseller account and my reseller account's dedicated IP address for some strange reason. (I'm really confused why here)

When switched to off, the headers list the server host, and then the server host and IP address.

The result I'd love to get is like the softlayer scenario you provide. So that the mail sent via mail.userdomain.com is seen as coming from an IP address different to the server host.
 

Kurieuo

Well-Known Member
Dec 13, 2002
106
0
166
Australia
Yep, mail.userdomain.com is sharing resellerdomain.com dedicated ip. That is, it has its A record pointing to it.
 
Last edited:

Kurieuo

Well-Known Member
Dec 13, 2002
106
0
166
Australia
I've also tried the instructions at Changing the Sending IP for Outbound Email in Exim Exim from WHM, disabling "Send mail from account’s dedicated IP address" and enabling mailhelo and mailips within WHM, and editing them manually to add the userdomain.com as well as mail.userdomain.com.

But the IP address of myresellerdomain is always put there when I use mail.userdomain.com for the SMTP server in Outlook -- userdomain.com is not under myresellerdomain though (it's under a different reseller account). So not sure why it keeps populating this in, instead of the settings in mailhelo and mailips. :confused:
 

electric

Well-Known Member
Nov 5, 2001
789
10
318
Did you ever get this resolved?
 

Kurieuo

Well-Known Member
Dec 13, 2002
106
0
166
Australia
Did you ever get this resolved?
My issue was specific to Google Mail which hosts my email while the DNS is hosted on my dedicated server running cPanel/WHM. In this case, the headers are always wrong, however it is only to my email account.

Try sending a test email to a different email account/domain, and check whether the headers are correct. Chances are they will be. If not, then your issue is different to mine.