New to Mutt, unable to send messages in *any* attempted way

X Tec xtec at trimaso.com.mx
Wed May 11 15:54:19 UTC 2022


Managed to briefly test in a more updated rig with Mutt 2.2.4 and Msmtp 1.8.11.



On Tue, May 10, 2022 at 07:25:02AM +0000, Sam Kuper wrote:
> Consider adding ` --` (without backticks) to the end of the
> sendmail string in your example above.
>
printf "%b\n" "$msg" | mutt -s "Test message" -e 'set my_user="user at domain.tld"; set my_url="smtp.domain.tld"; set record=""; set from="Send User<$my_user>"; set envelope_from=yes; set sendmail="/path/to/msmtp --port=587 --tls=on --host=$my_url --auth=on --user=$my_user"' receiver at domain.tld

Trying to add "--" did not work at all, no matter where I put it:
[...] sendmail="[...] --"' receiver at domain.tld
[...] sendmail="[...]"' -- receiver at domain.tld

If using the more standard method, without all the msmtp parameters above and using .msmtprc instead, it must have *all* the complete needed commands; if it only has the "password" line it fails with the same error as well.

So for this to work, I had to make a ~/.netrc file with content:

machine smtp.domain.tld
login user at domain.tld
password p4ss

(Yes, Msmtp manual says this method is deprecated...)



> - Why you say '"--password" is not a valid command line option'.
>
Yes, according to manual "password" is a valid command for .msmtprc; but there's no "--password" option for command line. I tried this last one and got something like "invalid or unknown command".



The passwordeval with gpg method also works, albeit I wasn't able to figure out how to use it directly in command line... Trying to use

set sendmail="/usr/bin/msmtp [...] --passwordeval="gpg --no-tty -q -d ~/.user.gpg""

got this:

Error in command line: --no-tty: unknown variable
gpg: WARNING: no command supplied. Trying to guess what you mean ...
gpg: processing message failed: Unknown system error
msmtp: cannot read output of 'gpg'
Error sending message, child exited 78 ().
Could not send the message.

I did figure it's an issue with wrongly used quotes (and the gpg command needs them), but still haven't been able to solve it...



On 2022-05-11 09:03:56, Cameron Simpson wrote:
> On 10May2022 07:25, Sam Kuper <sampablokuper at posteo.net> wrote:
> >On Mon, May 09, 2022 at 11:01:20PM -0500, xtec at trimaso.com.mx wrote:
> >> ---To respond a received email in Mutt pager I hit 'r', and all the
> >> rest. I only change the destination email address, and eventually
> >> send. But even after successfully sent, the "responded" email in Mutt
> >> pager is not marked with 'r'. Why?
> >
> >Maybe because in your examples above, you set the record variable to ""?
> >
> >I may be wrong, but: I think that in order for Mutt to know whether a
> >message has been replied to, it checks the mailbox specified by the
> >record variable - so if that variable is empty, Mutt has no way of
> >checking.
> 
> I thought it just set a flag on the message.
> 
> I forget, is XTec using a local or IMAP mail folder?
> 
Current IMAP settings (using Starttls):
set folder = "imap://user@domain.tld@smtp.domain.tld"
set spoolfile = +INBOX
mailboxes = +INBOX

Also,
set record = ""
set date_format = "%F %T"
set index_format = "%4C %Z %D %-15.15L (%?l?%4l&%4c?) %s"
set sort = reverse-date

By using '$' I just get "Mailbox is unchanged", even when I know there are new messages.
The only thing that *seemed* to work was "bind index G imap-fetch-mail" in .muttrc.
With this, I could use 'G' to refresh for newly received emails
Still, I kind of expected a "default" key for that...



---Just like Msmtp, if the better idea is to not store passwords in plain text, doesn't Mutt have some type of password "masking" or something? With GPG, hashed into another file somewhere else, etc...



Thanks again for your attention.


More information about the Mutt-users mailing list