man, 2002-10-21 kl. 19:07 skrev Peter Farmer:
> I'm working a config for an Exim 4.10 server, the basic idea is that after
> the rcpt to: the Exim server checks to see if the email address is valid by
> querying an LDAP database. The email won't be delivered locally on the Exim
> server but forwarded onto another server, all I'm doing is checking the
> recipient is valid. I'm pretty sure this is possible, but can't work out
> how. Does anyone have any idea's?
I do it like this, it's been in use for several months and for me it
works perfectly under Openldap/SSL, tested from 2.1.3 up to 2.1.6:
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: evolutionPerson <--- Ximian's Evolution
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetLocalMailRecipient
Under ROUTERS:
mail_redirect:
driver = redirect
allow_fail
allow_defer
data = ${lookup ldapm {ldaps://localhost/\
dc=billy,dc=demon,dc=nl?mailRoutingAddress?sub?\
(&(objectClass=inetlocalMailRecipient)(uid=$local_part))\
}\
{$value} fail }
# user = exim
file_transport = address_file
pipe_transport = address_pipe
It's called "mail_redirect", since it also redirects mail for users who
have their accounts on other machines / in other mail domains. I have a
separate router for Lachmann-Laser based system aliases, which works
more or less the same and comes after this one.
Above it I have this comment:
## This router handles ldap-based aliases
#
# Obviously ldap has to be configured and running before it will work.
# Make sure that it comes before any local routers, including
# Spamassassin,
# since subseqent to these it will use the standard /etc/ldap.conf
# filter
# and it expressly uses its own filter *before* the standard filter is
# called.
Success,
Tony
--
Tony Earnshaw
Could have been Henrik Ibsen's, Ole Bull's,
Henrik Wergelands's, Camilla Collet's and more's
last words, but weren't: «Fanden helder, helder
det at have sadset, end det at ikke have sadset
i det hele taget.»
e-post: tonni@???
www: http://www.billy.demon.nl