Nicklas wrote:

>> -----Original Message-----
>> From: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] On Behalf Of Gary V
>> Sent: den 12 oktober 2005 03:09
>> To: [email protected]
>> Subject: Re: [AMaViS-user] Negative read_hash?
>> 
>> Gary wrote:
>> 
>> > Nicklas wrote:
>> 
>> >> Thanks!
>> 
>> >> I only need to match the domain. And, I was planning to 
>> use qmail's 
>> >> default rcpthosts file as the base template (spam_lovers_maps) for 
>> >> the domains and any exceptions to the base config should 
>> go into the 
>> >> spam_haters file (default should be to pass spam).
>> 
>> >> Any ideas for such setup?
>> 
>> >> Thanks,
>> >> Nicklas
>> 
>> > I assume then that the /lovers will contain a list of 
>> domains. This works.
>> 
>> > You simply have to manually add full email addresses to the haters 
>> > file, followed by a zero. Haters will be read first, because it is 
>> > listed first. If a match is found, the search should end there. The 
>> > period at the end means "everyone not listed is also a lover".
>> 
>> > @spam_lovers_maps = ( read_hash("/spam_haters"), 
>> > read_hash("/spam_lovers"), "." );
>> 
>> > /haters
>> > [EMAIL PROTECTED] 0
>> 
>> > /lovers
>> > example.com
>> 
>> My last reply was rushed and possibly inaccurate. I think the "."
>> should have been a 1.
>> 
>> @spam_lovers_maps = ( read_hash("$MYHOME/spam_haters"), 1 );
>> 
>> May be better. If all domains will be spam_lovers by default, 
>> then there is no need to look them up, simply make everyone a 
>> lover, and list only the exceptions.
>> 
>> Contents of the spam_haters file:
>> 
>> # we have set @spam_lovers_maps = ( 
>> read_hash("$MYHOME/spam_haters"), 1 ); # which means everyone 
>> is a spam lover by default. If you would like to # exclude a 
>> particular user from being a spam lover, include them in # 
>> this associative array using a 0 for the value. For example:
>> # [EMAIL PROTECTED] 0
>> #
>> [EMAIL PROTECTED] 0

> Could you define a domain in the haters file instead of the whole email
> adress? 

> Like: 
> example.com 0

> ?

> Thanks,
> Nicklas

Yes, of course. Typically you would also include subdomains:

.example.com 0

You could also make any number of users in that domain spam_lovers, if
you needed to make exceptions for them:

[EMAIL PROTECTED]
[EMAIL PROTECTED]
.example.com 0

From:
http://www.ijs.si/software/amavisd/README.lookups.txt

Hash lookups (e.g. for [EMAIL PROTECTED]) are performed in the
following order:
 - lookup for [EMAIL PROTECTED] (only if $recipient_delimiter is '+')
 - lookup for [EMAIL PROTECTED]
 - lookup for user+foo@ (only if $recipient_delimiter is '+')
 - lookup for user@
 - lookup for sub.example.com
 - lookup for .sub.example.com
 - lookup for .example.com
 - lookup for .com
 - lookup for .

Gary V



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
AMaViS-user mailing list
[email protected]
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