How To Send Root Mail To Existing
If you want to know how to send root mail to an existing user, it’s pretty simple to get the mail but does not change in the production environment for security purposes. you can change root mail alias which will be sent to user instead of root.
you need to have a user and define the user there in the file.
Check Out: Check Service Is Running Or Not
when you want to just for practice, you can do this but do not change it when you’re working in a Live environment. Now all the root mails will be forwarded to that user automatically. By default, you can mail at this location /var/spool/mail.
First, create a user on your server, I have created an abc user on the server to make you understand.
Make changes in this file /etc/aliases.
go to the bottom and define the user here.
Check Out: What’s New In Redhat 8 Beta Version
Now change it.
And save the file and restart the service.
The above command will reload the file.
That’s it. root mail alias