[Pkg-exim4-users] mailname for outgoing mail
ross at biostat.ucsf.edu
Tue Jun 27 21:31:02 UTC 2006
On Mon, 2006-06-26 at 14:12 +0200, Marc Haber wrote:
> On Sat, May 20, 2006 at 02:15:43PM -0700, Ross Boylan wrote:
> > I have a system with FQDN of corn.betterworld.us.
> > I want mail (also news posts and anything else heading to the internet
> > at large) from there to appear to be from betterworld.us.
> > I set /etc/mailname to betterworld.us.
> > Is that OK? I guess that's a 2 part question: will it work? is it
> > advisable?
> It will work if your applications generate unqualified addreses.
> I use configuration on application basis to have e-mail generated on
> torres.zugschlus.de to appear from zugschlus.de
> The discussion in #315128 might help. or not.
I think the reporter of that bug was uncertain about the same things I
was uncertain about, but took different interpretations and so got in a
bit more trouble.
I put the stress on "part that should appear after the @" and entered
"betterworld.us", while he put the stress on the emphasis on the
references to the FQDN, as well as the references to header rewriting,
to infer the answer should be "corn.betterworld.us" (to use my domain
Also, I believe he is interpreting domain to be the b.c in user at a.b.c,
while I was taking it to be a.b.c. I wondered about that too, as
indicated in the last couple of paragraphs of my quoted message.
> > The README.Debian discussion is a bit unclear to me:
> > Your ``mail name'' is the hostname portion of the address to be shown
> > outgoing news and mail messages (following the username and @ sign).
> > What you enter here will end up in /etc/mailname, which is a file that
> > might be used by other programs as well.
> > (exim4-config 4.61-1).
> > The "to be shown on outgoing" indicates betterworld.us is what I
> > want.
> > However, the documentation also refers to header rewriting
> > (actually, the very next paragraph says you may be able to hide this
> > name)--why would I want to hide it if it's the one I want to show?
So the reporter of 315428 (aka John) inferred that the answer to the
first config question for the mail name must be something else.
> Using both "hide local mail name in outgoing mail" in conjunction with
> a mailname set by the user does not seem to make sense in all
> situations. It is, however, possible that there are situations in
> which this might be desireable, which is the reason why the debconf
> scripts are not checking for this situation.
Ah, I forgot that /etc/mailname is not the only source of domains in
mail headers. "hide local mail name" will operate both on domains
from /etc/mailname (which is what was confusing me and John) and domains
from other sources (e.g., MUA's).
Is it possible this facility, or really this question, is generating
more confusion than it's worth? I guess it depends partly on how likely
FQDN's are to slip into the mail headers.
> > I'm also unsure whether "hostname" in the previous discussion refers
> > to "corn" (which is what the command hostname returns) or to my FQDN.
> As a rule, exim only handles fully qualified host names. There might
> be exceptions.
> > Basically the same ambiguity occurs if I consult my current testing
> > man page for mailname:
> > The file /etc/mailname is a plain ASCII configuration file, which on a
> > Debian system contains the visible mail name of the system. It is
> > used by many different programs, usually programs that wish to send or
> > relay mail, and need to know the name of the system.
> > The file contains only one line describing the fully qualified
> > domain name that the program wishing to get the mail name should use
> > (that is, everything after the @).
> > I want the visible name to be "betterworld.us", but the FQDN of the
> > system is "corn.betterworld.us."
> So you want "betterworld.us" in there, I think. What happens when you
> do this?
It works. It had a slightly odd effect for me of sending all my mail to
a remote system. I didn't intend that, but it was what I discovered I
Here was the situation: I had an existing system, wheat.betterworld.us,
that was my main system. I was installing a new system,
corn.betterworld.us, that will someday take over as primary. Mail to
x at betterworld.us gets routed to wheat from corn. When I put
betterworld.us as my /etc/mailname on corn, my mail from corn ended up
going to wheat. That's really fine for the interim, and once corn
becomes primary it will get the mail going to x at betterworld.us.
(Actually, I added some routers since to fiddle with this).
I go into this odd setup just to clarify what the effect of this
configuration was, since you asked what happened.
> > P.S. "The domain in a mail address need not correspond to a
> > hostname." p. 24 of Hazel's Exim (3) book. This suggests to me that
> > the use of "hostname" in the discussion of mailname may not be
> > entirely apt.
> >I also have a dim recollection that in some contexts,
> > in the edress user at a.b.com a is the "host" and "b.com" is the
> > "domain."
> >From a DNS point of view, a.b.com is a domain name as well. The
> definitions of these things vary among authors.
Ross Boylan wk: (415) 514-8146
185 Berry St #5700 ross at biostat.ucsf.edu
Dept of Epidemiology and Biostatistics fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739 hm: (415) 550-1062
More information about the Pkg-exim4-users