The mutt e-mail client allow using a trivial configuration to automatically change the sender of the email (the From header) based on the current active folder.
The configuration option that allow this is “folder-hook“. It accept two parameters:
- the folder name that should match, as regular expression
- a mutt command , we’ll change the From header in our case
At the top of our list we’ll set the default folder and after that all the other folders that you wish to hook:
folder-hook .* "my_hdr From: Antonio Gallo <firstname.lastname@example.org>" folder-hook MITICI "my_hdr From: Aiuto Mitici <email@example.com>" folder-hook AXNET "my_hdr From: Antonio Gallo <firstname.lastname@example.org>" folder-hook ILS "my_hdr From: Antonio Gallo <email@example.com>" folder-hook LUG "my_hdr From: Antonio Gallo <firstname.lastname@example.org>" folder-hook LUG-LATINA "my_hdr From: Antonio Gallo <email@example.com>" folder-hook FREEBSD "my_hdr From: Antonio Gallo <firstname.lastname@example.org>"
I also added some more custom headers to my mutt config file to make it more usefull:
my_hdr X-Disclaimer: Please visit http://www.badpenguin.org/ my_hdr X-Operating-System: Bad Penguin GNU/Linux 0.99.7