[neomutt-users] The From: section in composing new messages and the dynamic PGP key selection

Jörg Sommer joerg at jo-so.de
Fri Aug 9 10:53:45 CEST 2019

GTC at riseup.net hat am Di 06. Aug, 16:32 (+0000) geschrieben:
> 1. Does neomutt have the function that when composing messages, asking From: section?
> Currently, it only asks  To: or recipient adress and Subject: and then go to editor. 
> How to make it also ask for From: or sender address?
> This is very useful for multiple accounts or multiple identities if
> people set custom headers based on each email account or identity eg,
> From: address with hooks.

I'm using neomutt for a multi-account setup with:

    alternates "@(alea.gnuu|jo-so).de"
    set from="joerg at jo-so.de"
    set reverse_name
    set edit_headers
    set fast_reply
    set crypt_replysign
    unset crypt_use_gpgme
    set pgp_use_gpg_agent

    send2-hook .			unset pgp_default_key
    send2-hook '~f @jo-so\.de'		set pgp_default_key = 7D2C9A23D1AEA375

    set pgp_sign_command="gpg %?p?--pinentry-mode loopback --passphrase-fd 0? --no-verbose --batch --quiet --output - --armor --textmode %?a? --local-user %a? \${pgp_key_url:+--sig-keyserver-url \$pgp_key_url }--detach-sign %f"
    set pgp_encrypt_sign_command="/usr/lib/neomutt/pgpewrap gpg %?p?--pinentry-mode loopback --passphrase-fd 0? --batch -q --no-verbose -t -o - %?a? --local-user %a? -a -s -e \${pgp_key_url:+--sig-keyserver-url \$pgp_key_url }--trust-model always -- --recipient %r -- %f"
    send2-hook .				setenv pgp_key_url https://jo-so.de/pgp-key-alea.txt
    send2-hook '~f @jo-so\.de'		setenv pgp_key_url https://jo-so.de/pgp-key.txt

    # http://josefsson.org/openpgp-header/draft-josefsson-openpgp-mailnews-header.txt

    send2-hook .			'my_hdr OpenPGP: id=C1ED266701F55480\; url=https://jo-so.de/pgp-key-alea.txt\; preference=signencrypt'
    send2-hook '~f @jo-so\.de'		'my_hdr OpenPGP: id=7D2C9A23D1AEA375\; url=https://jo-so.de/pgp-key.txt\; preference=signencrypt'

> Once getting into editor and change From: address, the custom header
> settings in send-hook will not work.

For this you have to use the *send2-hook*.

> 2. In PGP encrption also, neomutt seems to always use default key or
> oldest key as encrypt_self or From: encryption key.

Maybe you're facing this problem: https://github.com/neomutt/neomutt/issues/1404

HTH, Jörg

Treffen sich zwei Funktionen.
Sagt die eine: „Verschwinde oder ich differenzier' dich!“
Erwidert die andere: „Ätsch, ich bin exponentiell!“
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 269 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20190809/b011ad7e/attachment.sig>

More information about the neomutt-users mailing list