I have a system job that fails and sensd me mail that I can read with the mail command. That means I still need to login to the mail server to get the emails and read them. The server supports sending mail to external clients, such as gmail. How can I set mail to automatically forward my mail to my gmail?

I am not the system administrator, and do not have root access on this system.

  • mail aliases?
    – Bratchley
    Aug 4, 2016 at 15:59
  • loojks like a rootly power is needed so no, mail aliases arent an option
    – j0h
    Aug 4, 2016 at 19:39

1 Answer 1


You can create a .forward file in your home directory, and the mail will be forwarded.

echo "[email protected]" > .forward
chmod 644 .forward                 # change permission else it won't work
  • .forward was to be active by default in the old systems of lore with sendmail; it also has security implications. As I understand it, the odds of this solving the OP problem in a modern system is low, but I can be wrong. Aug 4, 2016 at 15:38
  • .forward for plain old email forwarding should still work (it does on all my machines!), but using it to filter mail... that got restricted a long time ago :-) Aug 4, 2016 at 17:23
  • Simple forwarding should be enabled. At one time .forward could run any arbitrary program or script. The running of arbitrary programs or scripts is generally disabled. Forwarding to gmail or any other major freemail service may not work without acreditation.
    – BillThor
    Aug 5, 2016 at 1:33
  • Hey it worked! (It took me a bit to figure out that it had been sent to spam via gmail.)
    – j0h
    Aug 5, 2016 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .