Joel, > I'm trying to determine how amavis handles hard Whitelist and Blacklist > precedence, particular when stored in LDAP. I noticed a thread from a > few years back (http://marc.info/?l=amavis-user&m=113106620716796&w=2) > regarding sql lookups, but I'm not sure it applies to LDAP. I also > noticed the following throughout the code, in the context of kill level > and dsn_cutoff_level: > > ($r->recip_blacklisted_sender && !$r->recip_whitelisted_sender) > > This leads me to believe that whitelist always takes precedence.
Yes, this is usually the case, although in the past there have been some inconsistencies and changes there. In the early versions whitelisting only ensured delivery, and blacklisting popped up the score, so when both were true, a message was flagged as spam and delivered. > Specifically, what is the behavior in the following situations when the > recipient is [EMAIL PROTECTED] We're using amavisd-new-2.4.3 (I know, > we attempted an upgrade recently and ran into memory issues that have > yet to be resolved) > > WL: [EMAIL PROTECTED], BL: @example.com > WL: @example.com, BL: [EMAIL PROTECTED] > WL: [EMAIL PROTECTED], BL: [EMAIL PROTECTED] Grep the log (at log level 5) for a string "wbl: (LDAP)" for the ultimate answer. The subroutine white_black_list on a LDAP lookup searches for multivalued attributes amavisBlacklistSender and amavisWhitelistSender containing sender addresses (see README.ldap) - for each recipient according to query_filter. The lookup is independent for white and for blacklists, and sets $r->recip_blacklisted_sender and $r->recip_whitelisted_sender(1) properties for this recipient. Both properties may be true if sender is found in both lists. Typical an expression like: !$whitelisted && ($blacklisted || ... ) is used in determining tag2 and kill triggers, so whitelisting takes precedence, as you noted. So to answer your specific question, with LDAP w/b-list lookups in all three cases the sender would be both white- and blacklisted, and in the next step whitelisting would prevail. The SQL white/black-listing is more flexible in this regard, as it uses only one search list (table) for both the white- and the blaclist entries (each entry specifying either 'W' or 'B'), and the search stops at the first (most specific address) matching entry, and the entry then tells whether it is a W or a B. So in SQL case it can not happen that a sender would be both white- and blacklisted. Mark ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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/
