[Exim] determining verify=recipient with LDAP

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Stephen Gran
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] determining verify=recipient with LDAP
Hello all,

We're getting ready to move a domain over to LDAP and exim4 frontend
mail machines. The set up we're aiming for is (couldn't resist some
ASCII art, sorry :)

                           -------------------
                          |      Internet     |
                           -------------------
                           |                 |
                   -------------       -------------
                  | Front end 1 |     | Front end 2 |
                   -------------       -------------
                               |       |
                           -----------------
                          | POP/IMAP server |
                           -----------------


The idea is, users will check their mail on the pop/imap server, but no
mail should ever be received directly there, only from the front-end
machines. They do all the work of scanning, handling aliases, etc. I
have set the manual routes up for this, and right now I am testing it
with a verify=recipient/callout,defer=ok line in the acl. What I would
like to do is instead of making an smtp connection, verify the recipient
against an LDAP database that is being set up. Anyone know of any quick
way to do this? All I can think of is this in the router:

relay_manualroute:
   driver = manualroute
   domains = +relay_to_domains
   transport = remote_smtp
   route_data = ${lookup{$domain}lsearch{CONFDIR/mailertable}}
   local_parts = ${lookup ldap {user=\"${lookup \
                 ldapdn{ldap://localhost/ou=People,dc=example,dc=com?uid?sub?\
                 (&(uid=$localpart))}}"{yes}{no}}


But I think my syntax is subtly wrong, and I want to be sure it will
fail if the user is not found. Any suggestions about fixups?

Thanks,
--
--------------------------------------------------------------------------
|  Stephen Gran                  | The Golden Rule is of no use to you     |
|  steve@???             | whatever unless you realize it is your  |
|  http://www.lobefin.net/~steve | move.   -- Frank Crane                  |

--------------------------------------------------------------------------