On Thu 22 Feb 2018 at 11:58:18 -0600, David Wright wrote:

> On Mon 19 Feb 2018 at 18:39:02 (+0000), Brian wrote:
> > On Mon 19 Feb 2018 at 10:23:56 -0600, David Wright wrote:
> > 
> > > $ cat /etc/mailname 
> > > alum
> > 
> > Debian's exim4 README says that mailname should be a FQDN. I find that
> > useful for sending mail to "anotheruser".
> Sorry, but I haven't been able to work out what you mean.
> Is "anotheruser" a username on the same system, somebody or
> some machine on the LAN, or something different?

Exim will qualify all unqualified addresses with mailname. "anotheruser"
could be a user on the system or have an email account elsewhere.
With mailname as gmail.com a mail sent to or cc'ed to tom123 would go to

> This is a genuine query. If I'm missing out on some useful aspect
> of writing in a domain, I'd like to know what it is so I can try
> using it. (I have a spare domain registration handy as it happens.)

The mailname needn't be the canonical_hostname, although exim will
indeed set it up with this when it is installed and mailname does not
exist. Easily changed.
> > But mailname has nothing to
> > do with domain as enquired about by Jeremy Nicoll.
> The contents of /etc/mailname is the answer to this question:
> "It should be the single, fully qualified domainname (FQDN)."
> so, because the domain is empty, the FQDN will be the same as
> the hostname. I was merely showing that to be the case here.

Yes. I don't think this disadvantages the majority of users. It is only
when setting up an MTA that some thought has to be put into what purpose
you want mailname to serve. A single word entry, the hostname, say,
would not suit me.

> As pointed out elsewhere, mailname can be used to generate
> Message-IDs (mutt does) which might not be globally unique,

A Message-ID is not used to transport a mail, so how it is generated is
not of great importance. As it happens, I generate my own through mutt.

> not something to concern most home users, and it can be
> mitigated. It's also used as the envelope-from, it appears,
> between the mail client and exim which can rewrite it.

That's exim qualifying an unqualified address.

> I guess that if you submit mail directly from, say, mutt to
> a remote smarthost, it would be a good idea to place an
> email address into /etc/mailname.

I think it is always a good idea to have a FQDN in /etc/mailname,
irrespective of what is in /etc/hosts.


Reply via email to