Root Email Forwarding Not Working

celiac101

Well-Known Member
Dec 19, 2012
151
6
68
cPanel Access Level
Website Owner
A few months back my root forwarders stopped working. I may have been when I changed the hostname of the server. The server/host name was scott.domain1.com and I changed it to scott.domain2.com.

The emails that are not being delivered use [email protected] or [email protected].

The forwards are set up properly in WHM >> Home »Server Contacts »Edit System Mail Preferences.

I also tried using the /root/.forward method, but it didn't work.

I'd appreciate any help on how to get the root email to properly forward to the new hostname domain2.
 

celiac101

Well-Known Member
Dec 19, 2012
151
6
68
cPanel Access Level
Website Owner
Yes, email is there. I also use CSF ConfigServer Mail Queues and see over a dozen email that can't be delivered at any given time.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Neither of those email addresses is an actual email address though, if I understand your post properly. If the hostname is properly setup and using a valid registered domain name, all that stuff is good, and you added your email here properly:
The forwards are set up properly in WHM >> Home »Server Contacts »Edit System Mail Preferences.
Not a server email address as you posted above for the example, but a valid email address like, [email protected] then all email being forwarded, will come to you from those example emails (ex: [email protected]) as you've posted above.

Make sure the hostname is setup and working as expected, make sure to use a valid email address in each section of:
Home » Server Contacts » Edit System Mail Preferences
 

celiac101

Well-Known Member
Dec 19, 2012
151
6
68
cPanel Access Level
Website Owner
Thanks for the reply, I do appreciate it.

Yes to having valid and correct email addresses in the WHM >> Home »Server Contacts »Edit System Mail Preferences.

I don't recall exactly why I set the server up as scott.domain1.com instead of www.domain1.com, but I believe it was because I was using that domain on my old server, and this was a way that I could set it up without buying another domain.

In any case, the emails that are not being delivered are going to [email protected], or [email protected]. I know that I used to get all root emails forwarded to me properly, and I am not 100% sure when that stopped, but think that it may have been when I changed the server's host name to the scott.domain2.com.

Using CSF ConfigServer Mail Queues I can view the headers of the undelivered emails, and they contain:
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
[email protected]
No such person at this address"
and when I try to force delivery of the email I get this error:

LOG: MAIN
cwd=/usr/local/cpanel/whostmgr/docroot 4 args: exim -v -M 1Y6P1m-0007ub-RB
delivering 1Y6P1m-0007ub-RB
LOG: MAIN
Unfrozen by forced delivery
LOG: MAIN
** [email protected] R=virtual_aliases: No such person at this address"
LOG: MAIN
Frozen (delivery error message)
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
I don't recall exactly why I set the server up as scott.domain1.com instead of www.domain1.com
The latter would not be a valid hostname. There are instructions here:

Home » Networking Setup » Change Hostname


Instructions

It is important to choose a hostname that you will not be using for any account. You should choose something that will be socially acceptable, as it will appear in all mail headers. Your hostname must be a FQDN. In English, a hostname should consist of a name and a domain name. All valid hostnames should have 2 dots in them. Hostnames should never begin with “www”. Hostnames should also not begin with a digit, nor end with a hyphen (“-”).
The docs for this are here:
Change Hostname - cPanel Documentation

Yes to having valid and correct email addresses in the WHM >> Home »Server Contacts »Edit System Mail Preferences.
If you're sure the hostname is correct (you might try changing the hostname to the same thing one more time to be sure all steps completed properly), and that email address is correct, try changing the contact email to some other email address, off server.
 

celiac101

Well-Known Member
Dec 19, 2012
151
6
68
cPanel Access Level
Website Owner
I now recall that I changed the host name via command line, and didn't realize that there was a way to do it in cpanel (which I probably should have known).

I just changed the host name now via cpanel and now I get this result...but the email is still not delivered:

LOG: MAIN
cwd=/usr/local/cpanel/whostmgr/docroot 4 args: exim -v -M 1Y6QGH-0008RJ-RM
delivering 1Y6QGH-0008RJ-RM
LOG: MAIN
Unfrozen by forced delivery
LOG: MAIN
remote host address is the local host: scott.domain1.com
LOG: MAIN
== [email protected] R=dkim_lookuphost defer (-1): remote host address is the local host
LOG: MAIN
Frozen
I should also say that my dns servers are ns1.domain1.com (points to the server's main IP), and ns2.domain1.com (uses a spare IP).