Hi Quanah, I don't have a solid answer for you, as I've not implemented this for amavisd-new, but maybe I can point you in the right direction. I modified some existing Perl scripts that were originally intended to poll AD for a list of accepted e-mail aliases to also get a list of accepted domains for Exchange. Exchange stores a lot of its config in AD, so this wasn't too tough.
The list of accepted domains in an Exchange environment (at least for 2007) is found at "CN=Accepted Domains,CN=Transport Settings,CN=[your exchange org name],CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=i-worx,DC=ca". The accepted domain object has an objectCategory of " msExchAcceptedDomain" and the actual domain name is stored in the "msExchAcceptedDomainName" attribute of that object. For our Postfix purposes we pull the complete list of accepted domains (extracting only their "msExchAcceptedDomainName" value, print that into a file, postmap it, and give it to Postfix as its accepted domains list. The perl script is cron'd to run every 15 minutes, as we don't want to bounce stuff that's already being accepted on the Exchange side just because Postfix had not yet been updated. I don't know if that's useful to you as you were referring just to LDAP in general rather than to an Exchange environment in particular, but hopefully it's of some use. Date: Mon, 02 Feb 2009 11:50:46 -0800 From: Quanah Gibson-Mount <qua...@zimbra.com> Subject: Re: [AMaViS-user] @local_domains_maps and LDAP To: Mark Martinec <mark.martinec+ama...@ijs.si>, amavis-user@lists.sourceforge.net Message-ID: <dddee8ea46064f41e865e...@[192.168.1.199]> Content-Type: text/plain; charset=us-ascii; format=flowed --On Monday, February 02, 2009 9:40 AM -0800 Quanah Gibson-Mount <qua...@zimbra.com> wrote: > The question comes from our desire to not put X-SPAM headers on local > domains, usually listed in @local_domains_maps. This becomes a problem, > however, in an environment where you're hosting thousands of domains, as > having to continually modify and update a static list of domains becomes > quite ugly. What is desired is to instead have amavis populate what it > considers to be the members of @local_domain_maps from LDAP instead. So, > is that possible? ;) Well, really all amavis needs to do is be able to query whether or not a given domain should be considered local, rather than having a stored list of domains. --Quanah ________________________________ Hugo Slabbert ________________________________ ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/