User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
email:forward [2026/04/14 07:30] willyemail:forward [2026/04/14 07:37] (current) willy
Line 55: Line 55:
 ===== Usage ===== ===== Usage =====
  
-Try it from the command line:+In order for your root (or any user) emails to be sent to a specific address (example, myself@mydomain.com) you need to create a **~/.forward** file with the target email address in it: 
 +<file - .forward> 
 +myself@mydomain.com 
 +</file> 
 + 
 +Now, try it from the command line:
 <code bash> <code bash>
 (echo "Subject: test email"; echo "Hi! my nullmailer works...") | sendmail -F "Me Myself" -f myself@mydomain.com destination@otherdomain.de (echo "Subject: test email"; echo "Hi! my nullmailer works...") | sendmail -F "Me Myself" -f myself@mydomain.com destination@otherdomain.de
 </code> </code>
 +
 +Now test that the forward setting works as well:
 +<code bash>
 +echo "This is a test email from root" | mail -s "Test Subject" root
 +</code>
 +
 +you should receive both emails at myself@mydomain.com, even if the second one is directed a //root// on the local machine nullmailer will forward that.