
12 May
2020
12 May
'20
2:50 a.m.
I am working with the output from cron. The From: and To: headers are like: From: "(Cron Daemon)" <rgm> To: rgm Where the string rgm is from the cron env MAILTO, which is unavailable outside of cron (typically it is set to USER). What I want to change them to is: From: "(Cron Daemon)" <rgm@$HOSTNAME> To: rgm@$HOSTNAME I tried the -R option, but I am not using it right, as it does not seem to change anything: formail -R $USER $USER@$HOSTNAME >> mailfile < cronout Is this possible and how? thanks