Re: Redirecing root emails to a gmail account
Op Tue, 08 Sep 2015 08:03:01 +0100, schreef James Allsopp:
> I want to have the root e-mails sent to my gmail account if possible. I
> can send email here via commandline
> echo "This is a test." | mail -s Test <external addess>
> but despite editing /etc/aliases so that root points to the external
> address I can't get this to work.
> echo "This is a test.(root)" | mail -sv Testing root
> adding a verbose to the mail command doesn't give any more details.
> I tried running newaliases, but that didn't make any difference.
> Any help would be greatly appreciated.
I did that once on a setup. First you want to make sure you can mail to an
external address. You have this already covered.
What I did next was a .forward file to the system users home directory.
Content of the file was the external email address.
This worked in my case.