OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: advice migrating from exchange to Postfix

From: Coffey, Neal (ncoffeylangeveld.com)
Date: Tue Aug 29 2006 - 07:59:12 CDT


Matt Whitted wrote:
> 3) Although I've never tried this, you may be able to use ldap lookups
> directly off of Active Directory for relay_recipient_maps. Would be
> curious as to whether this is doable!

This is entirely possible. Personally, I did it with a perl-based
policy server, because I wanted to exclude certain addresses (internal
mailing lists) from being verified. It was easy since they all start
with "_" or "^" (so they get alphabetized to the top). (This approach
also let me avoid re-compiling Postfix with LDAP support.)

Either way (built in or external), the query string you want would look
something like:

query_filter = (&(objectClass=user)(proxyAddresses=SMTP:%s))

If you also want the query to check if an account is disabled, it's
unfortunately not a simple true/false. You'd need to do a bitwise
AND/OR on the userAccountControl field and the number 2.