Users can create a .forward file in their home directories that is used by mail servers like exim, sendmail used to redirect email to another email account.
When mail is sent to a local user, the sendmail command checks for the $HOME/.forward file. The $HOME/.forward file can contain one or more addresses or aliases. If the file exists, the message is not sent to the user. The message is sent to the addresses or aliases in the .forward file.
On Cpanel servers, /root/.forward contains the email address of the server administrator, so all emails to root get forwarded to the Server Admin email account.
Example
[root@server52 ~]# cat /root/.forward [email protected] [root@server52 ~]#
To create a .forward file, you can run
echo "[email protected]" > ~/.forward
This will create a file $HOME/.forward with your email address inside it.
Leave a Reply