Proper way to edit /etc/aliases
Today I went to edit /etc/aliases as one processes is using root@localhost as a recipient and noticed that the familiar mewaliases command is missing. I'm running the cloundlinux version that was an in-place upgrade of centos7.
What's the proper way hash this into the aliases.db file?
-
Hey there! I would not expect you to need to run "newaliases" on a cPanel machine in order for that file to be read. Are you not seeing this working how you expect on your side? 0 -
Hey there! I would not expect you to need to run "newaliases" on a cPanel machine in order for that file to be read. Are you not seeing this working how you expect on your side?
I just changed it today. I will see if the process that's kicking off the warning gets redirected. I know in the past on other linux boxes I had to run that. Digging deeper it looks like exim uses aliases whereas postfix (that I normally use) would use the aliases.db.0 -
That sounds good - let me know what you find! 0 -
Hi! While changing this in /etc/aliases is not wrong and will definetely work, on a cPanel server I'd recommend changing who'll get the root mails in WHM (which will add the e-mail addresses as a .forward in /root/) 0 -
@cPAdminsMichael - I interpreted his issue as being a process notification that isn't managed through WHM, but the way you outlined is definitely the best process if you wanted to change the root notifications in general. 0 -
Sorry for the delay getting back to this. In times past I would normally just do root: email@address.tld in the /etc/aliases file and run newalias. Since newalias doesn't exist I just added the email directly in the alias file and it did not work. The emails generated from WHM work fine and go where they need to. This email was generating from litespeed with a message about update. It's the only message that isn't being sent to the correct address. The funny part is that the bounce does get sent back to my email. It's weird. 0 -
The newaliases is not installed on cPanel systems and if I recall right, is not used for Exim installations. When that is said, to specify which mail shall receive root mails on a cPanel system, you'd need to configure it in WHM -> Edit System Mail Preferences which in practice adds/modifys .forward in /root folder. In theory you could change the aliases file, but that would then make the cPanel configuration not working as expected. If you have indeed configured root mails and mails from Litespeed is still not working, it could be because of a wrong TLD used (i.e. root on another server host) 1
Please sign in to leave a comment.
Comments
7 comments