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

xtec at trimaso.com.mx xtec at trimaso.com.mx
Thu May 5 20:11:48 UTC 2022


On Thu, May 05, 2022 at 12:07:44PM -0500, Kevin J. McCarthy wrote:
> 1) On the command line, the shell will expand shell variables inside
> double quoted strings, before Mutt even sees it.
> 
> So in the part "set smtp_url=smtp://$my_user@$my_url" Mutt is probably
> only seeing "set smtp_url=smtp://@", because $my_user and $my_url are
> unset in your shell.  You may want to use single-quotes around the
> whole "-e" expression, but then be careful with nested single quotes,
> e.g. the set from='User' part.
> 
First: had to delete/rename ~/.muttrc, because some previous settings 
were perhaps conflicting...

This seemed to *finally* work (had to play with both single and double 
quotes...):

printf "%b\n" "$msg" | mutt -s "Test message" -e 'set 
my_user="user at domain.tld"; set my_url="smtp.domain.tld"; set from="Send 
User <user at domain.tld>"; set 
smtp_url="smtp://$my_user:my_p4ss@$my_url:587"; set ssl_starttls="yes"; 
set ssl_force_tls="yes"' receiver at domain.tld

Finally worked -seemingly-, but popped just many doubts:

---There's a "sent email" log in local system, where sent emails are 
logged. There's always this line:
Message-ID: < <alphanum_string.alphanum_string> @ 
myLocalPCuser at localhost.myisp.com >
Is this correct?

---Without "set from=" field, sender becomes 
"myLocalPCuser at localhost.myisp.com"... What is this?
Does the "from" field kind of guarantee that email is being *really* 
sent from the user at domain.tld address, and not from *local rig*?

---In "set smtp_url" field, if using "$my_user:my_p4ss" notation, this 
seems to override the "set smtp_pass" field completely?

---Seemingly not needed smtp_authenticators... ??

---Without smtp_url and smtp_pass fields, where does email go? 
receiver at domain.tld doesn't receive it...

---Is email really being sent with STARTTLS, as wanted? How can I tell?

---In "set from=" field, spaces between "Send User" and actual email 
address... don't seem to matter?



> Are you able to send email via that account using other applications?

Yes, I used to use Heirloom Mailx.



> Yes.  Whether or not you have to explicitly specify the port may depend
> on the mail server's configuration.  This configuration can vary from
> ISP to ISP.

I didn't mean email provider, but ISP internet service I'm connected to.
And did test again: I connected to an internet network, did not specify 
port in smtp_url, tried send email, and got:
Could not connect to smtp.domain.tld (No route to host)
Tried connecting to a different internet network, tried to send email 
using *exact* command, without port, and *it succceeded*.
WTH?


More information about the Mutt-users mailing list