Allow an external domain to use cpanel's smtp?

mvandemar

Well-Known Member
Jun 17, 2006
116
24
168
My domain that I use for my primary email is hosted at Hostgator. Unfortunately various mailservers around the world, such as Yahoo and AOL, add HG's mail cluster ip's to their blacklists on a regular basis. This means that on most days I have at least 1 or 2 clients that I have issues communicating with.

I also have a vps with whm/cpanel on it with it's own dedicated IP on a completely different host. Is there a way to tell cpanel to allow an external domain to send through smtp? Or, if I set up the domain on there on an email-only type account, and create a mail2.mydomain.com, and use that, will that screw anything else up? What would be the best way to configure something like this? Note that I only want to send, not receive, through the vps.

Thanks.

-Michael
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hello :),

If your mail server IP's are getting blocked in anti-spam databases then you will have to update your mail server security. Please check following cPanel documentation and try to update it on your server.

How to Prevent Email Abuse - cPanel Knowledge Base - cPanel Documentation

If you want to setup remote server for the mail then create same cPanel account on your remote server and update your domain mx record with your VM IP, so that you can use your VM as mail server for your domain.
 

mvandemar

Well-Known Member
Jun 17, 2006
116
24
168
Hello :),

If your mail server IP's are getting blocked in anti-spam databases then you will have to update your mail server security. Please check following cPanel documentation and try to update it on your server.

How to Prevent Email Abuse - cPanel Knowledge Base - cPanel Documentation
I do not have access to Hostgator's mail server settings at all, and what you posted above has nothing to do with their setup. They have ~20 gateway smtp servers, and all of the outgoing mail for the millions of sites that they host is routed through them.

If you want to setup remote server for the mail then create same cPanel account on your remote server and update your domain mx record with your VM IP, so that you can use your VM as mail server for your domain.
I don't want to use the vps for all of my mail, just for smtp. I want to keep the imap account on Hostgator. I stated in the original post that I only wanted to send, not receive.

No offense, and I do thank you for your reply, but as a suggestion if you want to reply with free advice on a forum like this as a way to market your server management company you should read the posts you are replying to a little more carefully before you reply. People will subconsciously pick on on more thoughtful answers and it will make your services look better.

I think I can do it by setting up the same domain on the vps, then deleting all of the dns records aside from the main A record and the MX records, which I will then point back to the HG server, and then setting up a smtp2. subdomain on the vps and using that to send. I was hoping there might be a more direct and less-hacky way of doing it though. I also need to make sure that the vps server messages still get sent to the correct server (ie. Hostgator) in the process.

-Michael
 

mvandemar

Well-Known Member
Jun 17, 2006
116
24
168
in your email client use an account on your VPS to send mail from (smpt login)
no need to set up a domain for it (unless you have none that you control on your VPS)
So I wouldn't need to whitelist the domain that I am sending from? I could create an [email protected] account, where domain.com is on the vps, and it would allow me to send [email protected] through it?

-Michael
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello :)

I am happy to see the solution offered to you was helpful. Thank you for updating us with the outcome.
 

mvandemar

Well-Known Member
Jun 17, 2006
116
24
168
It does work fine. The only thing I am not sure how to do now is set up dkim keys and have the server append them to the headers for that account, but I am working on it. I am not sure how necessary this is though.

-Michael