6/13/2016

Linux: Forward root user mail or any user to another different address

If you are using Linux as a web server, and need to keep the root user's mail inbox from filling up, you can have it forwarded to a different email address. This will also work for any user.


  • Switch to the user's home directory:
    cd ~/
      or
    cd /home/userNameHere
  • create a new file called:
    .forward
  • Enter the address to foward to:
    example@examplesite.com
  • Enter additional emails to forward to on separate lines, if needed.
Note: cd is not a command that can be used with sudo, so you may need to switch to the root user first by using:
sudo -i

No comments :

Post a Comment