From: Gary V <li...@jo...> - 2006-06-30 14:23:46
|
Michael wrote: > Hi, > I have the following config in my amavisd.conf > @bypass_spam_checks_maps = (read_hash("/etc/postfix/bypass_spam_checks") ); > @spam_lovers_maps = ( read_hash("/etc/postfix/spam_lovers") ); > /etc/postfix/bypass_spam_checks: > [...] > domain1.com bypass > [...] The 'bypass' will translate to 1 (true). I'm not sure where you got that syntax (but it is not actually broken). read_hash will assume the RHS is a 1 if it is missing, so it is typical to use either: domain1.com or domain1.com 1 I have to assume you are entering recipient domain, not sender domain (this is not the mechanism used to whitelist a sender). Double check the recipient's address - this will match us...@do... but not us...@ho.... In that case you could add a wildcard: .domain1.com 1 FYI, You could exempt a single user in that domain by using: us...@ex... 0 example.com 1 > /etc/postfix/spam_lovers > [...] > us...@do... bypass > [...] Same deal. > Both maps are created using postmap. No point in that (unless Postfix is using the file too) - amavisd-new reads the plain text file - not a postmapped database file. amavisd-new is not Postfix. > My questions are > 1) How do I verify if the maps are working. Mail for domains and > emails listed in the maps still get tagged by amavis. Temporarily raise $log_level to 5 and read what transpires in the log. grep bypass /var/log/maillog Jun 30 08:06:58 mail amavis[4286]: (04286-01) lookup (bypass_spam_checks) => true, "us...@ex..." matches, result="bypass", matching_key="us...@ex..." > 2) Does spam_lovers just lover the over-all score, or does it bypass > spamassassin completely? Neither. It allows spam to pass regardless of score. When bypassing, if mail is addressed to multiple users, and another recipient's mail is not bypassed, then spam scanning will still take place. That is why any user/domain you place in the @bypass_spam map should also be placed in the @spam_lovers map. If you do not, depending on other settings, it would be possible for mail to be blocked by the spam_check. grep lovers /var/log/maillog Also remember that amavisd must be reloaded after each change. Gary V |