plesk4lyf

Active Member
PartnerNOC
May 21, 2018
37
7
8
Sydney
cPanel Access Level
Root Administrator
Hi there,

I just had an interesting issue where the root user of a cPanel server couldn't relay out because the callback verification method used by the relay was failing:

[[email protected] ~]# LOG: MAIN
cwd=/var/spool/exim 4 args: /usr/sbin/exim -v -Mc 1gwLXw-0002RU-Du
delivering 1gwLXw-0002RU-Du
Transport port=25 replaced by host-specific port=587
Connecting to mx1.relay.com [1.2.3.4]:587 ... connected
SMTP<< 220 mx1.relay.com ESMTP Exim 20190214.1248 Wed, 20 Feb 2019 17:39:56 +1100
SMTP>> EHLO server.com
SMTP<< 250-mx1.relay.com Hello server.com [5.6.7.8]
250-SIZE
250-8BITMIME
250-DSN
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
SMTP>> STARTTLS
SMTP<< 220 TLS go ahead
SMTP>> EHLO server.com
SMTP<< 250-mx1.relay.com Hello server.com [5.6.7.8]
250-SIZE
250-8BITMIME
250-DSN
250-AUTH PLAIN LOGIN
250 HELP
SMTP>> MAIL FROM:<[email protected]> SIZE=1527
SMTP<< 550-Verification failed for <[email protected]>
550-Called: 1.2.3.4
550-Sent: RCPT TO:<[email protected]>
550-Response: 550 root cannot accept local mail deliveries
550 Invalid sender <[email protected]>
SMTP>> QUIT


I checked that mail to the hostname was allowed in "Home »Service Configuration »Exim Configuration Manager".

I compared between a working server and this one and the difference was the working one had entries in /etc/localaliases.

I noticed that in "Home »Server Configuration »Basic WebHost Manager® Setup" the notification email address was empty, so I added one but it didn't update the /etc/localaliases file.

My questions are:
- How is the /etc/localaliases file updated by the WHM interface?
- Does cPanel do anything with the /root/.forward file?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,285
313
Houston
Hi @plesk4lyf

This is the intended behavior for mail sent to the root user, you need to set up the forward to an email account that can receive mail

Both of these are edited when you set up where to forward root, cpanel and nobody's mail to. You can do this by going to WHM>>Server Contacts>>Edit System Mail Preferences

Modifying where to forward roots mail updates both /etc/localaliases and /root/.forward

For example on my test server:

Code:
[[email protected] ~]# cat /root/.forward
[email protected]
[[email protected] ~]# cat /etc/localaliases
cpanel: [email protected]
nobody: [email protected]
root: [email protected]

Thanks!
 

plesk4lyf

Active Member
PartnerNOC
May 21, 2018
37
7
8
Sydney
cPanel Access Level
Root Administrator
Hi @cPanelLauren

Thanks for your post!

I can see where the confusion was coming from. I always thought that "system" emails were in the "Basic WebHost Manager® Setup" area.

I now see from the documentation that there are different areas of the system that are configured in the "Edit System Mail Preferences" for different kinds of notifications.

Can I make the suggestion of merging Mail Preferences into Basic Setup?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,285
313
Houston
Hi @plesk4lyf


I'm glad it's sorted now, I agree that could definitely pose as being a bit confusing, please feel free to open a feature request for that and once it's open please add the link here so that others may vote on it as well.

Thanks!