Re: [exim] Exim sees LDAP users as local

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Simon Wilson
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Exim sees LDAP users as local
Did a bit more digging...

"exim -d -bt simon@???" returns some useful info:

BTW, server hostname is server00.simonandkate.lan

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Testing simon@???
address match: subject=simon@??? pattern=*@localhost.localdomain
domain.net in "localhost.localdomain"? no (end of list)
simon@??? in "*@localhost.localdomain"? no (end of list)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Considering simon@???
>>>>>>>>>>>>>>>>>>>>>>>

routing simon@???
--------> system_aliases router <--------
...
...cut to the result...
system_aliases router declined for simon@???
--------> userforward router <--------
local_part=simon domain=simonandkate.net
checking for local user
seeking password data for user "simon": cache not available
getpwnam () succeeded uid=xxx gid=xxx
calling userforward router
...
...
/home/simon/.forward does not exist
userforward router declined for simon@???
--------> procmail router <--------

etc

Last one is:

--------> localuser router <--------
this accepts it and files for local delivery.

This results for simon@ anything the same... ends up local delivered. So do I need to be calling the SMTP relay router before local user router? Is there a recommended order in which the routers should be called?

Should my SMTP relay be inserted after the system_aliases router but before the local routers?

Simon

Quoting "Simon Wilson" <simon@???>:

> I have 3 CentOS 5.2 servers with Exim 4.63. They are not the primary
> mail server for our internal LAN. They run Exim and send system
> emails to root, with an alias "root: simon@???" so my real
> email account gets root mail.
>
> They therefore have an SMTP relay set up in the routing configuration
> to forward all mail not for localhost (which is everything, as they
> have no 'real' local users) to a single internal relay that has
> external SMTP access. This has been working fine for a while, i.e.
> Exim saw that simon@??? was not local, and passed the emails
> out to the SMTP relay.
>
> I have now installed LDAP on the network, and the servers have been
> configured as LDAP clients. The LDAP entry for simon includes my real
> email address.
>
> Problem: Mail to root aliased to simon@??? is now seen as
> being local. Log entry is as follows:
>
> ... => simon <root@???> R=localuser T=local_delivery
>
> It seems as though Exim sees that simon (it throws away the domain
> name, even though the domain is not in the exim.conf local domains)
> IS now a valid local user (albeit an LDAP one) and tries to deliver
> locally. These emails have now vaporized... :(
>
> getent passwd simon correctly returns the LDAP user. How does Exim
> check whether the user is local? And why is it seeing
> simon@???[1] as only 'simon' without the domain?
>
> Exim.conf is standard except for the route to SMTP relay, and a rewrite rule:
> *@localhost.localdomain $1server01.domain.lan
>
> domains = @ : localhost : localhost.localdomain
>
> If anyone could help me sort out my config that would be great
>
> Simon.
>
>
>
> Links:
> ------
> [1] mailto:simon@validdomainaddress.net
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>
>From pokui@??? Wed Mar 11 01:37:45 2009

Envelope-to: exim-users@???
Received: from mx2-svr-celtel.imul.com ([41.190.128.30]:42504)
    by tahini.csx.cam.ac.uk with esmtp (Exim 4.69)
    (envelope-from <pokui@???>) id 1LhDOC-0000uM-4o
    for exim-users@???; Wed, 11 Mar 2009 01:37:45 +0000
Received: from [41.222.4.68] by mx2-svr-celtel.imul.com with esmtpa (Exim 4.67)
    (envelope-from <pokui@???>)
    id 1LhDO9-0005ZG-9V; Wed, 11 Mar 2009 04:37:41 +0300
From: Patrick Okui <pokui@???>
To: Simon Wilson <simon@???>
In-Reply-To: <20090311112512.13421zacgksukx7o@???>
X-Mailer: iPhone Mail (5H11)
References: <20090311103551.499158hqtxwwevks@???>
    <20090311112512.13421zacgksukx7o@???>
Message-Id: <6630159C-E15D-441B-9BDE-4CB944ECBD66@???>
Content-Type: text/plain;
    charsetÃ-ascii;
    format\owed;
    delspžs
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (iPhone Mail 5H11)
Date: Wed, 11 Mar 2009 04:39:03 +0300
X-Spam-Score: -1.3 (-)
X-Spam-Status: No, scoreÑ.3 required~0 tests÷LÐ.025, BAYES_00Ñ.5,
    DNS_FROM_RFC_ABUSE.2 autolearnO version^1.8
Cc: "exim-users@???" <exim-users@???>
Subject: Re: [exim] Exim sees LDAP users as local
X-BeenThere: exim-users@???
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: A user list for the exim MTA <exim-users.exim.org>
List-Unsubscribe: <http://lists.exim.org/mailman/listinfo/exim-users>,
    <mailto:exim-users-request@exim.org?subject¾subscribe>
List-Archive: <http://lists.exim.org/lurker/list/exim-users.html>
List-Post: <mailto:exim-users@exim.org>
List-Help: <mailto:exim-users-request@exim.org?subjectŽlp>
List-Subscribe: <http://lists.exim.org/mailman/listinfo/exim-users>,
    <mailto:exim-users-request@exim.org?subject¥bscribe>
X-List-Received-Date: Wed, 11 Mar 2009 01:37:45 -0000




On 11 Mar 2009, at 4:25 AM, "Simon Wilson" <simon@???>
wrote:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
> This results for simon@ anything the same... ends up local
> delivered. So do I need to be calling the SMTP relay router before
> local user router? Is there a recommended order in which the routers
> should be called?


Routers are tried in the order they are listed in your conf file. The
first to accept an address wins. Unless you have "unseen" set then no
more routers are tried for this address.

> Should my SMTP relay be inserted after the system_aliases router but
> before the local routers?


Yes, but make sure it doesn't catch domains for which you want local
delivery.

--
patrick
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>