[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: root doesn't (and hasn't) rec'd mail in a long time



"Hall Stevenson" <hallstevenson@mindspring.com> writes:
> * Gary Hennigan (glhenni@sandia.gov) [030513 18:26]:
> [snip]
> > In the past I've been bitten by the fact that I've set the mailer up
> > to add my domain to addresses in which no domain is specified. This is
> > fine for most email, but for root that may mean it gets sent to the
> > root account on your domains mail handler. For example composing a
> > message to "root" on my workstation and sending it, exim would
> > actually send it to "root@sandia.gov". This promptly gets sent off to
> > the root account on the MX handler for sandia.gov, which, thankfully,
> > isn't my workstation, but that's obviously not correct behavior as I
> > want it to stay on my workstation.
> 
> Uh oh... Just sent a mail to "root" and saw this in my exim log:
> 
>     2003-05-13 18:35:59 19FiNL-0001mX-00 <= root@mindspring.com U=root
>     P=local S=459 id=20030513223559.GA6846@mindspring.com
>     2003-05-13 18:36:00 19FiNL-0001mX-00 => root@mindspring.com
>     R=smarthost T=remote_smtp H=mail.mindspring.com [207.69.200.110]
>     2003-05-13 18:36:00 19FiNL-0001mX-00 Completed
> 
> I guess that answers it, huh ??
> 
> I think I know why too. If I send a message to my wife and don't
> complete the address (or mutt doesn't read it fully and look up her
> alias), it ends up going to "amy@mindspring.com". That's *not* her
> e-mail address. Exim, I believe, is adding 'mindspring.com', isn't it ??
> 
> It's this setting, isn't it ?

Yep. Exactly what I've been bitten by in the past, as explained in my
first reply.

>     # Specify the domain you want to be added to all unqualified
>     # addresses
>     # here. Unqualified addresses are accepted only from local callers
>     # by
>     # default. See the receiver_unqualified_{hosts,nets} options if you
>     # want
>     # to permit unqualified addresses from remote sources. If this
>     # option is
>     # not set, the primary_hostname value is used for qualification.
> 
>     qualify_domain = mindspring.com
> 
> Is that necessary ?? If not, can I completely remove it or change it to
> what ??

What I did was add a rewrite rule that looks for root@mindspring.com,
for example, and changes it, usually by reading the file
"/etc/email-addresses". Under the "REWRITE CONFIGURATION" in the
exim.conf file the rule(s) looks like:

*@sandia.gov    ${lookup{$1}lsearch{/etc/email-addresses}\
						{$value}fail} hE
*@myhostname.*	${lookup{$1}lsearch{/etc/email-addresses}\
						{$value}fail} hE

and my /etc/email-addresses file contains:

        root: glhenni@sandia.gov

I believe /etc/email-addresses is part of the standard install. 

You also might be able to change "qualify_domain = mindspring.com" to
"qualify_domain = localhost", but that might cause problems,
especially if you're running your own LAN, because, I believe, it'll
change things like: someone@myhost to someone@myhost.localhost. Of
course if you are running your own LAN then you could just change
mindspring.com to your local LAN domain name.

Gary



Reply to: