New to Mutt, unable to send messages in *any* attempted way
Kevin J. McCarthy
kevin at 8t8.us
Thu May 19 19:05:59 UTC 2022
On Thu, May 19, 2022 at 01:12:31PM -0500, Derek Martin wrote:
>On Thu, May 19, 2022 at 11:06:38AM -0700, Kevin J. McCarthy wrote:
>> Sorry, this isn't currently possible in Mutt. The $sendmail variable is
>> handled specially: it's tokenized by space and invoked directly via
>> execvp(). So you won't be able to use arguments with spaces in them inside
>> the variable, or any shell quoting since it doesn't pass through the shell.
>
>Couldn't you do something like the following?
>
>set my_sendmail=/usr/bin/msmtp [...] --passwordeval=$(gpg --no-tty -q -d ~/.user.gpg)"
>set sendmail=$my_sendmail
>
>Don't know, haven't tried it, but as long as the first thing evaluates
>to something that sendmail's tokenization can handle, seems like it
>should work...
$sendmail goes through muttrc evaluation like other variables, but when
invoked to send an email, the resulting string is tokenized by space,
'--' and various arguments inserted as needed, and then passed to
execvp().
Yes, this should be documented and I'll add it to the config option
shortly.
I don't know why it was written this way, perhaps some security
concerns, but I agree that it's surprising.
--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20220519/3d5f6d54/attachment.asc>
More information about the Mutt-users
mailing list