[Pkg-exim4-users] mailname for outgoing mail

Ross Boylan ross at biostat.ucsf.edu
Sat Jul 1 04:06:09 UTC 2006


Perhaps this dicussion should move to -dev?
Redirect as you see fit.

On Fri, 2006-06-30 at 11:28 +0200, Marc Haber wrote:
> On Thu, Jun 29, 2006 at 01:08:19PM -0700, Ross Boylan wrote:
> > On Wed, 2006-06-28 at 11:09 +0200, Marc Haber wrote:
> > > Hmmm. Any idea how to explain this better?
> > Without having the templates in front of me, this is hard.
> 
> http://svn.debian.org/wsvn/pkg-exim4/exim/trunk/debian/exim4-config.templates?op=file&rev=0&sc=0
> links to the templates file of current exim4 mainline svn HEAD. Does
> that help?
Yes.  And there's actually more in there on the first question than I
remembered.
> 
> > It's also
> > hard because it's hard to think of brief ways to say this.  Perhaps
> > after the second question add (/etc/mailname only affects unqualified
> > addresses, while this setting affects all adresses).
> > 
> > But the bigger thing that's puzzling is that there there are two
> > questions that seem to be addressing the same issue, even if they differ
> > in detail.
> 
> You mean the templates exim4/mailname and exim4/hide_mailname?
Yes.
> 
> > Perhaps since /etc/mailname is the province of the whole system it
> > should be the responsibility of the Debian installer to set it up, not
> > the particular packages (mail, news, ....).
> 
> Maybe, but that would set a precendent. The common way to achive this
> is in the packages using the file, but that's error prone and
> duplicates efforts.
A precedent that avoids error prone duplication might have some good
points :)  And the question doesn't seem that different from "what is
the name of your system" which I think is part of the installer's setup.

Anyway, here's the current setup:
-----------------------------------------------------------------
Template: exim4/mailname 
Type: string 
_Description: System mail name: 
Your "mail name" is the hostname portion of the address to be shown on
outgoing news and mail messages (following the username and @ sign)
unless hidden with rewriting. . This name will also be used by other
programs; it should be the single, full domain name (FQDN) from which
mail will appear to originate. . This name won't appear on From: lines
of outgoing mails if you enable rewriting.


Template: exim4/hide_mailname 
Type: boolean
_Description: Hide local mail name in outgoing mail?
The headers of outgoing mail can be rewritten to make it appear to have
been generated on a different system, replacing "${mailname}"
"localhost" and "${dc_other_hostnames}" in From, Reply-To, Sender and
Return-Path.
------------------------------------------------------------
I believe the questions are asked in that order.

*If* the 2 questions are preserved, this might be a little clearer:
----------------------------------------------------------------
Template: exim4/mailname 
Type: string 
_Description: System mail name:
Email addresses ordinarily look like name at example.com, where the part
after the @ sign is called the "domain."  Mail and news programs, or
their users, sometimes generate addresses without the @ and the domain;
exim and other programs use the system mail name (the response to this
question) to provide a complete address.   Ordinarily you should enter
the domain you wish to present to the internet at large.
[Is that really true?  If the user's ISP is earthlink.net, should they
enter earthlink.net as their mailname?  An empty response implies
what--use exim's primary hostname and its attendant fall-backs?  another
interpretation would be "do not permit unqualified addresses".]
--------------------------------------------------------------------
Comments: I removed references to FQDN, as the FQDN of the system is not
usually what goes here and it got me (at least) thinking that was the
right answer.  I've omitted references to header rewriting, saving that
for later [but see later realizations], and come closer to describing
the circumstances under which this variable is relevant.  The
description "public name you want" sounds a lot like the 2nd question;
"name to fill in when none is provided" doesn't sound so duplicative,
and is closer to the actual function (I think).

---------------------------------------------------
Template: exim4/hide_mailname 
Type: boolean
_Description: Hide local mail name in outgoing mail?
-----------------------------------------------------
Oops; I'm not sure what this does.  Also, is this always asked, or only
in some configurations?  I suspect (quoting update-exim4.conf)
1) this corresponds to 	  
dc_hide_mailname
    Boolean  option  that controls whether the local mailname in the
    headers of outgoing mail should be hidden. (Only  effective  for
    "smarthost" and "satellite".

[There's a missing close parenthesis in the original.]

2) if that is set it in turn alters 
  DEBCONFheaders_rewriteDEBCONF
    If the system is configured to hide the system mail  name,  this
    is  replaced  with  a headers_rewrite directive rewriting sender
    addresses from local domains to the visible mail name for use on
    the transport that sends outgoing mail to the smarthost.

This one might be relevant, but I think it's insensitive to
dc_hide_mailname
  DEBCONFrewriteemailaddresses_mailnameDEBCONF
    is replaced with this rewriting rule:
    *@mailname   ${lookup   {${local_part}}   lsearch   {/etc/email-
		    addresses} {$value} fail } Ffrs
    with mailname being replaced by the contents of /etc/mailname.


So if you answer yes to this question, it means most addresses that
match +local_domains get rewritten to /etc/mailname.

Now I see why the reference to rewriting was in the first question:
there are two kinds of rewriting going on.  The second question touches
on the rule in the previous paragraph, while the /etc/mailname is only
obscured by the DEBCONFrewriteemailaddresses_mailname snippet.....


Having muddied that issue, I'll turn to the topic of how my system was
handling mail.
> 
> > > Very interesting. Can you explain exactly what happened? Did you have
> > > betterworld.us in local_domains at this time?
> > No.  Did I leave anything else out of the explanation below?
> 
> I don't know. In fact, I have not yet fully understood your setup and
> how you have configured your exims. Maybe it's too complicated to
> investigate any more, but if you want me to I'll spend some time in
> trying to reproduce your issue. (mental note: Need to get vmware
> installed).
That's very kind of you to offer.  I don't think it's necessary, since I
don't think there's a problem--just something that surprised me a bit at
first, but now seems reasonable.
> 
> > > Actually, this setup doesn't seem odd at all to me. I don't see any
> > > problems, but since you had problems, things are weird and unclear to
> > > me.
> > Well, I was surprised that mail from corn ended up on wheat,
> 
> I am surprised about that as well. I suspect that you inadvertently
> modified the list of local domains which made corn suddenly think that
> your betterworld.us was not a local domain.
I did that deliberately, since I didn't want to be stealing messages
meant for my primary mail server.
> 
> > but once it
> > happened I decided it was exactly the behavior I wanted.  I think part
> > of the reason it happened was that scripts that generated system mail
> > (e.g., logcheck) used /etc/mailname in places,
> 
> These scripts usually use unqualified addresses and deliver mail via
> /usr/bin/mail or /usr/lib/sendmail. Yes, in this case, you're going to
> have the addresses qualified with the contents of /etc/mailname.
> 
> I have modified the README accordingly and hope that the new text is
> better understandable. See
> http://pkg-exim4.alioth.debian.org/README/README.Debian.html, chapter
> 2.1.1.3.
> 
That looks good.





More information about the Pkg-exim4-users mailing list