Skip to content

Instantly share code, notes, and snippets.

@1v
Created August 8, 2016 16:04
Show Gist options
  • Save 1v/915c872b15a12445d234a6cae6c78011 to your computer and use it in GitHub Desktop.
Save 1v/915c872b15a12445d234a6cae6c78011 to your computer and use it in GitHub Desktop.
Forward /var/mail/root to external email

Edit file /etc/aliases add:

root: [email protected]

Run:

newaliases

Check your MTA:

netstat -ltnp |grep :25

And restart service:

service sendmail restart

Test:

echo -e "Test body" | mail -s 'Subject' root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment