[Exim] address rewrite with LDAP

Top Page
Delete this message
Reply to this message
Author: Michael Bramer
Date:  
To: exim-users
Subject: [Exim] address rewrite with LDAP
--
Hello

I configure a exim mail server with LDAP support and this server is
running. But I have one problem and maybe someone can help...


The user database is in ldap and we use short uid (like 'mb' for
'Michael Bramer'). We can post Mails to this uid's (aka mb@???).

But outsite of the intranet we use a more verbose, long form (like
M.Bramer@???). I use this config in the outgoing
smtp-transporter, to rewrite the email address in the outgoing mails:
remote_smtp:
  driver = smtp
  headers_rewrite = *@domain.com    "${lookup ldap{ldap::///uid=${1},ou=People,dc=domain,dc=com?mail}{$value}fail}"
  hosts = smtp.provider.com


This work nice.

But I have a problem with incomming mails to the long form. If the
server get some mails to M.Bramer@???, the server say 'No such
user'. Ok, this is right, but the server should rewrite the address to
the short form.

I make this:
*@domain.com       ${lookup{$1} ldapm{ldap::///ou=People,dc=mbnet?uid(mail=${quote_ldap:$1@???}){$value}fail}}@???


But this don't work... Maybe someone has a working config or a better
approach?!

I also try some address rewriteing in a ROUTER, but this don't work
also.

Thanks


Gruss
Grisu
--
Michael Bramer  -  a Debian Linux Developer      http://www.debsupport.de
PGP: finger grisu@???  -- Linux Sysadmin   -- Use Debian Linux
Windows kann kein Virus sein. Ein Virus ist in der Regel klein,
effizient und verrichtet seine Arbeit ohne dabei abzuschmieren.
--
[ Content of type application/pgp-signature deleted ]
--