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? Details and confusions: I know the meaning if /etc/mailname and Debian policy on it has been a sore spot (e.g., http://wiki.debian.org/EtcMailName). 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? I''m also unsure whether "hostname" in the previous discussion refers to "corn" (which is what the command hostname returns) or to my FQDN. 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." Corrently my setup is dc_eximconfig_configtype=''smarthost'' dc_other_hostnames=''corn'' dc_local_interfaces=''127.0.0.1'' dc_readhost='''' dc_relay_domains='''' dc_minimaldns=''false'' dc_relay_nets='''' dc_smarthost=''x.y.com'' CFILEMODE=''644'' dc_use_split_config=''false'' dc_hide_mailname=''false'' dc_mailname_in_oh=''true'' Most (all?) the email on this system ends up forwarded to another one, which is fine for now. It may be I''m only getting away with my current /etc/mailname because this unusualy behavior is what I need now. However, I''m about to put the system into use as my primary system, including handling mail for betterworld.us, so I''m going to need to change things. I will be using split config. 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@a.b.com a is the "host" and "b.com" is the "domain."
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.> 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.Yes.> 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?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.> 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?> 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.Probably.>I also have a dim recollection that in some contexts, > in the edress user@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. Thedefinitions of these things vary among authors. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
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 for consistency). Also, I believe he is interpreting domain to be the b.c in user@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. > > Yes. > > > 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 wanted :) 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@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@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. > > Probably. > > >I also have a dim recollection that in some contexts, > > in the edress user@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. > > Greetings > Marc >-- Ross Boylan wk: (415) 514-8146 185 Berry St #5700 ross@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
On Tue, Jun 27, 2006 at 02:31:02PM -0700, Ross Boylan wrote:> On Mon, 2006-06-26 at 14:12 +0200, Marc Haber wrote: > > 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).Hmmm. Any idea how to explain this better?> 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.Yes, that''s an entirely valid possibility. I cannot comment about that, since all my boxes have fixed IP addresses and valid hostnames and I have thus never needed nor used the "hide local mail name" option. Since I didn''t write this particular part of the config, and we stayed pretty close to what exim 3 did, I can''t judge whether this option makes any sense. Andreas, can you say something about this?> > > 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.Very interesting. Can you explain exactly what happened? Did you have betterworld.us in local_domains at this time?> 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@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@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.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. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
On Wed, 2006-06-28 at 11:09 +0200, Marc Haber wrote:> On Tue, Jun 27, 2006 at 02:31:02PM -0700, Ross Boylan wrote: > > On Mon, 2006-06-26 at 14:12 +0200, Marc Haber wrote: > > > 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). > > Hmmm. Any idea how to explain this better?Without having the templates in front of me, this is hard. 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. 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, ....).> > > 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. > > Yes, that''s an entirely valid possibility. I cannot comment about > that, since all my boxes have fixed IP addresses and valid hostnames > and I have thus never needed nor used the "hide local mail name" > option. Since I didn''t write this particular part of the config, and > we stayed pretty close to what exim 3 did, I can''t judge whether this > option makes any sense. > > Andreas, can you say something about this? > > > > > 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. > > 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?> > > 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@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@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. > > 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, 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, and so appeared to be sending from and to betterworld.us, not corn.betterworld.us. I deliberately didn''t want corn picking up mail to betterworld.us, so it passed it on appropriately. I''ve subsequently modified the routers so I get a local copy (local on corn) as well. Another thing I left out is that the new system (corn) was basically only getting its internal mail. Almost all my mail continued to go to my "production" system. Ross
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?> 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?> 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.> > 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).> > 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.> 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.> and so appeared to be > sending from and to betterworld.us, not corn.betterworld.us. I > deliberately didn''t want corn picking up mail to betterworld.us, so it > passed it on appropriately.That is a possible explanation.> Another thing I left out is that the new system (corn) was basically > only getting its internal mail. Almost all my mail continued to go to > my "production" system.>From my understanding, that was the intended behavior, as DNS mailrouting was not yet changed? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
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@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.
Hi, On Fri, Jun 30, 2006 at 09:06:09PM -0700, Ross Boylan wrote:> Perhaps this dicussion should move to -dev? > Redirect as you see fit.Agreed, done. -devel, this is a discussion from -users regarding the debconf templates. Please see the -users archives for the beginning.> 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."More in there"? Is that good or bad?> > > 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.Yes, we need to pay special attention to that in the re-work. I hope that we can get rid of at least one of these questions.> > > 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 :)Yes, but not at this time of Debian release. One possible solution would be a package "etc-mailname" which all packages using /etc/mailname could depend on. That way, we wouldn''t put any more burden on the installer people.> 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.There are situations where one might want to have messages qualified with some other domain part, for example in a pool of workstation machines.> 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.Yes, and not immediately after each other. exim4/mailname is step 8, exim4/hide_mailname is step 25 in /var/lib/dpkg/info/exim4-config.config.> *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@example.com, where the part > after the @ sign is called the "domain."Extra points for getting rid of the "host name" string, as RFC2821 and 2822 say "Domain" as well.> 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.To "create" or "generate" 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?No, that is going to create all kinds of strange issues.> An empty response implies > what--use exim''s primary hostname and its attendant fall-backs? another > interpretation would be "do not permit unqualified addresses".]The answer to the mailname question is intialized with the following code: if [ "x${dc_mailname}" = "x" ] ; then dc_mailname=hostname --fqdn || dc_mailname=hostname && \ dc_mailname=printf ''%s\n'' "${dc_mailname}" | stripwhitespace && \ db_set exim4/mailname "${dc_mailname}" fi If the user decides to delete the mailname, this ends up verbatim in the configuration file, and I am not sure how exim reacts to this. It could treat the empty string as "undefined", falling back to primary_hostname, or it could take the empty string verbatim, creating illegal mail adresses.> --------------------------------------------------- > 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".>From what I reckon from exim4-config.config, I suspect that is is onlyasked in a smarthost config and always assumed "yes" in a satellite config.> 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.Yes, if hide_mailname true, we have DEBCONFheaders_rewriteDEBCONF=''headers_rewrite = *@+local_domains $1@DCreadhost frs : *@''"$mailname"'' $1@DCreadhost frs'' DEBCONFreturn_pathDEBCONF=''return_path = ${if match_domain{$sender_address_domain}{+local_domains}{${sender_address_local_part}@DCreadhost}{${if match_domain{$sender_address_domain}{''"$mailname"''}{${sender_address_local_part}@DCreadhost}fail}}}''> 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.Good.> > > > 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.This might have been the cause for your exims behavior.> > > 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.Thanks. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835