2

I'd like to use mutt to send and sign the email directly from command line like e.g.

mutt -s "MySubject" user@domain.com < message  OR echo " " | mutt -s "MySubject" -a message.txt -- user@domain.com

but even I made a proper setup in muttrc and it actually works when I compose the email in mutt UI (agent interface) ["Security: Sign (PGP/MIME)" and "Sign as:Marcel" parameters are automtically assigned + activated and email is sent with signature] this I can't make functional within cli usage. It just send the email without any signature in it. I tried different setup in muttrc but it always send the mail without it.

Another unsuccesfull attempts- pgp key with and without passphrase to check if there is not a problem with entering it, also it did not work with key that was temporary unlocked by pgp agent.

GPG variables defined in my muttrc:

...
source ~/.config/mutt/gpg.rc

set pgp_use_gpg_agent="yes"
set pgp_default_key="8624C27DB543F03D"
set pgp_sign_as="Marcel"
set crypt_autosign="yes"

You can see even if I pass the muttrc config file in argument it does not change the fact that mutt just send the email without using pgp. It seems to me it ignores the variables in the config because it's not launched in agent UI.

mutt -F ~/.config/mutt/muttrc -s "MySubject" -a message.txt -- user@domain.com

Is there a way to sign the mail with mutt when using only command line? Thank you for your answers.

1 Answer 1

1

Kevin J. McCarthy responded to a related question on the mutt user mailing list saying:

Sorry, cryptographic operations are disabled in batch mode.

Source: http://lists.mutt.org/pipermail/mutt-users/Week-of-Mon-20210412/002737.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.