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.