Sorry for late answering...


On Sun, May 08, 2022 at 04:25:05PM +1000, Cameron Simpson wrote:
You're failing in this because you have $smtp_url defined. Comment out
it and the other $smtp* variables.

When you send with $sendmail (the local system's mail system, postfix
for you) the smtp settings come from the main.cf file, not from mutt.

OUCH
So all this whole time I have been using Mutt's builtin SMTP, the less orthodox way according to Mutt wiki... And seemingly Heirloom Mailx also works this exact way when specifying SMTP options as well



>By the way, in Mutt default pager for reading emails, your words between 
underscores '_' (_not_, _may_, etc...) are not being displayed... Why?

I think someone suggested turning off any colouring settings you have
active. Possibly some colours match the terminal background colour.

Are the words invisible (gaps in the text) or missing (no gaps)?

You all were right: setting "uncolor body *" solved it, at least in the Mutt version I'm currently using. I'd really need to try latest release and compare. Hope I'm able to do soon...



So finally tried using Mutt the orthodox way: with external sendmail SMTP/MTA.
In the end, I chose to begin with Msmtp instead of Postfix...
Why? Because after just installation, I realized that Postfix is kind of "overkill" if just wanting to send: it's designed as a full-blown server for sending and receiving. Msmtp, on the other hand, is just a SMTP client; no need to setup a whole server.

So first read the Msmtp documentation, and then for sending I first tried:

printf "%b\n" "$msg" | mutt -s "Test message" -e 'set my_user="u...@domain.tld"; set my_url="smtp.domain.tld"; set record=""; set sendmail="/path/to/msmtp --port=587 --tls=on --host=$my_url --from="SendUser<$my_user>" --auth=on --user=$my_user"' recei...@domain.tld

Incientally "--password" is not a valid command line option; so I was expecting to be prompted for the password, but instead I got this:

msmtp: authentication method PLAIN needs a password
msmtp: could not send mail
Error sending message, child exited 69 (Service unavailable.).
Could not send the message.

Even after making a very minimalist .msmtprc with *only* the "password" line (trying plain password for now just for testing), I kept getting the above error. I did chmod .msmtprc to 600, BTW.

So had to make a full .msmtprc according to documentation, and tried this command:

printf "%b\n" "$msg" | mutt -s "Test message" -e 'set my_user="u...@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"' recei...@domain.tld

This time it succeeded.



---So, do I really need to set password apart in some of Msmtp's other 4 ways in order to successfully use it?

---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?



Thanks beforehand yet again.

Reply via email to