Artificial intelligent assistant

Set specific GPG key for specific recipient in mutt I'm trying to make `mutt` use a specific GPG key when sending mails to a specific recipient, much like "per-recipient rules" in `OpenPGP / Enigmail`. For example, if I want to send an email to `coworker@company.com` I want to encrypt it with the public key `0xDEADBEEF` and when I send an email to `loveydovey@home.net` I want to encrypt it with some other public key `0xBA5EBA11`. To this end, I include the following lines in my `~/.mutt/muttrc` file: send-hook '~t ^coworker@company\.com$' 'set crypt_autoencrypt ; set crypt_autosign' crypt-hook '~t ^coworker@company\.com$' '0xDEADBEEF' send-hook '~t ^loveydovey@home\.net$' 'set crypt_autoencrypt ; set crypt_autosign' crypt-hook '~t ^loveydovey@home\.net$' '0xBA5EBA11' The `send-hook` works as expected, but I still always have to pick the key. How can I make `mutt` choose the key as defined by `crypt-hook`?

`crypt-hook`'s pattern is a recipient, so remove `~t` from the pattern, it's not needed:


crypt-hook '^coworker@company\.com$' '0xDEADBEEF'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c44a79910d5473f2fd4aa43951c906c9