After domain migration cannot send email from Server 2 to Server 1

MindServer

Well-Known Member
Mar 18, 2020
200
30
28
Spain
cPanel Access Level
Root Administrator
Hi,

I have a domain "mydomain.com" which is used for server's create hostnames: hostname1.mydomain.com, hostname2.mydomain.com

I pointed this domain to a new server, the hostname and emails work correctly but the second server (hostname2.mydomain.com) cannot send emails to the firtst server (hostname1.mydomain.com, where point the domain "mydomain.com"). Always return this message:

SMTP<< 550 "REJECTED - Bad HELO - Host impersonating [hostname2.mydomain.com]

Other servers and computers can send emails to "hostname1.mydomain.com" without problems.

Why happens this?.

Thank you very much. Have a nice day.
 

kodeslogic

Well-Known Member
Apr 26, 2020
241
79
103
IN
cPanel Access Level
Root Administrator
Delete all traces of mydomain.com on the old server from /etc/mailhelo, /etc/localdomains, /etc/remotedomains, and other if any.
 

MindServer

Well-Known Member
Mar 18, 2020
200
30
28
Spain
cPanel Access Level
Root Administrator
Hi,

I cleared data in the mentioned files in the old server but not solved the problem: /etc/mailhelo, /etc/localdomains, /etc/remotedomains

Any other file?, because "/etc/" directory have many folders and files.

Thank you very much. Have a nice day.
 

MindServer

Well-Known Member
Mar 18, 2020
200
30
28
Spain
cPanel Access Level
Root Administrator
Maybe this is a problem?:

1- I created subdomain hostname2.mydomain.com
2- Changed all record's IPs (A, MX, TXT, etc.) for the Server 2's IP.

Maybe should remove this subdomain and only create "A" record?. The hostname not need other records? (MX, TXT, etc.).

Thank you again.
 

kodeslogic

Well-Known Member
Apr 26, 2020
241
79
103
IN
cPanel Access Level
Root Administrator
Yes, the subdomain for the hostname ( hostname2.mydomain.com ) not required

Maybe should remove this subdomain and only create "A" record?. The hostname not need other records? (MX, TXT, etc.).
Correct, Just add an A record for hostname2.mydomain.com to the main "mydomain.com" zone.
 

MindServer

Well-Known Member
Mar 18, 2020
200
30
28
Spain
cPanel Access Level
Root Administrator
Yes, the subdomain for the hostname ( hostname2.mydomain.com ) not required


Correct, Just add an A record for hostname2.mydomain.com to the main "mydomain.com" zone.
Thank you.

The problem is solved, I removed the subdomain and only created "A" record, now send emails.

But I have a new warning, hostname2.mydomain.com send email to hostname1.mydomain.com correctly but in file "/var/log/exim_mainlog" appear this warning:

[hostname1.mydomain.com IP] SSL verify error: certificate name mismatch: DN="/CN=hostname1.mydomain.com" H="mydomain.com"
Any idea about why happens this?. Thank you very much. Have a nice day.
 

kodeslogic

Well-Known Member
Apr 26, 2020
241
79
103
IN
cPanel Access Level
Root Administrator
  • Like
Reactions: cPRex and cPDavidL