10.3.2 Mailname
The mailname of a host is the name that mail-related programs
use to identify the host. The file /etc/mailname
contains of this
name followed by a newline. The mailname is usually a fully qualified domain
name that resolves to one of the host's IP addresses. See
mailname(5)
.
What the recipient of e-mail sees in the From: header of mail sent
by your Debian host depends on how Mail User Agents (MUA) and Mail Transfer
Agents (MTA) are configured. Suppose a local user foo
sends a mail from a host with mailname myhost.dom. The
From: header of outgoing e-mail will be:
-
"From: foo@myhost.dom" if the MUA
has no From: header set;
-
"From: bar@myhost.dom" if the MUA
has "From: bar" set;
-
"From: bar@bogus.dom" if the MUA
has "From: bar@bogus.dom" set.
Even when the MUA has a From: header set the MTA may add a
"Sender:foo@herman.dom" header to
indicate its true origin.
Of course when any involved MTA performs address rewriting as discussed in Setting up a catchall for nonexistent
email addresses under Exim, Section 9.6.1.3 and Configuring selective address rewriting
for outgoing mail under Exim, Section 9.6.1.4, the e-mail address seen by
the recipient can be changed to something else.