Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
- To: debian-user@lists.debian.org
- Subject: Re: Mail transfer agent (debian-user-digest Digest V2020 #932)
- From: David Wright <deblis@lionunicorn.co.uk>
- Date: Wed, 30 Sep 2020 23:26:20 -0500
- Message-id: <[🔎] 20201001042620.GA13029@axis.corp>
- Reply-to: debian-user@lists.debian.org
- In-reply-to: <20200926075011.cpsoi552ncbuttjo@acr13.nuvreauspam>
- References: <20200924162843.D04D02066C@bendel.debian.org> <2113456620.576877.1601005216133@mail.yahoo.com> <20200925053824.GA26502@axis.corp> <20200925102654.7qy2n2yafxofp5tb@acr13.nuvreauspam> <20200926024818.GE6075@axis.corp> <20200926075011.cpsoi552ncbuttjo@acr13.nuvreauspam>
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.
Reply to: