Using SMTP server from outside

coniston

Registered
Sep 13, 2013
2
0
1
cPanel Access Level
Root Administrator
Hello.
I've just subscribed to an unmanaged VPS. The WHM panel I was used to on the shared server was not as complete and advanced as the one on the VPS.

I have taken a VPS to have a dedicated IP. This avoids having a shared mailserver ip being blacklisted because other users are spamming on the same server.

I have not yet transferred our website but the first thing I'd like to do now is to use the SMTP mail server of an account I have freshly setup on the new VPS.

More precisely:
I have setup an account for the domain: exampledomain.com. The SMTP server is :mail.exampledomain.com

I am still downloading locally our company emails from our current incoming mail server on the shared server: mail.ourcompanydomain.com

Until we won't have migrated our official web site on the new VPS I would like at least to use the new SMTP server (mail.exampledomain.com) to send our emails. This will avoid the current situation were they rejected because of the current blacklisted shared mail server.

As a workaround I've done that many times before using some friends SMTP's without any problem. But now I am getting continuously the following error when i try to send messages using outlook: [the server responded: 451 Temporary local problem] .
Keep in mind that on outlook I setup the POP server as: mail.exampledomain.com (shared server) and the SMTP server as : mail.exampledomain.com (new VPS server)

An easy plain standard setup.

In WHM I have setup the email routing to: Automatically Detect Configuration

Any clue about what the issue might be?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Have you already migrated the account to the new server? It will need to be configured, along with the email account, before you can send email as that email account from the new server.

Thank you.
 

coniston

Registered
Sep 13, 2013
2
0
1
cPanel Access Level
Root Administrator
In fact I have fully configured an account with a spare domain I had, pointing to the nameservers of of the new server.
I have as well setup an email account and I have tested this email account on outlook, and the POP and SMPT servers work properly.

I need to connect to the SMTP server of this email account just to send emails , although the POP server is not hosted on the same server. My feeling is that there is probably a special config to be performed on WHM to allow it since I've done this action before with other existing external mail servers and it worked easily.

Practically:

On server 1 I have the email account: [email protected]_one.com
Incoming server: mail.domain_one.com
Outgoing server: mail.domain_one.com
user: user1
Pw: pwuser1


On server 2 I have the email account: [email protected]_two.com
Incoming server: mail.domain_two.com
Outgoing server: mail.domain_two.com
user: user2
Pw: pwuser2


In my mail client I connect with:
email account: [email protected]_one.com
Incoming server: mail.domain_one.com > user: user1 / Pw: pwuser1
Outgoing server: mail.domain_two.com > user: user2 / Pw: pwuser2
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
You will not be able to relay email through the second server for "domain_one.com" if "domain_one.com" is not configured on the second server as an email account. SMTP authentication is required and will not be possible if the email account does not exist on the second server.

Thank you.
 

coniston

Registered
Sep 13, 2013
2
0
1
cPanel Access Level
Root Administrator
Thanks very much Michael to help me out with this, I appreciate it.

What do you mean by: " if "domain_one.com" is not configured on the second server as an email account."?

domain_one.com is the domain name it can't be an email account.

If I would set any email account having the extension @domain_one.com on the second server I would need first to create a web account for domain_one.com. If after that I create any email account with the extension @domain_one.com at that point everything would obviously work fine. But in that case to make the mail server work I should have the nameservers pointing at server 2. At that stage I would have migrated our website on server 2 and the problem wouldn't exist anymore. I don't want that.

What I want is to keep provisionally the site on server one and use the SMTP of any existing email account, of any existing domain on server 2, to send emails; and this using any existing email account which is not on server 2.


This is some standard procedure I am applying everytime for example I connect abroad on mobile networks which do not allow me to use my own SMTP. They give me their SMTP with the user credentials to be used and my emails are sent trough their SMTP server (something in general like smtp.theirserver.com).

I don't know if I am confusing you but to me this is kind if standard thing, I thought it would be easy to apply. The scope is in case some dirty friends hosted on the same shared email server would start spamming with the consequence of getting the IP of the server blacklisted. All the email accounts of the domains on that server would then be in trouble. And we have as well many clients we host on shared servers. If I have a safe clean email server (server 2 for instance ;-) ) I can always give to all the domains I host on the blacklisted server a "clean "smtp address" to send "non rejected" emails until the blacklisting stops.

Hope I am not killing you here... ;-)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
If I would set any email account having the extension @domain_one.com on the second server I would need first to create a web account for domain_one.com. If after that I create any email account with the extension @domain_one.com at that point everything would obviously work fine. But in that case to make the mail server work I should have the nameservers pointing at server 2. At that stage I would have migrated our website on server 2 and the problem wouldn't exist anymore. I don't want that.
You will not have to modify the name servers for the domain name. Instead, you would create the account, and then the email accounts, on the second server. Instead of modifying the name servers, you would modify the MX records so they point to the second server. Then, all email for the domain name will be handled on the second server. You can't have the second server handle the email for a domain name that does not exist on that server. Otherwise, anyone could use that server to send email.

Thank you.