Domains issue

Mark Martinec Mark.Martinec+amavis at ijs.si
Tue Apr 26 18:18:17 CEST 2016


Quanah Gibson-Mount wrote:

> In dealing with a problem with disclaimers, I noticed that amavis is 
> not
> really optimized for multi-domain installations.  In the conf file I 
> find:
> 
> $mydomain = 'example.com';   # a convenient default for other settings
> 
>  and
> 
> @local_domains_maps = ( [".$mydomain"] );  # list of all local domains
> 
> While this probably is fine for most installations, we have customers 
> who
> anywhere from one domain to > 1500 domains.  This becomes problematic 
> in
> particular when disclaimers are in use.  Clearly, I can modify the conf
> file as necessary, but it'd be great if I could have amavis actually 
> pull
> my domains out of LDAP, for example, so I didn't have to hack the conf
> file at all.  Has there been thought on implementing something along
> these lines?  I.e., a generic database mechanism, so LDAP, SQL, etc, 
> can
> be used for pulling in the domain list?

> Note that this would allow for real-time updates to domains considered 
> local,
> w/o having to restart amavis, if implemented properly.

If LDAP is enabled in amavisd, a LDAP query for a boolean attribute
'amavisLocal' is implicitly prepended to the @local_domains_maps.

attributetype ( 1.3.6.1.4.1.15312.2.2.1.19
   NAME 'amavisLocal'
   DESC 'Is user considered local'
   EQUALITY booleanMatch
   SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
   SINGLE-VALUE )

So for every recipient (his full e-mail address or just a domain
or subdomain part) this information is already obtained from
LDAP, you just need to provide this information. In absence of
this attribute from LDAP, the lookup continues the search through
remaining lookup entries in the @local_domains_maps list.

(and similarly for SQL, where a field name 'local' is queried)

So what you are asking is already there.

   Mark


More information about the amavis-users mailing list