Stefan,

> My amavis-configuration contains the following setting:
> @local_domains_maps = (
>   read_hash("/etc/postfix/localhost"),
>   read_hash("/etc/postfix/virtualdomains")
> );
> 
> The file localhost contains all names of the current host (e.g.
> "localhost", "mail.example.com" etc.). The file virtualdomains
> contains all postfix virtual domains this host is responsible
> for.
> 
> The file virtualdomains is used by both postfix and amavisd-new,
> so when I add a new virtual domain, I have to change only this
> file, so postfix will accept mails to this domain, and amavisd-new
> will handle this domain as a local one (i.e. adding spam tags
> to mails targeted to this domain etc.).
> 
> Now I have moved all my virtual-domain and virtual-alias definition
> into an LDAP server, so postfix does no longer use file-based lookups,
> but searches for this information in LDAP.
> 
> Is there a way to make amavisd-new use these LDAP based virtual-domain
> information, too?

Yes there is:

README_FILES/README.ldap


Special handling of optional LDAP attribute 'amavisLocal'
---------------------------------------------------------

A special shorthand is provided when LDAP lookups are used: when a match
for a recipient address (or domain) is found in LDAP tables (regardless of
attribute values), the recipient is considered local, regardless of static
@local_domains_acl or %local_domains lookup tables. This simplifies
life when a large number of dynamically changing domains is hosted.

To overrule this behaviour, have an explicit boolean attribute 'amavisLocal'
with a value of True returned for each local domain, and False for other
domains which might be present in LDAP for some reason, but are nonlocal.

In general LDAP lookups are similar to SQL lookups except for the low level
LDAP/SQL specific code. The overall functionality, lookup rules, etc. are
identical.




So, it usually suffices to just provide any attribute for each local
domain, and defaults will suffice.

  Mark

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-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/ 

Reply via email to