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.netFrom pokui@??? Wed Mar 11 01:20:30 2009
Envelope-to: exim-users@???
Received: from mx2-svr-celtel.imul.com ([41.190.128.30]:47177)
by tahini.csx.cam.ac.uk with esmtp (Exim 4.69)
(envelope-from <pokui@???>) id 1LhD7O-000832-DR
for exim-users@???; Wed, 11 Mar 2009 01:20:30 +0000
Received: from [41.222.4.68] by mx2-svr-celtel.imul.com with esmtpa (Exim 4.67)
(envelope-from <pokui@???>)
id 1LhD7B-0005Q6-7X; Wed, 11 Mar 2009 04:20:09 +0300
From: Patrick Okui <pokui@???>
To: Simon Wilson <simon@???>
In-Reply-To: <20090311103551.499158hqtxwwevks@???>
X-Mailer: iPhone Mail (5H11)
References: <20090311103551.499158hqtxwwevks@???>
Message-Id: <95D0EFF6-3E5E-475A-B126-01E52D053CA7@???>
Content-Type: text/plain;
charsetÃ-ascii;
format\owed;
delsps
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (iPhone Mail 5H11)
Date: Wed, 11 Mar 2009 04:21:31 +0300
X-Spam-Score: -1.0 (-)
X-Spam-Status: No, scoreÑ.0 required~0 tests÷LÐ.700, BAYES_20Ð.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?subjectlp>
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:20:30 -0000
On 11 Mar 2009, at 3:35 AM, "Simon Wilson" <simon@???>
wrote:
> 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?
Try running exim -d -bt simon@???. That should show
you why it believes it should route the email via your localrouter.
--
patrick