On Fri 23 Feb 2018 at 12:53:34 (+0000), Brian wrote:
> 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
In the long distant past, I had bar.ac.uk in /etc/mailname, and
foo.bar.ac.uk as the canonical name in /etc/hosts. Before the
firewalls went up, foo.bar.ac.uk (and a group of other hosts)
would all resolve, and that's probably a common situation for
Naturally, most of my emails would be to addresses like a.n.ot...@bar.ac.uk
and s...@bar.ac.uk, so I could write just a.n.other and spqr in the
composer and it would get qualified for me.
Now I'm a home user, that situation doesn't pertain. The only
common denominator in email addresses now is @. I have a set
of mail alias files that translate from, say, isp to
Unlimited Web Hosting UK Ltd <ad...@unlimitedwebhosting.co.uk>
and so on for all the people I have emailed regularly since 1998.
So, having dreamed up alum.dreamtup, how often would I expect to
benefit from baz being turned into baz.dreamtup?
> > 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.
Yes, but to what (that's of any use or benefit)?
> > > 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.
I refer again to the question I tried to answer:
"What, on a home LAN, is that used for?"
Obviously I don't know your relationship with cityscape.co.uk
but it's a company domain. There's really only one person on
lionunicorn.co.uk and that's me. (My wife uses her institutional
address.) About the only local emails here are from root.
> > 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.
And they reveal a domain that looks as though there are few users whose
unqualified names need that particular domain to be added to them.
(I'm obviously guessing here.)
> > 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.
It doesn't qualify it, it rewrites it. It finds the "FQDN" that's
in /etc/mailname, strips it off and replaces it with dc_readhost.
> > 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 wasn't aware that mutt read /etc/mailname, and it's not in the man
page, but it can use the value of envelope_from_address instead of
the sender if use_envelope_from is set. However, it's some years
since I tried sending emails with its smtp_url. I prefer to stick
them in exim4's queue and have a log entry kept.
> I think it is always a good idea to have a FQDN in /etc/mailname,
> irrespective of what is in /etc/hosts.
I don't think I've seen a good explanation of why though. However, at
least one problem might now be solved, with the recent decision on
.home, .corp and .mail.