Mutt hooks are great, altough very simple they are quite flexible for my needs. However, I hate writing them. I find it really boring.
So I came up with a “compiler” for mutt hooks, starting from a simple YAML file. You can find it on gist.github
It is made like this:
- domains: [your_university_doma.in, your_company_doma.in] from: 'Name Surname <my business email@gmail.com>' - domains: [gmail.com, hotmail.*] from: 'sk4teNB33r <lulz@acideat.er>' - addresses: [guy1@doma.in, some@one.else, dearly@belov.ed] from: 'oh another address <ano@th.er>' - addresses: [paranoid@foo.zap, crypto@reb.el] from: 'secret address <hidden@na.me>' # Mails for these people will be encrypted and signed, for maximum security gpg: 'crypt sign'
and you can just run
python2 make_hooks.py hooks.yaml > hooks.mutt
Then in your muttrc you can add
send-hook . 'reset pgp_autoencrypt' source hooks.mutt
and you’re done