[Mimedefang] Validating Exchange addresses

Kenneth Porter shiva at sewingwitch.com
Mon Oct 6 19:28:00 EDT 2003


Inspired by some samples, I've come up with the following one liner that seems
to get all addresses from an Exchange server:

ldapsearch -h "$server" -x -P2 -s sub "objectclass=*" | awk '/^mail:/{print
$2;}'

(Substitute the address of your server for $server.)

I expect I can run this periodically from a cron job and massage it into a
more suitable lookup format for MD or other MTA's.

Is this going to miss anything? Is there a more efficient way to make the
query? (I'm an LDAP newb with only the glossiest idea of its query system.)



More information about the MIMEDefang mailing list