Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
On Wed 30 Sep 2020 at 23:26:20 -0500, David Wright wrote: > On Sat 26 Sep 2020 at 10:50:11 (+0300), Andrei POPESCU wrote: > > > > > > It ought to—I have no idea whether mutt can even use it, though > > > I suppose it's possible—but AIUI the file belongs to exim4-config. > > > It "needs" a dot to prevent your being nagged about its lack, and > > > having an @ in it could screw up any use exim makes of it. > > > (I use it to set exim's HELO.) So I thought it best to mention it. > > > > As far as I recall[1] /etc/mailname is Debian specific[2], to be used by > > all softwares (typically MTAs and some MUAs like mutt) that need a > > domain part to construct a full e-mail address, when one isn't provided. > > > > [1] too lazy to check where it's documented, quite likely in Debian Policy > > [2] as in Debian specific patches to support it > > Your ¹ is correct. Specifically, from > > file:///usr/share/doc/debian-policy/policy.html/ch-customized-programs.html#mail-transport-delivery-and-user-agents > > If your package needs to know what hostname to use on (for > example) outgoing news and mail messages which are generated > locally, you should use the file /etc/mailname. It will contain > the portion after the username and @ (at) sign for email addresses > of users on the machine (followed by a newline). > > Such a package should check for the existence of this file when it > is being configured. If it exists, it should be used without > comment, although an MTA’s configuration script may wish to prompt > the user even if it finds that this file exists. If the file does > not exist, the package should prompt the user for the value > (preferably using debconf) and store it in /etc/mailname as well > as using it in the package’s configuration. The prompt should make > it clear that the name will not just be used by that package. For > example, in this situation the inn package could say something > like: > > Please enter the "mail name" of your system. This is the > hostname portion of the address to be shown on outgoing news and > mail messages. The default is syshostname, your system's host name. > > Mail name ["syshostname"]: > > where syshostname is the output of hostname --fqdn. exim4 says: The 'mail name' is the domain name used to 'qualify' mail addresses without a domain name. Sending to brian or cc'ing or bcc'ing brian would go to br...@axis.corp. I interpret the above to apply to email addresses *only*. EHLO (HELO) would not be involved. > So on this system, its value is axis.corp, which you can see in the > header of this email. It certainly shouldn't be an email address, > containing a local part and @. Correct. Users do do that; most of the time it hasn't any consequence because they do not send to or cc brian. The complete address is used. > > I wasn't aware that there is a (somewhat old) wiki page which is > supposed to list all the MTAs (which I understand as including > programs which submit mail using SMTP) and how they interpret > /etc/mailname. For some reason, mutt is treated under the heading > for exim4. Half a dozen headings have no information listed, and > I don't know whether there are packages/programs missing altogether. I've always been aware of that page. The exim4 documentation is more useful, however. > There are at least three or four important fields that involve various > interpretations of "from-ness": EHLO, envelope (MAIL_FROM), From: > and Sender:. (That's ignoring Resent* and so on.) How these relate > to each other is not straightforward, particularly for home users' > machines, and their values can be an important factor in whether > their emails make it into the Internet and on to their destination. > What works for one person may not for another. (That's also > ignoring intranet emails.) exim4 gets the EHLO from /etc/hosts, not /etc/mailname. -- Brian.
Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
On Sat 26 Sep 2020 at 10:50:11 (+0300), Andrei POPESCU wrote: > > > > It ought to—I have no idea whether mutt can even use it, though > > I suppose it's possible—but AIUI the file belongs to exim4-config. > > It "needs" a dot to prevent your being nagged about its lack, and > > having an @ in it could screw up any use exim makes of it. > > (I use it to set exim's HELO.) So I thought it best to mention it. > > As far as I recall[1] /etc/mailname is Debian specific[2], to be used by > all softwares (typically MTAs and some MUAs like mutt) that need a > domain part to construct a full e-mail address, when one isn't provided. > > [1] too lazy to check where it's documented, quite likely in Debian Policy > [2] as in Debian specific patches to support it Your ¹ is correct. Specifically, from file:///usr/share/doc/debian-policy/policy.html/ch-customized-programs.html#mail-transport-delivery-and-user-agents If your package needs to know what hostname to use on (for example) outgoing news and mail messages which are generated locally, you should use the file /etc/mailname. It will contain the portion after the username and @ (at) sign for email addresses of users on the machine (followed by a newline). Such a package should check for the existence of this file when it is being configured. If it exists, it should be used without comment, although an MTA’s configuration script may wish to prompt the user even if it finds that this file exists. If the file does not exist, the package should prompt the user for the value (preferably using debconf) and store it in /etc/mailname as well as using it in the package’s configuration. The prompt should make it clear that the name will not just be used by that package. For example, in this situation the inn package could say something like: Please enter the "mail name" of your system. This is the hostname portion of the address to be shown on outgoing news and mail messages. The default is syshostname, your system's host name. Mail name ["syshostname"]: where syshostname is the output of hostname --fqdn. So on this system, its value is axis.corp, which you can see in the header of this email. It certainly shouldn't be an email address, containing a local part and @. I wasn't aware that there is a (somewhat old) wiki page which is supposed to list all the MTAs (which I understand as including programs which submit mail using SMTP) and how they interpret /etc/mailname. For some reason, mutt is treated under the heading for exim4. Half a dozen headings have no information listed, and I don't know whether there are packages/programs missing altogether. There are at least three or four important fields that involve various interpretations of "from-ness": EHLO, envelope (MAIL_FROM), From: and Sender:. (That's ignoring Resent* and so on.) How these relate to each other is not straightforward, particularly for home users' machines, and their values can be an important factor in whether their emails make it into the Internet and on to their destination. What works for one person may not for another. (That's also ignoring intranet emails.) Having decided on their values, it's also non-trivial to work out how to set each one: the documentation is widely scattered and sometimes missing. It would be a help to have a wiki page that consolidated that information. Cheers, David.
Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
> > It ought to—I have no idea whether mutt can even use it, though > I suppose it's possible—but AIUI the file belongs to exim4-config. > It "needs" a dot to prevent your being nagged about its lack, and > having an @ in it could screw up any use exim makes of it. > (I use it to set exim's HELO.) So I thought it best to mention it. As far as I recall[1] /etc/mailname is Debian specific[2], to be used by all softwares (typically MTAs and some MUAs like mutt) that need a domain part to construct a full e-mail address, when one isn't provided. [1] too lazy to check where it's documented, quite likely in Debian Policy [2] as in Debian specific patches to support it Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser signature.asc Description: PGP signature
Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
On Fri 25 Sep 2020 at 13:26:54 (+0300), Andrei POPESCU wrote: > On Vi, 25 sep 20, 00:38:25, David Wright wrote: > > On Fri 25 Sep 2020 at 03:40:16 (+), mike.junk...@att.net wrote: > > > > > Trying to get mutt to send mail I've got this in .muttrc: > > > > > > set smtp_pass="myPasswd" > > > # set smtp_url="smtp[s]://[user[:pass]@]host[:port]" > > > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:587" > > > set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:587/" > > > > I don't know the effect of specifying your password in both places. > > (I believe the idea behind smtp_pass is so that it can be placed in > > a separate, protected file.) > > > > I would expect the loginname (user above) to include a domain, > > ie it's usually an email address. (Mine always have been.) > > Not necessarily, just very common. However, suddenlink seems to require > the full e-mail address as well. > > https://help.suddenlink.com/knowledge/microsoft-outlook-set-your-suddenlink-email AIUI there are many services that might be using, say, foobar.net for home users and foobar.com for businesses, with the possibility of identical local parts in each domain, all submitting through the one host. > > I don't think suddenlink.net accepts mail; smtp.suddenlink.net does. > > > > I omit the port number 587 as it's the default. > > Can't find any mention of this in neomuttrc(5), care to provide a > source? Memory fart: as Reco points out, that's not so, and in fact my original reply included the 587, because I copied/pasted/edited¹ my own ordinary parameters. In this later thread, by chance, I used my extraordinary ISP parameters² where I hadn't included the port. I followed the link above, and they recommend 465, which I think uses implicit TLS encryption. They obviously support TLS on 587 (and who knows about 25), but I would recommend that the OP includes the setting set ssl_force_tls in their muttrc so that they can't send any unencrypted emails by accident. > > So I would have either: > > > > set smtp_pass="myPasswd" > > set smtp_url="smtp://mikemcclai...@suddenlink.net@smtp.suddenlink.net/" and adding :465 > > or: > > > > set > > smtp_url="smtp://mikemcclai...@suddenlink.net:mypas...@smtp.suddenlink.net/" ditto. > The trailing '/' is not needed ;) Maybe—I tend to just follow the documentation, and the mutt examples include it, so in it goes. > > > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:465/" > > > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:465" > > > #smtp.suddenlink.net::587 > > > #smtp_url="smtp://loginn...@smtp.server.net:587/" > > > set smtp_authenticators="plain" > > The default behaviour when not setting $smtp_authenticators at all works > just fine to me with Gmail and GMX. Sure. Ironically, suddenlink.net ask you to specify plain if requested. For convenience, I keep a ready-encoded copy in /etc/exim4/passwd.client as a comment after the actual password line. > > > /etc/mailname says this: > > > mikemcclain...@suddenlink.net > > > > /etc/mailname should only contain a domainname, not an address. > > Mine has just axis.corp in it, as I send mail from this machine. > > As far as I can tell mutt's SMTP support should work just fine without > setting any domain in /etc/mailname as it's used only for setting the > domain on local email and Message-Id headers. It ought to—I have no idea whether mutt can even use it, though I suppose it's possible—but AIUI the file belongs to exim4-config. It "needs" a dot to prevent your being nagged about its lack, and having an @ in it could screw up any use exim makes of it. (I use it to set exim's HELO.) So I thought it best to mention it. ¹ Apologies for the extraneous dots and dollars when I pasted from a ?lisp emacs buffer. ² Currently I can't post here through my regular smarthost, so I submit posts directly from mutt through my ISP's own one. They demand both authentication and authorisation, so I set it all up by hand-typing the commands for a one line test email. When I copied the parameters from the test into my muttrc, I forgot the port because it only appears in the connection command, not the conversation. When I checked muttrc today, I realised I've been submitting through port 25, a port that they'd blocked for years. Perhaps there were technical reasons why they didn't use it for both ordinary smtp connections and email submission in the past. Cheers, David.
Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
Hi. On Fri, Sep 25, 2020 at 01:26:54PM +0300, Andrei POPESCU wrote: > Not necessarily, just very common. However, suddenlink seems to require > the full e-mail address as well. > > https://help.suddenlink.com/knowledge/microsoft-outlook-set-your-suddenlink-email > > > I don't think suddenlink.net accepts mail; smtp.suddenlink.net does. > > > > I omit the port number 587 as it's the default. > > Can't find any mention of this in neomuttrc(5), care to provide a > source? There won't be any, because in both mutt and neomutt tcp:25 is the default for smtp. Specifically, smtp_fill_account() at smtp.c shows this: if (!account->port) { if (account->flags & MUTT_ACCT_SSL) account->port = SMTPS_PORT; else { static unsigned short SmtpPort = 0; if (!SmtpPort) { struct servent *service = getservbyname("smtp", "tcp"); if (service) SmtpPort = ntohs(service->s_port); else SmtpPort = SMTP_PORT; mutt_debug(3, "Using default SMTP port %d\n", SmtpPort); } account->port = SmtpPort; } } And getservbyname(3) will return port 25 for smtp, because it's the port designated for smtp in /etc/services. Of course, they *could* use "submission" (which is tcp:587) at that code instead of "smtp", but they did not. Reco
Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
On Vi, 25 sep 20, 00:38:25, David Wright wrote: > On Fri 25 Sep 2020 at 03:40:16 (+), mike.junk...@att.net wrote: > > > Trying to get mutt to send mail I've got this in .muttrc: > > > > set smtp_pass="myPasswd" > > # set smtp_url="smtp[s]://[user[:pass]@]host[:port]" > > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:587" > > set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:587/" > > I don't know the effect of specifying your password in both places. > (I believe the idea behind smtp_pass is so that it can be placed in > a separate, protected file.) > > I would expect the loginname (user above) to include a domain, > ie it's usually an email address. (Mine always have been.) Not necessarily, just very common. However, suddenlink seems to require the full e-mail address as well. https://help.suddenlink.com/knowledge/microsoft-outlook-set-your-suddenlink-email > I don't think suddenlink.net accepts mail; smtp.suddenlink.net does. > > I omit the port number 587 as it's the default. Can't find any mention of this in neomuttrc(5), care to provide a source? > So I would have either: > > set smtp_pass="myPasswd" > set smtp_url="smtp://mikemcclai...@suddenlink.net@smtp.suddenlink.net/" > > or: > > set > smtp_url="smtp://mikemcclai...@suddenlink.net:mypas...@smtp.suddenlink.net/" The trailing '/' is not needed ;) > > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:465/" > > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:465" > > #smtp.suddenlink.net::587 > > #smtp_url="smtp://loginn...@smtp.server.net:587/" > > set smtp_authenticators="plain" The default behaviour when not setting $smtp_authenticators at all works just fine to me with Gmail and GMX. > > /etc/mailname says this: > > mikemcclain...@suddenlink.net > > /etc/mailname should only contain a domainname, not an address. > Mine has just axis.corp in it, as I send mail from this machine. As far as I can tell mutt's SMTP support should work just fine without setting any domain in /etc/mailname as it's used only for setting the domain on local email and Message-Id headers. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser signature.asc Description: PGP signature
Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
On Fri 25 Sep 2020 at 03:40:16 (+), mike.junk...@att.net wrote: > Trying to get mutt to send mail I've got this in .muttrc: > > set smtp_pass="myPasswd" > # set smtp_url="smtp[s]://[user[:pass]@]host[:port]" > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:587" > set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:587/" I don't know the effect of specifying your password in both places. (I believe the idea behind smtp_pass is so that it can be placed in a separate, protected file.) I would expect the loginname (user above) to include a domain, ie it's usually an email address. (Mine always have been.) I don't think suddenlink.net accepts mail; smtp.suddenlink.net does. I omit the port number 587 as it's the default. So I would have either: set smtp_pass="myPasswd" set smtp_url="smtp://mikemcclai...@suddenlink.net@smtp.suddenlink.net/" or: set smtp_url="smtp://mikemcclai...@suddenlink.net:mypas...@smtp.suddenlink.net/" > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:465/" > # set smtp_url="smtp://mikemcclain46:mypas...@suddenlink.net:465" > #smtp.suddenlink.net::587 > #smtp_url="smtp://loginn...@smtp.server.net:587/" > set smtp_authenticators="plain" Seems ok from 250-AUTH LOGIN PLAIN below. > # set smtp_authenticators= > set envelope_from_address="mikemcclai...@suddenlink.net" > set use_envelope_from > > The commented lines above are things I tried that didn't work. > > This is a line from /etc/exim4/update-exim4.conf.conf that worked when I had > exim4 installed: > dc_smarthost='smtp.suddenlink.net::587' That looks ok. I get the response (using port 587): 250 STARTTLS ehlo axis.corp 250-omta04.suddenlink.net 250-HELP 250-XREMOTEQUEUE 250-ETRN 250-AUTH=LOGIN PLAIN 250-AUTH LOGIN PLAIN 250-PIPELINING 250-DSN 250-8BITMIME 250 SIZE 52428800 > /etc/mailname says this: > mikemcclain...@suddenlink.net /etc/mailname should only contain a domainname, not an address. Mine has just axis.corp in it, as I send mail from this machine. > trying to send mail via mutt: > Could not connect to suddenlink.net (Interrupted system call). > > Thinking postfix might be messing things up I deleted it. > That made no difference so I installed dma, still no outgoing mail, deleted. > > What am I missing? Cheers, David.