You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2022/04/17 15:46:19 UTC
svn commit: r1899950 - in /spamassassin/branches/trunk-welcomelist/rules: 20_vbounce.cf 60_welcomelist.cf 60_welcomelist_auth.cf 60_welcomelist_dkim.cf 60_welcomelist_spf.cf 60_welcomelist_subject.cf
Author: hege
Date: Sun Apr 17 15:46:19 2022
New Revision: 1899950
URL: http://svn.apache.org/viewvc?rev=1899950&view=rev
Log:
Simplify conditionals and fix some welcomelistifies
Modified:
spamassassin/branches/trunk-welcomelist/rules/20_vbounce.cf
spamassassin/branches/trunk-welcomelist/rules/60_welcomelist.cf
spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_auth.cf
spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_dkim.cf
spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_spf.cf
spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_subject.cf
Modified: spamassassin/branches/trunk-welcomelist/rules/20_vbounce.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/rules/20_vbounce.cf?rev=1899950&r1=1899949&r2=1899950&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/rules/20_vbounce.cf (original)
+++ spamassassin/branches/trunk-welcomelist/rules/20_vbounce.cf Sun Apr 17 15:46:19 2022
@@ -48,17 +48,15 @@
#
###########################################################################
+ifplugin Mail::SpamAssassin::Plugin::VBounce
+
+
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::VBounce
- body __MY_SERVERS_FOUND eval:check_welcomelist_bounce_relays()
- endif
-else
- ifplugin Mail::SpamAssassin::Plugin::VBounce
- body __MY_SERVERS_FOUND eval:check_whitelist_bounce_relays()
- endif
+ body __MY_SERVERS_FOUND eval:check_welcomelist_bounce_relays()
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ body __MY_SERVERS_FOUND eval:check_whitelist_bounce_relays()
endif
-
-ifplugin Mail::SpamAssassin::Plugin::VBounce
body __HAVE_BOUNCE_RELAYS eval:have_any_bounce_relays()
@@ -335,4 +333,6 @@ describe VBOUNCE_MESSAGE Virus-scanne
meta ANY_BOUNCE_MESSAGE (CRBOUNCE_MESSAGE||BOUNCE_MESSAGE||VBOUNCE_MESSAGE||OOOBOUNCE_MESSAGE)
describe ANY_BOUNCE_MESSAGE Message is some kind of bounce message
-endif
+
+endif # Mail::SpamAssassin::Plugin::VBounce
+
Modified: spamassassin/branches/trunk-welcomelist/rules/60_welcomelist.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/rules/60_welcomelist.cf?rev=1899950&r1=1899949&r2=1899950&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/rules/60_welcomelist.cf (original)
+++ spamassassin/branches/trunk-welcomelist/rules/60_welcomelist.cf Sun Apr 17 15:46:19 2022
@@ -21,6 +21,8 @@
# limitations under the License.
# </...@LICENSE>
+ifplugin Mail::SpamAssassin::Plugin::WLBLEval
+
###########################################################################
# Welcomelist rules
#
@@ -29,197 +31,168 @@
# user slip-up could result in scribbling side-effects in the bayes
# db as a result -- which is hard to remedy.
+# 4.0 / Bug 7826 renames whitelist to welcomelist and blacklist to blocklist
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
-
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- header USER_IN_BLOCKLIST eval:check_from_in_blocklist()
- describe USER_IN_BLOCKLIST From: user is listed in the block-list
- tflags USER_IN_BLOCKLIST userconf nice noautolearn
- score USER_IN_BLOCKLIST 0.01
-
- meta USER_IN_BLACKLIST (USER_IN_BLOCKLIST)
- describe USER_IN_BLACKLIST DEPRECATED: See USER_IN_BLOCKLIST
- tflags USER_IN_BLACKLIST userconf nice noautolearn
- score USER_IN_BLACKLIST 100.0
- endif
-else
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- header USER_IN_BLOCKLIST eval:check_from_in_blacklist()
- describe USER_IN_BLOCKLIST From: user is listed in the block-list
- tflags USER_IN_BLOCKLIST userconf nice noautolearn
- score USER_IN_BLOCKLIST 0.01
-
- meta USER_IN_BLACKLIST (USER_IN_BLOCKLIST)
- describe USER_IN_BLACKLIST DEPRECATED: See USER_IN_BLOCKLIST
- tflags USER_IN_BLACKLIST userconf nice noautolearn
- score USER_IN_BLACKLIST 100.0
- endif
+ header USER_IN_BLOCKLIST eval:check_from_in_blocklist()
+ describe USER_IN_BLOCKLIST From: user is listed in the block-list
+ tflags USER_IN_BLOCKLIST userconf nice noautolearn
+ score USER_IN_BLOCKLIST 0.01
+
+ meta USER_IN_BLACKLIST (USER_IN_BLOCKLIST)
+ describe USER_IN_BLACKLIST DEPRECATED: See USER_IN_BLOCKLIST
+ tflags USER_IN_BLACKLIST userconf nice noautolearn
+ score USER_IN_BLACKLIST 100.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_BLOCKLIST eval:check_from_in_blacklist()
+ describe USER_IN_BLOCKLIST From: user is listed in the block-list
+ tflags USER_IN_BLOCKLIST userconf nice noautolearn
+ score USER_IN_BLOCKLIST 0.01
+
+ meta USER_IN_BLACKLIST (USER_IN_BLOCKLIST)
+ describe USER_IN_BLACKLIST DEPRECATED: See USER_IN_BLOCKLIST
+ tflags USER_IN_BLACKLIST userconf nice noautolearn
+ score USER_IN_BLACKLIST 100.0
endif
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- header USER_IN_WELCOMELIST eval:check_from_in_welcomelist()
- describe USER_IN_WELCOMELIST User is listed in 'welcomelist_from'
- tflags USER_IN_WELCOMELIST userconf nice noautolearn
- score USER_IN_WELCOMELIST -0.01
+ header USER_IN_WELCOMELIST eval:check_from_in_welcomelist()
+ describe USER_IN_WELCOMELIST User is listed in 'welcomelist_from'
+ tflags USER_IN_WELCOMELIST userconf nice noautolearn
+ score USER_IN_WELCOMELIST -0.01
- meta USER_IN_WHITELIST (USER_IN_WELCOMELIST)
- describe USER_IN_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST
- tflags USER_IN_WHITELIST userconf nice noautolearn
- score USER_IN_WHITELIST -100.0
- endif
-else
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- header USER_IN_WELCOMELIST eval:check_from_in_whitelist()
- describe USER_IN_WELCOMELIST User is listed in 'welcomelist_from'
- tflags USER_IN_WELCOMELIST userconf nice noautolearn
- score USER_IN_WELCOMELIST -0.01
-
- meta USER_IN_WHITELIST (USER_IN_WELCOMELIST)
- describe USER_IN_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST
- tflags USER_IN_WHITELIST userconf nice noautolearn
- score USER_IN_WHITELIST -100.0
- endif
+ meta USER_IN_WHITELIST (USER_IN_WELCOMELIST)
+ describe USER_IN_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST
+ tflags USER_IN_WHITELIST userconf nice noautolearn
+ score USER_IN_WHITELIST -100.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_WELCOMELIST eval:check_from_in_whitelist()
+ describe USER_IN_WELCOMELIST User is listed in 'welcomelist_from'
+ tflags USER_IN_WELCOMELIST userconf nice noautolearn
+ score USER_IN_WELCOMELIST -0.01
+
+ meta USER_IN_WHITELIST (USER_IN_WELCOMELIST)
+ describe USER_IN_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST
+ tflags USER_IN_WHITELIST userconf nice noautolearn
+ score USER_IN_WHITELIST -100.0
endif
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- header USER_IN_DEF_WELCOMELIST eval:check_from_in_default_welcomelist()
- describe USER_IN_DEF_WELCOMELIST From: user is listed in the default welcome-list
- tflags USER_IN_DEF_WELCOMELIST userconf nice noautolearn
- score USER_IN_DEF_WELCOMELIST -0.01
-
- meta USER_IN_DEF_WHITELIST (USER_IN_DEF_WELCOMELIST)
- describe USER_IN_DEF_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST
- tflags USER_IN_DEF_WHITELIST userconf nice noautolearn
- score USER_IN_DEF_WHITELIST -15.0
- endif
-else
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- header USER_IN_DEF_WELCOMELIST eval:check_from_in_default_whitelist()
- describe USER_IN_DEF_WELCOMELIST From: user is listed in the default welcome-list
- tflags USER_IN_DEF_WELCOMELIST userconf nice noautolearn
- score USER_IN_DEF_WELCOMELIST -0.01
-
- meta USER_IN_DEF_WHITELIST (USER_IN_DEF_WELCOMELIST)
- describe USER_IN_DEF_WHITELIST DEPRECATED: See USER_IN_DEF_WELCOMELIST
- tflags USER_IN_DEF_WHITELIST userconf nice noautolearn
- score USER_IN_DEF_WHITELIST -15.0
- endif
+ header USER_IN_DEF_WELCOMELIST eval:check_from_in_default_welcomelist()
+ describe USER_IN_DEF_WELCOMELIST From: user is listed in the default welcome-list
+ tflags USER_IN_DEF_WELCOMELIST userconf nice noautolearn
+ score USER_IN_DEF_WELCOMELIST -0.01
+
+ meta USER_IN_DEF_WHITELIST (USER_IN_DEF_WELCOMELIST)
+ describe USER_IN_DEF_WHITELIST DEPRECATED: See USER_IN_WELCOMELIST
+ tflags USER_IN_DEF_WHITELIST userconf nice noautolearn
+ score USER_IN_DEF_WHITELIST -15.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_DEF_WELCOMELIST eval:check_from_in_default_whitelist()
+ describe USER_IN_DEF_WELCOMELIST From: user is listed in the default welcome-list
+ tflags USER_IN_DEF_WELCOMELIST userconf nice noautolearn
+ score USER_IN_DEF_WELCOMELIST -0.01
+
+ meta USER_IN_DEF_WHITELIST (USER_IN_DEF_WELCOMELIST)
+ describe USER_IN_DEF_WHITELIST DEPRECATED: See USER_IN_DEF_WELCOMELIST
+ tflags USER_IN_DEF_WHITELIST userconf nice noautolearn
+ score USER_IN_DEF_WHITELIST -15.0
endif
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- header USER_IN_BLOCKLIST_TO eval:check_to_in_blocklist()
- describe USER_IN_BLOCKLIST_TO User is listed in 'blocklist_to'
- tflags USER_IN_BLOCKLIST_TO userconf nice noautolearn
- score USER_IN_BLOCKLIST 0.01
-
- meta USER_IN_BLACKLIST_TO (USER_IN_BLOCKLIST_TO)
- describe USER_IN_BLACKLIST_TO DEPRECATED: See USER_IN_BLOCKLIST_TO
- tflags USER_IN_BLACKLIST_TO userconf nice noautolearn
- score USER_IN_BLACKLIST_TO 10.0
- endif
-else
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- header USER_IN_BLOCKLIST_TO eval:check_to_in_blacklist()
- describe USER_IN_BLOCKLIST_TO User is listed in 'blocklist_to'
- tflags USER_IN_BLOCKLIST_TO userconf nice noautolearn
- score USER_IN_BLOCKLIST_TO 0.01
-
- meta USER_IN_BLACKLIST_TO (USER_IN_BLOCKLIST_TO)
- describe USER_IN_BLACKLIST_TO DEPRECATED: See USER_IN_BLOCKLIST_TO
- tflags USER_IN_BLACKLIST_TO userconf nice noautolearn
- score USER_IN_BLACKLIST_TO 10.0
- endif
+ header USER_IN_BLOCKLIST_TO eval:check_to_in_blocklist()
+ describe USER_IN_BLOCKLIST_TO User is listed in 'blocklist_to'
+ tflags USER_IN_BLOCKLIST_TO userconf nice noautolearn
+ score USER_IN_BLOCKLIST 0.01
+
+ meta USER_IN_BLACKLIST_TO (USER_IN_BLOCKLIST_TO)
+ describe USER_IN_BLACKLIST_TO DEPRECATED: See USER_IN_BLOCKLIST_TO
+ tflags USER_IN_BLACKLIST_TO userconf nice noautolearn
+ score USER_IN_BLACKLIST_TO 10.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_BLOCKLIST_TO eval:check_to_in_blacklist()
+ describe USER_IN_BLOCKLIST_TO User is listed in 'blocklist_to'
+ tflags USER_IN_BLOCKLIST_TO userconf nice noautolearn
+ score USER_IN_BLOCKLIST_TO 0.01
+
+ meta USER_IN_BLACKLIST_TO (USER_IN_BLOCKLIST_TO)
+ describe USER_IN_BLACKLIST_TO DEPRECATED: See USER_IN_BLOCKLIST_TO
+ tflags USER_IN_BLACKLIST_TO userconf nice noautolearn
+ score USER_IN_BLACKLIST_TO 10.0
endif
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- header USER_IN_WELCOMELIST_TO eval:check_to_in_welcomelist()
- describe USER_IN_WELCOMELIST_TO User is listed in 'welcomelist_to'
- tflags USER_IN_WELCOMELIST_TO userconf nice noautolearn
- score USER_IN_WELCOMELIST_TO -0.01
-
- meta USER_IN_WHITELIST_TO (USER_IN_WELCOMELIST_TO)
- describe USER_IN_WHITELIST_TO DEPRECATED: See USER_IN_WELCOMELIST_TO
- tflags USER_IN_WHITELIST_TO userconf nice noautolearn
- score USER_IN_WHITELIST_TO -6.0
- endif
-else
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- header USER_IN_WELCOMELIST_TO eval:check_to_in_whitelist()
- describe USER_IN_WELCOMELIST_TO User is listed in 'welcomelist_to'
- tflags USER_IN_WELCOMELIST_TO userconf nice noautolearn
- score USER_IN_WELCOMELIST_TO -0.01
-
- meta USER_IN_WHITELIST_TO (USER_IN_WELCOMELIST_TO)
- describe USER_IN_WHITELIST_TO DEPRECATED: See USER_IN_WELCOMELIST_TO
- tflags USER_IN_WHITELIST_TO userconf nice noautolearn
- score USER_IN_WHITELIST_TO -6.0
- endif
+ header USER_IN_WELCOMELIST_TO eval:check_to_in_welcomelist()
+ describe USER_IN_WELCOMELIST_TO User is listed in 'welcomelist_to'
+ tflags USER_IN_WELCOMELIST_TO userconf nice noautolearn
+ score USER_IN_WELCOMELIST_TO -0.01
+
+ meta USER_IN_WHITELIST_TO (USER_IN_WELCOMELIST_TO)
+ describe USER_IN_WHITELIST_TO DEPRECATED: See USER_IN_WELCOMELIST_TO
+ tflags USER_IN_WHITELIST_TO userconf nice noautolearn
+ score USER_IN_WHITELIST_TO -6.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_WELCOMELIST_TO eval:check_to_in_whitelist()
+ describe USER_IN_WELCOMELIST_TO User is listed in 'welcomelist_to'
+ tflags USER_IN_WELCOMELIST_TO userconf nice noautolearn
+ score USER_IN_WELCOMELIST_TO -0.01
+
+ meta USER_IN_WHITELIST_TO (USER_IN_WELCOMELIST_TO)
+ describe USER_IN_WHITELIST_TO DEPRECATED: See USER_IN_WELCOMELIST_TO
+ tflags USER_IN_WHITELIST_TO userconf nice noautolearn
+ score USER_IN_WHITELIST_TO -6.0
endif
-ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- header USER_IN_MORE_SPAM_TO eval:check_to_in_more_spam()
- describe USER_IN_MORE_SPAM_TO User is listed in 'more_spam_to'
- tflags USER_IN_MORE_SPAM_TO userconf nice noautolearn
+header USER_IN_MORE_SPAM_TO eval:check_to_in_more_spam()
+describe USER_IN_MORE_SPAM_TO User is listed in 'more_spam_to'
+tflags USER_IN_MORE_SPAM_TO userconf nice noautolearn
- header USER_IN_ALL_SPAM_TO eval:check_to_in_all_spam()
- describe USER_IN_ALL_SPAM_TO User is listed in 'all_spam_to'
- tflags USER_IN_ALL_SPAM_TO userconf nice noautolearn
-endif
+header USER_IN_ALL_SPAM_TO eval:check_to_in_all_spam()
+describe USER_IN_ALL_SPAM_TO User is listed in 'all_spam_to'
+tflags USER_IN_ALL_SPAM_TO userconf nice noautolearn
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- body URI_HOST_IN_BLOCKLIST eval:check_uri_host_in_blocklist()
- describe URI_HOST_IN_BLOCKLIST Host or Domain is listed in the user's URI block-list
- tflags URI_HOST_IN_BLOCKLIST userconf noautolearn
- score URI_HOST_IN_BLOCKLIST -0.01
+ body URI_HOST_IN_BLOCKLIST eval:check_uri_host_in_blocklist()
+ describe URI_HOST_IN_BLOCKLIST Host or Domain is listed in the user's URI block-list
+ tflags URI_HOST_IN_BLOCKLIST userconf noautolearn
+ score URI_HOST_IN_BLOCKLIST 0.01
- meta URI_HOST_IN_BLACKLIST (URI_HOST_IN_BLOCKLIST)
- describe URI_HOST_IN_BLACKLIST DEPRECATED: See URI_HOST_IN_BLOCKLIST
- tflags URI_HOST_IN_BLACKLIST userconf noautolearn
- score URI_HOST_IN_BLACKLIST 100.0
- endif
-else
+ meta URI_HOST_IN_BLACKLIST (URI_HOST_IN_BLOCKLIST)
+ describe URI_HOST_IN_BLACKLIST DEPRECATED: See URI_HOST_IN_BLOCKLIST
+ tflags URI_HOST_IN_BLACKLIST userconf noautolearn
+ score URI_HOST_IN_BLACKLIST 100.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
if (version >= 3.004000)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
body URI_HOST_IN_BLOCKLIST eval:check_uri_host_in_blacklist()
describe URI_HOST_IN_BLOCKLIST Host or Domain is listed in the user's URI block-list
tflags URI_HOST_IN_BLOCKLIST userconf noautolearn
- score URI_HOST_IN_BLOCKLIST -0.01
+ score URI_HOST_IN_BLOCKLIST 0.01
meta URI_HOST_IN_BLACKLIST (URI_HOST_IN_BLOCKLIST)
describe URI_HOST_IN_BLACKLIST DEPRECATED: See URI_HOST_IN_BLOCKLIST
tflags URI_HOST_IN_BLACKLIST userconf noautolearn
score URI_HOST_IN_BLACKLIST 100.0
endif
- endif
endif
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- body URI_HOST_IN_WELCOMELIST eval:check_uri_host_in_welcomelist()
- describe URI_HOST_IN_WELCOMELIST Host or Domain is listed in the user's URI welcome-list
- tflags URI_HOST_IN_WELCOMELIST userconf nice noautolearn
- score URI_HOST_IN_WELCOMELIST -0.01
-
- meta URI_HOST_IN_WHITELIST (URI_HOST_IN_WELCOMELIST)
- describe URI_HOST_IN_WHITELIST DEPRECATED: See URI_HOST_IN_WELCOMELIST
- tflags URI_HOST_IN_WHITELIST userconf nice noautolearn
- score URI_HOST_IN_WHITELIST -100.0
- endif
-else
+ body URI_HOST_IN_WELCOMELIST eval:check_uri_host_in_welcomelist()
+ describe URI_HOST_IN_WELCOMELIST Host or Domain is listed in the user's URI welcome-list
+ tflags URI_HOST_IN_WELCOMELIST userconf nice noautolearn
+ score URI_HOST_IN_WELCOMELIST -0.01
+
+ meta URI_HOST_IN_WHITELIST (URI_HOST_IN_WELCOMELIST)
+ describe URI_HOST_IN_WHITELIST DEPRECATED: See URI_HOST_IN_WELCOMELIST
+ tflags URI_HOST_IN_WHITELIST userconf nice noautolearn
+ score URI_HOST_IN_WHITELIST -100.0
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
if (version >= 3.004000)
- ifplugin Mail::SpamAssassin::Plugin::WLBLEval
body URI_HOST_IN_WELCOMELIST eval:check_uri_host_in_whitelist()
describe URI_HOST_IN_WELCOMELIST Host or Domain is listed in the user's URI welcome-list
tflags URI_HOST_IN_WELCOMELIST userconf nice noautolearn
@@ -230,7 +203,6 @@ else
tflags URI_HOST_IN_WHITELIST userconf nice noautolearn
score URI_HOST_IN_WHITELIST -100.0
endif
- endif
endif
# Bug 7256, using a header rule with an eval() function does not work the way
@@ -258,8 +230,7 @@ endif
# Should really not be used these days, use def_welcomelist_auth if possible.
-ifplugin Mail::SpamAssassin::Plugin::WLBLEval
-
# def_welcomelist_from_rcvd *@foo.com foo.com
-endif
+endif # ifplugin Mail::SpamAssassin::Plugin::WLBLEval
+
Modified: spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_auth.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_auth.cf?rev=1899950&r1=1899949&r2=1899950&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_auth.cf (original)
+++ spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_auth.cf Sun Apr 17 15:46:19 2022
@@ -24,8 +24,6 @@
###########################################################################
# SPF and DKIM whitelist rules
-if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
-
###########################################################################
# These should be primarily envelope-from addresses which send mail that is
# often tagged (incorrectly) as spam or high-profile domains that are common
@@ -42,6 +40,9 @@ if can(Mail::SpamAssassin::Conf::feature
# SA. Change the def_welcomelist_auth entry and search "older" and change
# the previous config entries in unison.
+# 4.0 / Bug 7826 renames whitelist to welcomelist and blacklist to blocklist
+if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+
def_welcomelist_auth *@apache.org
def_welcomelist_auth *@*.apache.org
@@ -1015,9 +1016,14 @@ def_welcomelist_auth *@*.testingmom.com
def_welcomelist_auth *@*.ceramicartsnetwork.org
def_welcomelist_auth *@*.verintefm.com
-else
+endif # if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+
-#For older versions of SA, these old entries remain for SA before version 4.0
+#
+# For older versions of SA, these old entries remain for SA before version 4.0
+#
+
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
def_whitelist_auth *@apache.org
def_whitelist_auth *@*.apache.org
@@ -1991,5 +1997,5 @@ def_whitelist_auth *@*.testingmom.com
def_whitelist_auth *@*.ceramicartsnetwork.org
def_whitelist_auth *@*.verintefm.com
-endif # if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+endif # if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
Modified: spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_dkim.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_dkim.cf?rev=1899950&r1=1899949&r2=1899950&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_dkim.cf (original)
+++ spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_dkim.cf Sun Apr 17 15:46:19 2022
@@ -21,57 +21,51 @@
# limitations under the License.
# </...@LICENSE>
+ifplugin Mail::SpamAssassin::Plugin::DKIM
+
###########################################################################
# DKIM whitelist rules
-#For those wondering why there's not just an ifplugin in front of all of this, there's a big involving it
-#in nested if statements
+# 4.0 / Bug 7826 renames whitelist to welcomelist and blacklist to blocklist
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
- ifplugin Mail::SpamAssassin::Plugin::DKIM
- #bz7826 renames whitelist to welcomelist and blacklist to blocklist
- header USER_IN_DKIM_WELCOMELIST eval:check_for_dkim_welcomelist_from()
- describe USER_IN_DKIM_WELCOMELIST From: address is in the user's DKIM welcomelist
- tflags USER_IN_DKIM_WELCOMELIST nice noautolearn net userconf
- score USER_IN_DKIM_WELCOMELIST -0.01
-
- meta USER_IN_DKIM_WHITELIST (USER_IN_DKIM_WELCOMELIST)
- describe USER_IN_DKIM_WHITELIST DEPRECATED: See USER_IN_DKIM_WELCOMELIST
- tflags USER_IN_DKIM_WHITELIST nice noautolearn net userconf
- score USER_IN_DKIM_WHITELIST -100.000
- endif
+ header USER_IN_DKIM_WELCOMELIST eval:check_for_dkim_welcomelist_from()
+ describe USER_IN_DKIM_WELCOMELIST From: address is in the user's DKIM welcomelist
+ tflags USER_IN_DKIM_WELCOMELIST nice noautolearn net userconf
+ score USER_IN_DKIM_WELCOMELIST -0.01
+ reuse USER_IN_DKIM_WELCOMELIST
- #might be a way to only have one instance of the below block, unsure if it's even necessary
+ meta USER_IN_DKIM_WHITELIST (USER_IN_DKIM_WELCOMELIST)
+ describe USER_IN_DKIM_WHITELIST DEPRECATED: See USER_IN_DKIM_WELCOMELIST
+ tflags USER_IN_DKIM_WHITELIST nice noautolearn net userconf
+ score USER_IN_DKIM_WHITELIST -100.000
reuse USER_IN_DKIM_WHITELIST
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_DKIM_WELCOMELIST eval:check_for_dkim_whitelist_from()
+ describe USER_IN_DKIM_WELCOMELIST From: address is in the user's DKIM welcomelist
+ tflags USER_IN_DKIM_WELCOMELIST nice noautolearn net userconf
+ score USER_IN_DKIM_WELCOMELIST -0.01
reuse USER_IN_DKIM_WELCOMELIST
-else
- ifplugin Mail::SpamAssassin::Plugin::DKIM
- header USER_IN_DKIM_WELCOMELIST eval:check_for_dkim_whitelist_from()
- describe USER_IN_DKIM_WELCOMELIST From: address is in the user's DKIM welcomelist
- tflags USER_IN_DKIM_WELCOMELIST nice noautolearn net userconf
- score USER_IN_DKIM_WELCOMELIST -0.01
-
- meta USER_IN_DKIM_WHITELIST (USER_IN_DKIM_WELCOMELIST)
- describe USER_IN_DKIM_WHITELIST DEPRECATED: See USER_IN_DKIM_WELCOMELIST
- tflags USER_IN_DKIM_WHITELIST nice noautolearn net userconf
- score USER_IN_DKIM_WHITELIST -100.000
- endif
-
+ meta USER_IN_DKIM_WHITELIST (USER_IN_DKIM_WELCOMELIST)
+ describe USER_IN_DKIM_WHITELIST DEPRECATED: See USER_IN_DKIM_WELCOMELIST
+ tflags USER_IN_DKIM_WHITELIST nice noautolearn net userconf
+ score USER_IN_DKIM_WHITELIST -100.000
reuse USER_IN_DKIM_WHITELSIT
- reuse USER_IN_DKIM_WELCOMELIST
-
endif
-
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
-ifplugin Mail::SpamAssassin::Plugin::DKIM
-
-# The backwards compatibility for this rule will be after the else statement below
-header USER_IN_DEF_DKIM_WL eval:check_for_def_dkim_welcomelist_from()
-describe USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list
-tflags USER_IN_DEF_DKIM_WL nice noautolearn net
-reuse USER_IN_DEF_DKIM_WL
-
+ header USER_IN_DEF_DKIM_WL eval:check_for_def_dkim_welcomelist_from()
+ describe USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list
+ tflags USER_IN_DEF_DKIM_WL nice noautolearn net
+ reuse USER_IN_DEF_DKIM_WL
+endif
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+ header USER_IN_DEF_DKIM_WL eval:check_for_def_dkim_whitelist_from()
+ describe USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list
+ tflags USER_IN_DEF_DKIM_WL nice noautolearn net
+ reuse USER_IN_DEF_DKIM_WL
+endif
###########################################################################
# Default welcomelists. These should be e-mail addresses of authors (i.e.
@@ -84,6 +78,8 @@ reuse USER_IN_DEF_DKIM_WL
# Whitelist and blacklist addresses are file-glob-style patterns, so
# "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work.
+if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+
def_welcomelist_from_dkim *@*.ebay.com ebay.com
def_welcomelist_from_dkim *@ebay.com
def_welcomelist_from_dkim *@ebay.co.uk
@@ -192,22 +188,14 @@ def_welcomelist_from_dkim *@fisglobal.co
def_welcomelist_from_dkim *@*.msgfocus.com
def_welcomelist_from_dkim *@boredpanda.com mailersend.com
-endif # Mail::SpamAssassin::Plugin::DKIM
-
-
+endif # if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
#
# For older versions of SA, these old entries remain for SA before version 4.0
#
-else
-ifplugin Mail::SpamAssassin::Plugin::DKIM
-
-header USER_IN_DEF_DKIM_WL eval:check_for_def_dkim_whitelist_from()
-describe USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list
-tflags USER_IN_DEF_DKIM_WL nice noautolearn net
-reuse USER_IN_DEF_DKIM_WL
+if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
def_whitelist_from_dkim *@*.ebay.com ebay.com
def_whitelist_from_dkim *@ebay.com
@@ -317,6 +305,11 @@ def_whitelist_from_dkim *@fisglobal.com
def_whitelist_from_dkim *@*.msgfocus.com
def_whitelist_from_dkim *@boredpanda.com mailersend.com
+endif # if !can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
+
+#
+#
+#
+
endif # Mail::SpamAssassin::Plugin::DKIM
-endif # if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
Modified: spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_spf.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_spf.cf?rev=1899950&r1=1899949&r2=1899950&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_spf.cf (original)
+++ spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_spf.cf Sun Apr 17 15:46:19 2022
@@ -26,6 +26,7 @@ ifplugin Mail::SpamAssassin::Plugin::SPF
###########################################################################
# SPF welcomelist rules
+# 4.0 / Bug 7826 renames whitelist to welcomelist and blacklist to blocklist
if can(Mail::SpamAssassin::Conf::feature_welcomelist_blocklist)
header USER_IN_SPF_WELCOMELIST eval:check_for_spf_welcomelist_from()
describe USER_IN_SPF_WELCOMELIST From: address is in the user's SPF welcomelist
Modified: spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_subject.cf
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_subject.cf?rev=1899950&r1=1899949&r2=1899950&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_subject.cf (original)
+++ spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_subject.cf Sun Apr 17 15:46:19 2022
@@ -1,4 +1,4 @@
-# SpamAssassin rules file: default whitelist/blacklist subject
+# SpamAssassin rules file: default welcomelist/blocklist subject
#
# Please don't modify this file as your changes will be overwritten with
# the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead.
@@ -22,45 +22,58 @@
# </...@LICENSE>
###########################################################################
-# Whitelist/Blacklist rules
+# Welcomelist/Blocklist rules
#
# Note that most of these get 'noautolearn'. They should not be
# considered when deciding whether to auto-learn a message, as a
# user slip-up could result in scribbling side-effects in the bayes
# db as a result -- which is hard to remedy.
-# 4.0 module rename, Bug 7826
+# 4.0 / Bug 7826 renames whitelist to welcomelist and blacklist to blocklist
+# Module was renamed WhiteListSubject -> WelcomeListSubject
ifplugin Mail::SpamAssassin::Plugin::WelcomeListSubject
+ header SUBJECT_IN_WELCOMELIST eval:check_subject_in_welcomelist()
+ describe SUBJECT_IN_WELCOMELIST Subject: contains string in the user's welcome-list
+ tflags SUBJECT_IN_WELCOMELIST userconf nice noautolearn
+ score SUBJECT_IN_WELCOMELIST -0.01
+
+ meta SUBJECT_IN_WHITELIST (SUBJECT_IN_WELCOMELIST)
+ describe SUBJECT_IN_WHITELIST DEPRECATED: See SUBJECT_IN_WELCOMELIST
+ tflags SUBJECT_IN_WHITELIST userconf nice noautolearn
+ score SUBJECT_IN_WHITELIST -100
+
+ header SUBJECT_IN_BLOCKLIST eval:check_subject_in_blocklist()
+ describe SUBJECT_IN_BLOCKLIST Subject: contains string in the user's block-list
+ tflags SUBJECT_IN_BLOCKLIST userconf noautolearn
+ score SUBJECT_IN_BLOCKLIST 0.01
+
+ meta SUBJECT_IN_BLACKLIST (SUBJECT_IN_BLOCKLIST)
+ describe SUBJECT_IN_BLACKLIST DEPRECATED: See SUBJECT_IN_BLOCKLIST
+ tflags SUBJECT_IN_BLACKLIST userconf noautolearn
+ score SUBJECT_IN_BLACKLIST 100
+endif
-header SUBJECT_IN_WELCOMELIST eval:check_subject_in_welcomelist()
-describe SUBJECT_IN_WELCOMELIST Subject: contains string in the user's welcome-list
-tflags SUBJECT_IN_WELCOMELIST userconf nice noautolearn
-score SUBJECT_IN_WELCOMELIST -100
-
-header SUBJECT_IN_BLOCKLIST eval:check_subject_in_blocklist()
-describe SUBJECT_IN_BLOCKLIST Subject: contains string in the user's block-list
-tflags SUBJECT_IN_BLOCKLIST userconf noautolearn
-score SUBJECT_IN_BLOCKLIST 100
-
-meta SUBJECT_IN_WHITELIST (SUBJECT_IN_WELCOMELIST)
-describe SUBJECT_IN_WHITELIST DEPRECATED: See SUBJECT_IN_WELCOMELIST
-score SUBJECT_IN_WHITELIST -0.01
-
-meta SUBJECT_IN_BLACKLIST (SUBJECT_IN_BLOCKLIST)
-describe SUBJECT_IN_BLACKLIST DEPRECATED: See SUBJECT_IN_BLOCKLIST
-score SUBJECT_IN_BLACKLIST -0.01
-
-else
+if !plugin(Mail::SpamAssassin::Plugin::WelcomeListSubject)
ifplugin Mail::SpamAssassin::Plugin::WhiteListSubject
-
-header SUBJECT_IN_WHITELIST eval:check_subject_in_whitelist()
-describe SUBJECT_IN_WHITELIST Subject: contains string in the user's white-list
-tflags SUBJECT_IN_WHITELIST userconf nice noautolearn
-
-header SUBJECT_IN_BLACKLIST eval:check_subject_in_blacklist()
-describe SUBJECT_IN_BLACKLIST Subject: contains string in the user's black-list
-tflags SUBJECT_IN_BLACKLIST userconf noautolearn
-
-endif # Mail::SpamAssassin::Plugin::WhiteListSubject
+ header SUBJECT_IN_WELCOMELIST eval:check_subject_in_whitelist()
+ describe SUBJECT_IN_WELCOMELIST Subject: contains string in the user's welcome-list
+ tflags SUBJECT_IN_WELCOMELIST userconf nice noautolearn
+ score SUBJECT_IN_WELCOMELIST -0.01
+
+ meta SUBJECT_IN_WHITELIST (SUBJECT_IN_WELCOMELIST)
+ describe SUBJECT_IN_WHITELIST DEPRECATED: See SUBJECT_IN_WELCOMELIST
+ tflags SUBJECT_IN_WHITELIST userconf nice noautolearn
+ score SUBJECT_IN_WHITELIST -100
+
+ header SUBJECT_IN_BLOCKLIST eval:check_subject_in_blacklist()
+ describe SUBJECT_IN_BLOCKLIST Subject: contains string in the user's block-list
+ tflags SUBJECT_IN_BLOCKLIST userconf noautolearn
+ score SUBJECT_IN_BLOCKLIST 0.01
+
+ meta SUBJECT_IN_BLACKLIST (SUBJECT_IN_BLOCKLIST)
+ describe SUBJECT_IN_BLACKLIST DEPRECATED: See SUBJECT_IN_BLOCKLIST
+ tflags SUBJECT_IN_BLACKLIST userconf noautolearn
+ score SUBJECT_IN_BLACKLIST 100
+endif
endif