Mail from root, root and root! :>
I’m sometimes pretty sick of getting emails from ‘root’ reporting crons, updates, errors and rest of things I would usually use daily in any Linux machine. My eyes just get sore when I see email from root in all of my email clients specially Gmail. Perhaps that’s because I’m fed up of seeing root everywhere and that’s why I’ve an alias for root to forward all these rootish emails to one of my email addresses. But that’s just not enough as I actually want to see a humane human name as a sender just instead of root :>
To add to it, this just becomes more anguish when common, rather I would say major, Linux applications suck in changing the default sender address off from ‘root’ (although some apps like ‘exim -f’ and mutt having SET FROM defined in ~/.muttrc allow you to change sending address while emailing from command line but this isn’t what I needed). And so called mighty default MTA, sendmail just brings more panic to it when trying to change it during an in-mail transport (btw, I already dislike sendmail mainly cause of its sluggishness during startup and restart)! As I really had to do something about it and I already knew that Exim’s address rewriting can be helpful here so after installing it and changing default MTA with ‘alternative –config mta’ I added a quick rewrite at transport.
$ grep -A 5 remote_smtp /etc/exim/exim.conf | tail -5 driver = smtp headers_rewrite = root@* some-email-address@example.com fsr
This worked but didn’t change the FROM field’s name as expected. I tried combinations of different settings including the rewrite tag ‘F’ but the FROM envelop address kept showing the original sender root. I was searching till I stumbled upon http://www.exim.org/exim-html-2.00/doc/html/spec_32.html#SEC671 where it states the FULL ‘from’ envelop address is changed with ‘w’ tag and allows to have a new sender name (RFC 822) to be configured. So I added.
$ grep -A 5 remote_smtp /etc/exim/exim.conf | tail -5 driver = smtp # Adding to rewrite the stupid root@ FROM field which I hate headers_rewrite = root@* "Abbas <some-email-address@example.com>" fsrw return_path = some-email-address@example.com
And boo you naughty (!) rootÂ
![]()

Recent Comments