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/23 12:18:24 UTC

svn commit: r1900215 [1/3] - in /spamassassin/trunk: ./ lib/ lib/Mail/ lib/Mail/SpamAssassin/ lib/Mail/SpamAssassin/Conf/ lib/Mail/SpamAssassin/Plugin/ lib/Mail/SpamAssassin/Util/ rules/ spamc/ spamd/ t/ t/data/ t/data/welcomelists/ t/data/whitelists/ ...

Author: hege
Date: Sat Apr 23 12:18:23 2022
New Revision: 1900215

URL: http://svn.apache.org/viewvc?rev=1900215&view=rev
Log:
Merge trunk-welcomelist to trunk (Bug 7826)

Added:
    spamassassin/trunk/lib/Mail/SpamAssassin/AutoWelcomelist.pm
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/lib/Mail/SpamAssassin/AutoWelcomelist.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/WelcomeListSubject.pm
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/lib/Mail/SpamAssassin/Plugin/WelcomeListSubject.pm
    spamassassin/trunk/rules/60_welcomelist.cf
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/rules/60_welcomelist.cf
    spamassassin/trunk/rules/60_welcomelist_auth.cf
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_auth.cf
    spamassassin/trunk/rules/60_welcomelist_dkim.cf
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_dkim.cf
    spamassassin/trunk/rules/60_welcomelist_spf.cf
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_spf.cf
    spamassassin/trunk/rules/60_welcomelist_subject.cf
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/rules/60_welcomelist_subject.cf
    spamassassin/trunk/t/data/welcomelists/
      - copied from r1900213, spamassassin/branches/trunk-welcomelist/t/data/welcomelists/
    spamassassin/trunk/t/db_awl_path_welcome_block.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/db_awl_path_welcome_block.t
    spamassassin/trunk/t/db_awl_perms_welcome_block.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/db_awl_perms_welcome_block.t
    spamassassin/trunk/t/db_based_welcomelist.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/db_based_welcomelist.t
    spamassassin/trunk/t/db_based_welcomelist_ips.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/db_based_welcomelist_ips.t
    spamassassin/trunk/t/priorities_welcome_block.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/priorities_welcome_block.t
    spamassassin/trunk/t/sa_awl_welcome_block.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/sa_awl_welcome_block.t
    spamassassin/trunk/t/sql_based_welcomelist.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/sql_based_welcomelist.t
    spamassassin/trunk/t/welcomelist_addrs.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/welcomelist_addrs.t
    spamassassin/trunk/t/welcomelist_subject.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/welcomelist_subject.t
    spamassassin/trunk/t/wlbl_uri.t
      - copied unchanged from r1900213, spamassassin/branches/trunk-welcomelist/t/wlbl_uri.t
Removed:
    spamassassin/trunk/lib/Mail/SpamAssassin/AutoWhitelist.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/RaciallyCharged.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/WhiteListSubject.pm
    spamassassin/trunk/rules/60_whitelist.cf
    spamassassin/trunk/rules/60_whitelist_auth.cf
    spamassassin/trunk/rules/60_whitelist_dkim.cf
    spamassassin/trunk/rules/60_whitelist_spf.cf
    spamassassin/trunk/rules/60_whitelist_subject.cf
    spamassassin/trunk/t/data/whitelists/
Modified:
    spamassassin/trunk/   (props changed)
    spamassassin/trunk/MANIFEST
    spamassassin/trunk/MANIFEST.SKIP
    spamassassin/trunk/README
    spamassassin/trunk/UPGRADE
    spamassassin/trunk/USAGE
    spamassassin/trunk/lib/Mail/SpamAssassin.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Conf/LDAP.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Conf/SQL.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/DBBasedAddrList.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgLearner.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/PersistentAddrList.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AWL.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/FreeMail.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/PhishTag.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Pyzor.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/RelayEval.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SpamCop.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/TextCat.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/TxRep.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/VBounce.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/WLBLEval.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
    spamassassin/trunk/lib/spamassassin-run.pod
    spamassassin/trunk/rules/20_dnsbl_tests.cf
    spamassassin/trunk/rules/20_mailspike.cf
    spamassassin/trunk/rules/20_vbounce.cf
    spamassassin/trunk/rules/30_text_de.cf
    spamassassin/trunk/rules/30_text_fr.cf
    spamassassin/trunk/rules/30_text_pl.cf
    spamassassin/trunk/rules/30_text_pt_br.cf
    spamassassin/trunk/rules/50_scores.cf
    spamassassin/trunk/rules/60_awl.cf
    spamassassin/trunk/rules/60_shortcircuit.cf
    spamassassin/trunk/rules/init.pre
    spamassassin/trunk/rules/local.cf
    spamassassin/trunk/rules/v310.pre
    spamassassin/trunk/rules/v400.pre
    spamassassin/trunk/sa-awl.raw
    spamassassin/trunk/sa-learn.raw
    spamassassin/trunk/spamassassin.raw
    spamassassin/trunk/spamc/spamc.c
    spamassassin/trunk/spamd/README
    spamassassin/trunk/spamd/spamd.raw
    spamassassin/trunk/t/SATest.pm
    spamassassin/trunk/t/all_modules.t
    spamassassin/trunk/t/bayesbdb.t
    spamassassin/trunk/t/bayesdbm.t
    spamassassin/trunk/t/bayesdbm_flock.t
    spamassassin/trunk/t/bayessdbm.t
    spamassassin/trunk/t/bayessdbm_seen_delete.t
    spamassassin/trunk/t/bayessql.t
    spamassassin/trunk/t/blacklist_autolearn.t
    spamassassin/trunk/t/data/01_test_rules.pre
    spamassassin/trunk/t/debug.t
    spamassassin/trunk/t/header_utf8.t
    spamassassin/trunk/t/priorities.t
    spamassassin/trunk/t/spamd_welcomelist_leak.t
    spamassassin/trunk/t/spamd_whitelist_leak.t
    spamassassin/trunk/t/spf.t
    spamassassin/trunk/t/spf_welcome_block.t
    spamassassin/trunk/t/sql_based_whitelist.t
    spamassassin/trunk/t/welcomelist_from.t
    spamassassin/trunk/t/whitelist_addrs.t
    spamassassin/trunk/t/whitelist_from.t
    spamassassin/trunk/t/whitelist_subject.t
    spamassassin/trunk/tools/convert_awl_dbm_to_sql

Propchange: spamassassin/trunk/
------------------------------------------------------------------------------
    svn:mergeinfo = /spamassassin/branches/trunk-welcomelist:1899912-1900213

Modified: spamassassin/trunk/MANIFEST
URL: http://svn.apache.org/viewvc/spamassassin/trunk/MANIFEST?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/MANIFEST (original)
+++ spamassassin/trunk/MANIFEST Sat Apr 23 12:18:23 2022
@@ -27,7 +27,7 @@ lib/Mail/SpamAssassin.pm
 lib/Mail/SpamAssassin/AICache.pm
 lib/Mail/SpamAssassin/ArchiveIterator.pm
 lib/Mail/SpamAssassin/AsyncLoop.pm
-lib/Mail/SpamAssassin/AutoWhitelist.pm
+lib/Mail/SpamAssassin/AutoWelcomelist.pm
 lib/Mail/SpamAssassin/Bayes.pm
 lib/Mail/SpamAssassin/Bayes/CombineChi.pm
 lib/Mail/SpamAssassin/Bayes/CombineNaiveBayes.pm
@@ -103,7 +103,6 @@ lib/Mail/SpamAssassin/Plugin/Phishing.pm
 lib/Mail/SpamAssassin/Plugin/PhishTag.pm
 lib/Mail/SpamAssassin/Plugin/PDFInfo.pm
 lib/Mail/SpamAssassin/Plugin/Pyzor.pm
-lib/Mail/SpamAssassin/Plugin/RaciallyCharged.pm
 lib/Mail/SpamAssassin/Plugin/Razor2.pm
 lib/Mail/SpamAssassin/Plugin/RelayCountry.pm
 lib/Mail/SpamAssassin/Plugin/RelayEval.pm
@@ -122,7 +121,7 @@ lib/Mail/SpamAssassin/Plugin/URIDetail.p
 lib/Mail/SpamAssassin/Plugin/URIEval.pm
 lib/Mail/SpamAssassin/Plugin/VBounce.pm
 lib/Mail/SpamAssassin/Plugin/WLBLEval.pm
-lib/Mail/SpamAssassin/Plugin/WhiteListSubject.pm
+lib/Mail/SpamAssassin/Plugin/WelcomeListSubject.pm
 lib/Mail/SpamAssassin/PluginHandler.pm
 lib/Mail/SpamAssassin/Plugin/URILocalBL.pm
 lib/Mail/SpamAssassin/RegistryBoundaries.pm
@@ -461,34 +460,38 @@ t/data/taintcheckplugin.pm
 t/data/testplugin.pm
 t/data/testplugin2.pm
 t/data/validuserplugin.pm
-t/data/whitelists/action.eff.org
-t/data/whitelists/amazon_co_uk_ship
-t/data/whitelists/amazon_com_ship
-t/data/whitelists/cert.org
-t/data/whitelists/debian_bts_reassign
-t/data/whitelists/ibm_enews_de
-t/data/whitelists/infoworld
-t/data/whitelists/linuxplanet
-t/data/whitelists/lp.org
-t/data/whitelists/media_unspun
-t/data/whitelists/mlist_mailman_message
-t/data/whitelists/mlist_yahoo_groups_message
-t/data/whitelists/mypoints
-t/data/whitelists/neat_net_tricks
-t/data/whitelists/netcenter-direct_de
-t/data/whitelists/netsol_renewal
-t/data/whitelists/networkworld
-t/data/whitelists/oracle_net_techblast
-t/data/whitelists/orbitz.com
-t/data/whitelists/paypal.com
-t/data/whitelists/register.com_password
-t/data/whitelists/ryanairmail.com
-t/data/whitelists/sf.net
-t/data/whitelists/winxpnews.com
-t/data/whitelists/yahoo-inc.com
+t/data/welcomelists/action.eff.org
+t/data/welcomelists/amazon_co_uk_ship
+t/data/welcomelists/amazon_com_ship
+t/data/welcomelists/cert.org
+t/data/welcomelists/debian_bts_reassign
+t/data/welcomelists/ibm_enews_de
+t/data/welcomelists/infoworld
+t/data/welcomelists/linuxplanet
+t/data/welcomelists/lp.org
+t/data/welcomelists/media_unspun
+t/data/welcomelists/mlist_mailman_message
+t/data/welcomelists/mlist_yahoo_groups_message
+t/data/welcomelists/mypoints
+t/data/welcomelists/neat_net_tricks
+t/data/welcomelists/netcenter-direct_de
+t/data/welcomelists/netsol_renewal
+t/data/welcomelists/networkworld
+t/data/welcomelists/oracle_net_techblast
+t/data/welcomelists/orbitz.com
+t/data/welcomelists/paypal.com
+t/data/welcomelists/register.com_password
+t/data/welcomelists/ryanairmail.com
+t/data/welcomelists/sf.net
+t/data/welcomelists/winxpnews.com
+t/data/welcomelists/yahoo-inc.com
 t/date.t
 t/db_awl_path.t
+t/db_awl_path_welcome_block.t
 t/db_awl_perms.t
+t/db_awl_perms_welcome_block.t
+t/db_based_welcomelist.t
+t/db_based_welcomelist_ips.t
 t/db_based_whitelist.t
 t/db_based_whitelist_ips.t
 t/dcc.t
@@ -539,6 +542,7 @@ t/plugin_file.t
 t/plugin_priorities.t
 t/prefs_include.t
 t/priorities.t
+t/priorities_welcome_block.t
 t/pyzor.t
 t/razor2.t
 t/rcvd_parser.t
@@ -568,6 +572,7 @@ t/rule_multiple.t
 t/rule_names.t
 t/rule_types.t
 t/sa_awl.t
+t/sa_awl_welcome_block.t
 t/sa_check_spamd.t
 t/sa_compile.t
 t/sha1.t
@@ -624,6 +629,7 @@ t/spamd_welcomelist_leak.t
 t/spamd_whitelist_leak.t
 t/spf.t
 t/spf_welcome_block.t
+t/sql_based_welcomelist.t
 t/sql_based_whitelist.t
 t/stop_always_matching_regexps.t
 t/strip2.t
@@ -647,8 +653,11 @@ t/uribl_ips_only.t
 t/urilocalbl.t
 t/utf8.t
 t/util_wrap.t
+t/welcomelist_addrs.t
 t/welcomelist_from.t
+t/welcomelist_subject.t
 t/welcomelist_to.t
+t/wlbl_uri.t
 t/whitelist_addrs.t
 t/whitelist_from.t
 t/whitelist_subject.t

Modified: spamassassin/trunk/MANIFEST.SKIP
URL: http://svn.apache.org/viewvc/spamassassin/trunk/MANIFEST.SKIP?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/MANIFEST.SKIP (original)
+++ spamassassin/trunk/MANIFEST.SKIP Sat Apr 23 12:18:23 2022
@@ -63,7 +63,7 @@
 ^t/bayessql\.cf$
 ^t/config$
 ^t/data/nice/cjk/
-^t/data/whitelists/
+^t/data/welcomelists/
 ^t/do_net$
 ^t/log/
 ^t/rule_tests\.t$

Modified: spamassassin/trunk/README
URL: http://svn.apache.org/viewvc/spamassassin/trunk/README?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/README (original)
+++ spamassassin/trunk/README Sat Apr 23 12:18:23 2022
@@ -151,7 +151,7 @@ default locations that Apache SpamAssass
   - $USER_HOME/.spamassassin:
 
   	User state directory.  Used to hold spamassassin state, such
-	as a per-user automatic whitelist, and the user's preferences
+	as a per-user automatic welcomelist, and the user's preferences
 	file.
 
   - $USER_HOME/.spamassassin/user_prefs:

Modified: spamassassin/trunk/UPGRADE
URL: http://svn.apache.org/viewvc/spamassassin/trunk/UPGRADE?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/UPGRADE (original)
+++ spamassassin/trunk/UPGRADE Sat Apr 23 12:18:23 2022
@@ -2,6 +2,15 @@
 Note for Users Upgrading to SpamAssassin 4.0.0
 ----------------------------------------------
 
+- All rules, functions, command line options and modules that contain
+  "whitelist" or "blacklist" have been renamed to contain more racially
+  neutral "welcomelist" and "blocklist" terms.  Old names will continue work
+  as backwards compatibility atleast until 4.1 release.  If you have local
+  settings like scores or metas referring to old rule names, these should be
+  changed, after which "enable_compat welcomelist_blocklist" can be added in
+  init.pre.  See: https://wiki.apache.org/spamassassin/WelcomelistBlocklist
+  (Bug 7826)
+
 - Setting normalize_charset is now enabled by default.  Note that rules
   should not expect specific non-UTF8 or UTF8 encoding in body.  Matching is
   done against raw bytes, which may vary depending on normalize_charset

Modified: spamassassin/trunk/USAGE
URL: http://svn.apache.org/viewvc/spamassassin/trunk/USAGE?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/USAGE (original)
+++ spamassassin/trunk/USAGE Sat Apr 23 12:18:23 2022
@@ -101,11 +101,11 @@ If you want to use SpamAssassin site-wid
     add the line 'DROPPRIVS=yes' at the top of the file.
 
 
-The Auto-Whitelist
+The Auto-Welcomelist
 ------------------
 
-The auto-whitelist is enabled using the 'use_auto_whitelist' option.
-(See https://wiki.apache.org/spamassassin/AutoWhitelist for details on
+The auto-welcomelist is enabled using the 'use_auto_welcomelist' option.
+(See https://wiki.apache.org/spamassassin/AutoWelcomelist for details on
 how it works, if you're curious.)
 
 

Modified: spamassassin/trunk/lib/Mail/SpamAssassin.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin.pm Sat Apr 23 12:18:23 2022
@@ -40,7 +40,7 @@ Mail::SpamAssassin - Spam detector and m
 =head1 DESCRIPTION
 
 Mail::SpamAssassin is a module to identify spam using several methods
-including text analysis, internet-based realtime blacklists, statistical
+including text analysis, internet-based realtime blocklists, statistical
 analysis, and internet-based hashing algorithms.
 
 Using its rule base, it uses a wide range of heuristic tests on mail
@@ -952,73 +952,84 @@ sub revoke_as_spam {
 
 ###########################################################################
 
-=item $f->add_address_to_whitelist ($addr, $cli_p)
+=item $f->add_address_to_welcomelist ($addr, $cli_p)
+
+Previously add_address_to_whitelist which will work interchangeably until 4.1.
 
 Given a string containing an email address, add it to the automatic
-whitelist database.
+welcomelist database.
 
 If $cli_p is set then underlying plugin may give visual feedback on additions/failures.
 
 =cut
 
-sub add_address_to_whitelist {
+sub add_address_to_welcomelist {
   my ($self, $addr, $cli_p) = @_;
 
-  $self->call_plugins("whitelist_address", { address => $addr,
+  $self->call_plugins("welcomelist_address", { address => $addr,
                                              cli_p => $cli_p });
 }
+*add_address_to_whitelist = \&add_address_to_welcomelist; # removed in 4.1
 
 ###########################################################################
 
-=item $f->add_all_addresses_to_whitelist ($mail, $cli_p)
+=item $f->add_all_addresses_to_welcomelist ($mail, $cli_p)
+
+Previously add_all_addresses_to_whitelist which will work interchangeably until 4.1.
 
 Given a mail message, find as many addresses in the usual headers (To, Cc, From
-etc.), and the message body, and add them to the automatic whitelist database.
+etc.), and the message body, and add them to the automatic welcomelist database.
 
 If $cli_p is set then underlying plugin may give visual feedback on additions/failures.
 
 =cut
 
-sub add_all_addresses_to_whitelist {
+sub add_all_addresses_to_welcomelist {
   my ($self, $mail_obj, $cli_p) = @_;
 
   foreach my $addr ($self->find_all_addrs_in_mail ($mail_obj)) {
-    $self->call_plugins("whitelist_address", { address => $addr,
+    $self->call_plugins("welcomelist_address", { address => $addr,
                                                cli_p => $cli_p });
   }
 }
+*add_all_addresses_to_whitelist = \&add_all_addresses_to_welcomelist; # removed in 4.1
 
 ###########################################################################
 
-=item $f->remove_address_from_whitelist ($addr, $cli_p)
+=item $f->remove_address_from_welcomelist ($addr, $cli_p)
+
+Previously remove_address_from_whitelist which will work interchangeably until 4.1.
 
 Given a string containing an email address, remove it from the automatic
-whitelist database.
+welcomelist database.
 
 If $cli_p is set then underlying plugin may give visual feedback on additions/failures.
 
 =cut
 
-sub remove_address_from_whitelist {
+sub remove_address_from_welcomelist {
   my ($self, $addr, $cli_p) = @_;
 
   $self->call_plugins("remove_address", { address => $addr,
                                           cli_p => $cli_p });
 }
+*remove_address_from_whitelist = \&remove_address_from_welcomelist; # removed in 4.1
 
 ###########################################################################
 
-=item $f->remove_all_addresses_from_whitelist ($mail, $cli_p)
+=item $f->remove_all_addresses_from_welcomelist ($mail, $cli_p)
+
+Previously remove_all_addresses_from_whitelist which will work interchangeably until 4.1.
 
 Given a mail message, find as many addresses in the usual headers (To, Cc, From
-etc.), and the message body, and remove them from the automatic whitelist
+etc.), and the message body, and remove them from the automatic welcomelist
 database.
 
 If $cli_p is set then underlying plugin may give visual feedback on additions/failures.
 
 =cut
 
-sub remove_all_addresses_from_whitelist {
+sub remove_all_addresses_from_welcomelist {
   my ($self, $mail_obj, $cli_p) = @_;
 
   foreach my $addr ($self->find_all_addrs_in_mail ($mail_obj)) {
@@ -1026,30 +1037,36 @@ sub remove_all_addresses_from_whitelist
                                             cli_p => $cli_p });
   }
 }
+*remove_all_addresses_from_whitelist = \&remove_all_addresses_from_welcomelist; # removed in 4.1
 
 ###########################################################################
 
-=item $f->add_address_to_blacklist ($addr, $cli_p)
+=item $f->add_address_to_blocklist ($addr, $cli_p)
+
+Previously add_address_to_blacklist which will work interchangeably until 4.1.
 
 Given a string containing an email address, add it to the automatic
-whitelist database with a high score, effectively blacklisting them.
+welcomelist database with a high score, effectively blocklisting them.
 
 If $cli_p is set then underlying plugin may give visual feedback on additions/failures.
 
 =cut
 
-sub add_address_to_blacklist {
+sub add_address_to_blocklist {
   my ($self, $addr, $cli_p) = @_;
-  $self->call_plugins("blacklist_address", { address => $addr,
+  $self->call_plugins("blocklist_address", { address => $addr,
                                              cli_p => $cli_p });
 }
+*add_address_to_blacklist = \&add_address_to_blocklist; # removed in 4.1
 
 ###########################################################################
 
-=item $f->add_all_addresses_to_blacklist ($mail, $cli_p)
+=item $f->add_all_addresses_to_blocklist ($mail, $cli_p)
+
+Previously add_all_addresses_to_blacklist which will work interchangeably until 4.1.
 
 Given a mail message, find addresses in the From headers and add them to the
-automatic whitelist database with a high score, effectively blacklisting them.
+automatic welcomelist database with a high score, effectively blocklisting them.
 
 Note that To and Cc addresses are not used.
 
@@ -1057,7 +1074,7 @@ If $cli_p is set then underlying plugin
 
 =cut
 
-sub add_all_addresses_to_blacklist {
+sub add_all_addresses_to_blocklist {
   my ($self, $mail_obj, $cli_p) = @_;
 
   $self->init(1);
@@ -1072,11 +1089,11 @@ sub add_all_addresses_to_blacklist {
   }
 
   foreach my $addr (@addrlist) {
-    $self->call_plugins("blacklist_address", { address => $addr,
+    $self->call_plugins("blocklist_address", { address => $addr,
                                                cli_p => $cli_p });
   }
-
 }
+*add_all_addresses_to_blacklist = \&add_all_addresses_to_blocklist; # removed in 4.1
 
 ###########################################################################
 
@@ -1237,8 +1254,8 @@ sub remove_spamassassin_markup {
 Read a configuration file and parse user preferences from it.
 
 User preferences are as defined in the C<Mail::SpamAssassin::Conf> manual page.
-In other words, they include scoring options, scores, whitelists and
-blacklists, and so on, but do not include rule definitions, privileged
+In other words, they include scoring options, scores, welcomelists and
+blocklists, and so on, but do not include rule definitions, privileged
 settings, etc. unless C<allow_user_rules> is enabled; and they never include
 the administrator settings.
 
@@ -1329,7 +1346,7 @@ sub load_scoreonly_ldap {
 =item $f->set_persistent_address_list_factory ($factoryobj)
 
 Set the persistent address list factory, used to create objects for the
-automatic whitelist algorithm's persistent-storage back-end.  See
+automatic welcomelist algorithm's persistent-storage back-end.  See
 C<Mail::SpamAssassin::PersistentAddrList> for the API these factory objects
 must implement, and the API the objects they produce must implement.
 
@@ -1502,7 +1519,7 @@ sub lint_rules {
   $self->{dont_copy_prefs} = $olddcp;       # revert back to previous
 
   # bug 5048: override settings to ensure a faster lint
-  $self->{'conf'}->{'use_auto_whitelist'} = 0;
+  $self->{'conf'}->{'use_auto_welcomelist'} = 0;
   $self->{'conf'}->{'bayes_auto_learn'} = 0;
 
   my $mail = $self->parse(\@testmsg, 1, { master_deadline => undef });
@@ -2131,6 +2148,9 @@ sub sed_path {
     return $self->{conf}->{sed_path_cache}->{$path};
   }
 
+  # <4.0 compatibility check, to be removed in 4.1
+  my $check_compat = $path eq '__userstate__/auto-welcomelist';
+
   my $orig_path = $path;
 
   $path =~ s/__local_rules_dir__/$self->{LOCAL_RULES_DIR} || ''/ges;
@@ -2143,6 +2163,16 @@ sub sed_path {
   $path =~ s/__version__/${VERSION}/gs;
   $path =~ s/^\~([^\/]*)/$self->expand_name($1)/es;
 
+  # <4.0 compatibility check, to be removed in 4.1
+  if ($check_compat) {
+    if ($path =~ m{^(.+)/(.+)$}) {
+      # Use auto-whitelist if found
+      if (!-e $path && -e "$1/auto-whitelist") {
+        $path = "$1/auto-whitelist";
+      }
+    }
+  }
+
   $path = Mail::SpamAssassin::Util::untaint_file_path ($path);
   $self->{conf}->{sed_path_cache}->{$orig_path} = $path;
   return $path;
@@ -2239,6 +2269,10 @@ sub call_plugins {
     # read.  Plugins can also now use {valid_tlds_re} to one time compile
     # regexes in finish_parsing_end.
     $self->{registryboundaries} = Mail::SpamAssassin::RegistryBoundaries->new ($self);
+  } elsif ($subname eq 'whitelist_address' || $subname eq 'blacklist_address') {
+    # Warn about backwards compatibility, removed in 4.1
+    # Third party usage should be rare event, so do not translate function names
+    warn "config: Deprecated $subname called from call_plugins, use welcomelist_address or blocklist_address\n";
   }
 
   # safety net in case some plugin changes global settings, Bug 6218

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm Sat Apr 23 12:18:23 2022
@@ -284,7 +284,7 @@ it from running.
 
 =back
 
-=head2 WHITELIST AND BLACKLIST OPTIONS
+=head2 WELCOMELIST AND BLOCKLIST OPTIONS
 
 =over 4
 
@@ -292,15 +292,15 @@ it from running.
 
 Previously whitelist_from which will work interchangeably until 4.1.
 
-Used to whitelist sender addresses which send mail that is often tagged
+Used to welcomelist sender addresses which send mail that is often tagged
 (incorrectly) as spam.
 
 Use of this setting is not recommended, since it blindly trusts the message,
 which is routinely and easily forged by spammers and phish senders. The
 recommended solution is to instead use C<welcomelist_auth> or other authenticated
-whitelisting methods, or C<welcomelist_from_rcvd>.
+welcomelisting methods, or C<welcomelist_from_rcvd>.
 
-Whitelist and blacklist addresses are now file-glob-style patterns, so
+Welcomelist and blocklist addresses are now file-glob-style patterns, so
 C<fr...@somewhere.com>, C<*...@isp.com>, or C<*.domain.net> will all work.
 Specifically, C<*> and C<?> are allowed, but all other metacharacters
 are not. Regular expressions are not used for security reasons.
@@ -309,7 +309,7 @@ Matching is case-insensitive.
 Multiple addresses per line, separated by spaces, is OK.  Multiple
 C<welcomelist_from> lines are also OK.
 
-The headers checked for whitelist addresses are as follows: if C<Resent-From>
+The headers checked for welcomelist addresses are as follows: if C<Resent-From>
 is set, use that; otherwise check all addresses taken from the following
 set of headers:
 
@@ -330,13 +330,15 @@ e.g.
 
   push (@cmds, {
     setting => 'welcomelist_from',
+    aliases => ['whitelist_from'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
-    aliases => ['whitelist_from'],     # backward compatible - to be removed for 4.1
   });
 
-=item unwhitelist_from user@example.com
+=item unwelcomelist_from user@example.com
 
-Used to remove a default welcomelist_from (previously whitelist_from) entry, so for example a distribution
+Previously unwelcomelist_from which will work interchangeably until 4.1.
+
+Used to remove a default welcomelist_from entry, so for example a distribution
 welcomelist_from can be overridden in a local.cf file, or an individual user can
 override a welcomelist_from entry in their own C<user_prefs> file.
 The specified email address has to match exactly (although case-insensitively)
@@ -345,13 +347,14 @@ wildcard only matches literally the same
 
 e.g.
 
-  unwhitelist_from joe@example.com fred@example.com
-  unwhitelist_from *@example.com
+  unwelcomelist_from joe@example.com fred@example.com
+  unwelcomelist_from *@example.com
 
 =cut
 
   push (@cmds, {
-    command => 'unwhitelist_from',
+    command => 'unwelcomelist_from',
+    aliases => ['unwhitelist_from'], # backward compatible - to be removed for 4.1
     setting => 'welcomelist_from',
     type => $CONF_TYPE_ADDRLIST,
     code => \&Mail::SpamAssassin::Conf::Parser::remove_addrlist_value
@@ -361,10 +364,10 @@ e.g.
 
 Previously whitelist_from_rcvd which will work interchangeably until 4.1.
 
-Works similarly to welcomelist_from (previously whitelist_from), except that in addition to matching
+Works similarly to welcomelist_from, except that in addition to matching
 a sender address, a relay's rDNS name or its IP address must match too
-for the whitelisting rule to fire. The first parameter is a sender's e-mail
-address to whitelist, and the second is a string to match the relay's rDNS,
+for the welcomelisting rule to fire. The first parameter is a sender's e-mail
+address to welcomelist, and the second is a string to match the relay's rDNS,
 or its IP address. Matching is case-insensitive.
 
 This second parameter is matched against a TCP-info information field as
@@ -433,7 +436,7 @@ these are often targets for spammer spoo
 
   push (@cmds, {
     setting => 'def_welcomelist_from_rcvd',
-    aliases => ['def_whitelist_from_rcvd'],
+    aliases => ['def_whitelist_from_rcvd'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
     code => sub {
       my ($self, $key, $value, $line) = @_;
@@ -448,22 +451,24 @@ these are often targets for spammer spoo
     }
   });
 
-=item whitelist_allows_relays user@example.com
+=item welcomelist_allows_relays user@example.com
+
+Previously whitelist_allows_relays which will work interchangeably until 4.1.
 
 Specify addresses which are in C<welcomelist_from_rcvd> that sometimes
 send through a mail relay other than the listed ones. By default mail
 with a From address that is in C<welcomelist_from_rcvd> that does not match
 the relay will trigger a forgery rule. Including the address in
-C<whitelist_allows_relay> prevents that.
+C<welcomelist_allows_relay> prevents that.
 
-Whitelist and blacklist addresses are now file-glob-style patterns, so
+Welcomelist and blocklist addresses are now file-glob-style patterns, so
 C<fr...@somewhere.com>, C<*...@isp.com>, or C<*.domain.net> will all work.
 Specifically, C<*> and C<?> are allowed, but all other metacharacters
 are not. Regular expressions are not used for security reasons.
 Matching is case-insensitive.
 
 Multiple addresses per line, separated by spaces, is OK.  Multiple
-C<whitelist_allows_relays> lines are also OK.
+C<welcomelist_allows_relays> lines are also OK.
 
 The specified email address does not have to match exactly the address
 previously used in a welcomelist_from_rcvd line as it is compared to the
@@ -471,13 +476,14 @@ address in the header.
 
 e.g.
 
-  whitelist_allows_relays joe@example.com fred@example.com
-  whitelist_allows_relays *@example.com
+  welcomelist_allows_relays joe@example.com fred@example.com
+  welcomelist_allows_relays *@example.com
 
 =cut
 
   push (@cmds, {
-    setting => 'whitelist_allows_relays',
+    setting => 'welcomelist_allows_relays',
+    aliases => ['whitelist_allows_relays'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
   });
 
@@ -485,7 +491,7 @@ e.g.
 
 Previously unwhitelist_from_rcvd which will work interchangeably until 4.1.
 
-Used to remove a default welcomelist_from_rcvd (previously whitelist_from_rcvd) or def_welcomelist_from_rcvd (previously def_whitelist_from_rcvd)
+Used to remove a default welcomelist_from_rcvd or def_welcomelist_from_rcvd
 entry, so for example a distribution welcomelist_from_rcvd can be overridden
 in a local.cf file, or an individual user can override a welcomelist_from_rcvd
 entry in their own C<user_prefs> file.
@@ -502,7 +508,7 @@ e.g.
 
   push (@cmds, {
     setting => 'unwelcomelist_from_rcvd',
-    aliases => ['unwhitelist_from_rcvd'],
+    aliases => ['unwhitelist_from_rcvd'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
     code => sub {
       my ($self, $key, $value, $line) = @_;
@@ -519,7 +525,7 @@ e.g.
     }
   });
 
-=item blacklist_from user@example.com
+=item blocklist_from user@example.com
 
 Used to specify addresses which send mail that is often tagged (incorrectly) as
 non-spam, but which the user doesn't want.  Same format as C<welcomelist_from>.
@@ -527,30 +533,34 @@ non-spam, but which the user doesn't wan
 =cut
 
   push (@cmds, {
-    setting => 'blacklist_from',
+    setting => 'blocklist_from',
+    aliases => ['blacklist_from'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
   });
 
-=item unblacklist_from user@example.com
+=item unblocklist_from user@example.com
+
+Previously unblacklist_from which will work interchangeably until 4.1.
 
-Used to remove a default blacklist_from entry, so for example a
-distribution blacklist_from can be overridden in a local.cf file, or
-an individual user can override a blacklist_from entry in their own
+Used to remove a default blocklist_from entry, so for example a
+distribution blocklist_from can be overridden in a local.cf file, or
+an individual user can override a blocklist_from entry in their own
 C<user_prefs> file. The specified email address has to match exactly
-the address previously used in a blacklist_from line.
+the address previously used in a blocklist_from line.
 
 
 e.g.
 
-  unblacklist_from joe@example.com fred@example.com
-  unblacklist_from *@spammer.com
+  unblocklist_from joe@example.com fred@example.com
+  unblocklist_from *@spammer.com
 
 =cut
 
 
   push (@cmds, {
-    command => 'unblacklist_from',
-    setting => 'blacklist_from',
+    command => 'unblocklist_from',
+    aliases => ['unblacklist_from'], # backward compatible - to be removed for 4.1
+    setting => 'blocklist_from',
     type => $CONF_TYPE_ADDRLIST,
     code => \&Mail::SpamAssassin::Conf::Parser::remove_addrlist_value
   });
@@ -599,8 +609,8 @@ See above.
 
   push (@cmds, {
     setting => 'welcomelist_to',
+    aliases => ['whitelist_to'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
-    aliases => ['whitelist_to'],       # backward compatible - to be removed for 4.1
   });
   push (@cmds, {
     setting => 'more_spam_to',
@@ -611,16 +621,19 @@ See above.
     type => $CONF_TYPE_ADDRLIST,
   });
 
-=item blacklist_to user@example.com
+=item blocklist_to user@example.com
+
+Previously blacklist_auth which will work interchangeably until 4.1.
 
 If the given address appears as a recipient in the message headers
 (Resent-To, To, Cc, obvious envelope recipient, etc.) the mail will
-be blacklisted.  Same format as C<blacklist_from>.
+be blocklisted.  Same format as C<blocklist_from>.
 
 =cut
 
   push (@cmds, {
-    setting => 'blacklist_to',
+    setting => 'blocklist_to',
+    aliases => ['blacklist_to'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
   });
 
@@ -631,7 +644,7 @@ Previously whitelist_auth which will wor
 Used to specify addresses which send mail that is often tagged (incorrectly) as
 spam.  This is different from C<welcomelist_from> and C<welcomelist_from_rcvd> in
 that it first verifies that the message was sent by an authorized sender for
-the address, before whitelisting.
+the address, before welcomelisting.
 
 Authorization is performed using one of the installed sender-authorization
 schemes: SPF (using C<Mail::SpamAssassin::Plugin::SPF>), or DKIM (using
@@ -639,7 +652,7 @@ C<Mail::SpamAssassin::Plugin::DKIM>).  N
 and working, for this to operate.
 
 Using C<welcomelist_auth> is roughly equivalent to specifying duplicate
-C<whitelist_from_spf>, C<whitelist_from_dk>, and C<welcomelist_from_dkim> lines
+C<welcomelist_from_spf>, C<welcomelist_from_dk>, and C<welcomelist_from_dkim> lines
 for each of the addresses specified.
 
 e.g.
@@ -669,7 +682,7 @@ these are often targets for spammer spoo
     type => $CONF_TYPE_ADDRLIST,
   });
 
-=item unwhitelist_auth user@example.com
+=item unwelcomelist_auth user@example.com
 
 Previously unwhitelist_auth which will work interchangeably until 4.1.
 
@@ -685,7 +698,7 @@ e.g.
 
   push (@cmds, {
     setting => 'unwelcomelist_auth',
-    aliases => ['unwhitelist_auth'],
+    aliases => ['unwhitelist_auth'], # backward compatible - to be removed for 4.1
     type => $CONF_TYPE_ADDRLIST,
     code => sub {
       my ($self, $key, $value, $line) = @_;
@@ -730,9 +743,9 @@ in order to match.
 Use the delist_uri_host directive to neutralize previous enlist_uri_host
 settings.
 
-Enlisting to lists named 'BLACK' and 'WHITE' have their shorthand directives
+Enlisting to lists named 'BLOCK' and 'WELCOME' have their shorthand directives
 blocklist_uri_host and welcomelist_uri_host and corresponding default rules,
-but the names 'BLACK' and 'WHITE' are otherwise not special or reserved.
+but the names 'BLOCK' and 'WELCOME' are otherwise not special or reserved.
 
 =cut
 
@@ -812,17 +825,17 @@ Matching is case-insensitive.
 Multiple addresses per line, separated by spaces, is OK.  Multiple
 C<enlist_addrlist> lines are also OK.
 
-Enlisting an address to the list named blacklist_to is synonymous to using the
-directive blacklist_to 
+Enlisting an address to the list named blocklist_to is synonymous to using
+the directive blocklist_to.
 
-Enlisting an address to the list named blacklist_from is synonymous to using the
-directive blacklist_from
+Enlisting an address to the list named blocklist_from is synonymous to using
+the directive blocklist_from.
 
-Enlisting an address to the list named welcomelist_to is synonymous to using the
-directive welcomelist_to 
+Enlisting an address to the list named welcomelist_to is synonymous to using
+the directive welcomelist_to.
 
-Enlisting an address to the list named welcomelist_from (previously whitelist_from) is synonymous to using the
-directive welcomelist_from
+Enlisting an address to the list named welcomelist_from is synonymous to
+using the directive welcomelist_from.
 
 e.g.
 
@@ -851,7 +864,7 @@ e.g.
 
 Previously blacklist_uri_host which will work interchangeably until 4.1.
 
-Is a shorthand for a directive:  enlist_uri_host (BLACK) host ...
+Is a shorthand for a directive:  enlist_uri_host (BLOCK) host ...
 
 Please see directives enlist_uri_host and delist_uri_host for details.
 
@@ -859,14 +872,14 @@ Please see directives enlist_uri_host an
 
   push (@cmds, {
     command => 'blocklist_uri_host',
-    aliases => ['blacklist_uri_host'],
+    aliases => ['blacklist_uri_host'], # backward compatible - to be removed for 4.1
     setting => 'uri_host_lists',
     type => $CONF_TYPE_HASH_KEY_VALUE,
     code => sub {
       my($conf, $key, $value, $line) = @_;
       foreach my $host ( split(/\s+/, lc $value) ) {
         my $v = $host =~ s/^!// ? 0 : 1;
-        $conf->{uri_host_lists}{'BLACK'}{$host} = $v;
+        $conf->{uri_host_lists}{'BLOCK'}{$host} = $v;
       }
     }
   });
@@ -875,7 +888,7 @@ Please see directives enlist_uri_host an
 
 Previously whitelist_uri_host which will work interchangeably until 4.1.
 
-Is a shorthand for a directive:  enlist_uri_host (WHITE) host ...
+Is a shorthand for a directive:  enlist_uri_host (WELCOME) host ...
 
 Please see directives enlist_uri_host and delist_uri_host for details.
 
@@ -883,14 +896,14 @@ Please see directives enlist_uri_host an
 
   push (@cmds, {
     command => 'welcomelist_uri_host',
-    aliases => ['whitelist_uri_host'],
+    aliases => ['whitelist_uri_host'], # backward compatible - to be removed for 4.1
     setting => 'uri_host_lists',
     type => $CONF_TYPE_HASH_KEY_VALUE,
     code => sub {
       my($conf, $key, $value, $line) = @_;
       foreach my $host ( split(/\s+/, lc $value) ) {
         my $v = $host =~ s/^!// ? 0 : 1;
-        $conf->{uri_host_lists}{'WHITE'}{$host} = $v;
+        $conf->{uri_host_lists}{'WELCOME'}{$host} = $v;
       }
     }
   });
@@ -1318,7 +1331,7 @@ What networks or hosts are 'trusted' in
 means that relay hosts on these networks are considered to not be potentially
 operated by spammers, open relays, or open proxies.  A trusted host could
 conceivably relay spam, but will not originate it, and will not forge header
-data. DNS blacklist checks will never query for hosts on these networks. 
+data. DNS blocklist checks will never query for hosts on these networks. 
 
 See C<https://wiki.apache.org/spamassassin/TrustPath> for more information.
 
@@ -1593,7 +1606,7 @@ more trusted relays.  See also C<envelop
 =item skip_rbl_checks ( 0 | 1 )   (default: 0)
 
 Turning on the skip_rbl_checks setting will disable the DNSEval plugin,
-which implements Real-time Block List (or: Blackhole List) (RBL) lookups.
+which implements Real-time Block List (or: Blockhole List) (RBL) lookups.
 
 By default, SpamAssassin will run RBL checks. Individual blocklists may
 be disabled selectively by setting a score of a corresponding rule to 0.
@@ -2503,7 +2516,7 @@ as implemented by a Shortcircuit plugin.
 TIME_LIMIT_EXCEEDED with a near-zero default score is generated, so that
 the report will reflect the event. A score for TIME_LIMIT_EXCEEDED may
 be provided explicitly in a configuration file, for example to achieve
-whitelisting or blacklisting effect for messages with long processing times.
+welcomelisting or blocklisting effect for messages with long processing times.
 
 The C<time_limit> option is a useful protection against excessive processing
 time on certain degenerate or unusually long or complex mail messages, as well
@@ -3047,7 +3060,7 @@ C<arguments> are optional arguments to t
 
 =item header SYMBOLIC_TEST_NAME eval:check_rbl('set', 'zone' [, 'sub-test'])
 
-Check a DNSBL (a DNS blacklist or whitelist).  This will retrieve Received:
+Check a DNSBL (a DNS blocklist or welcomelist).  This will retrieve Received:
 headers from the message, extract the IP addresses, select which ones are
 'untrusted' based on the C<trusted_networks> logic, and query that DNSBL
 zone.  There's a few things to note:
@@ -3095,7 +3108,7 @@ sending directly to your MX (mail exchan
 
 =item selecting IPs by whether they are trusted
 
-When checking a 'nice' DNSBL (a DNS whitelist), you cannot trust the IP
+When checking a 'nice' DNSBL (a DNS welcomelist), you cannot trust the IP
 addresses in Received headers that were not added by trusted relays.  To
 test the first IP address that can be trusted, place '-firsttrusted' at the
 end of the set name.  That should test the IP address of the relay that
@@ -3515,7 +3528,7 @@ source of the points.
 
 This flag is specific when using AWL plugin.
 
-Normally, AWL plugin normalizes scores via auto-whitelist. In some scenarios
+Normally, AWL plugin normalizes scores via auto-welcomelist. In some scenarios
 it works against the system administrator when trying to add some rules to
 correct miss-classified email. When AWL plugin searches the email and finds 
 the noawl flag it will exit without normalizing the score nor storing the
@@ -4235,6 +4248,10 @@ See C<Mail::SpamAssassin::Plugin> for mo
       if ($package eq 'Mail::SpamAssassin::Plugin::Dmarc' && !defined $path) {
         $package = 'Mail::SpamAssassin::Plugin::DMARC';
       }
+      # backwards compatible - removed in 4.1
+      elsif ($package eq 'Mail::SpamAssassin::Plugin::WhiteListSubject' && !defined $path) {
+        $package = 'Mail::SpamAssassin::Plugin::WelcomeListSubject';
+      }
       $self->load_plugin ($package, $path);
     }
   });
@@ -4908,12 +4925,11 @@ sub new {
   $self->{welcomelist_auth} = { };
   $self->{def_welcomelist_auth} = { };
   $self->{welcomelist_from} = { };
-  $self->{whitelist_allows_relays} = { };
-  $self->{blacklist_from} = { };
+  $self->{welcomelist_allows_relays} = { };
   $self->{welcomelist_from_rcvd} = { };
   $self->{def_welcomelist_from_rcvd} = { };
 
-  $self->{blacklist_to} = { };
+  $self->{blocklist_to} = { };
   $self->{welcomelist_to} = { };
   $self->{more_spam_to} = { };
   $self->{all_spam_to} = { };
@@ -5436,7 +5452,8 @@ sub feature_meta_rules_matching { 1 } #
 sub feature_subjprefix { 1 } # add subject prefixes rule option
 sub feature_bayes_stopwords { 1 } # multi language stopwords in Bayes
 sub feature_get_host { 1 } # $pms->get() :host :domain :ip :revip # was implemented together with AskDNS::has_tag_header # Bug 7734
-sub feature_blocklist_welcomelist { 1 } # bz 7826
+sub feature_blocklist_welcomelist { 1 } # bz 7826 - do not use, for backwards compatibility
+sub feature_welcomelist_blocklist { 1 } # bz 7826 - this is the actual feature_ to use, everything is renamed at this point
 sub feature_header_address_parser { 1 } # improved header address parsing using Email::Address::XS, $pms->get() list context
 sub feature_local_tests_only { 1 } # Config parser supports "if (local_tests_only)"
 sub feature_header_first_last { 1 } # Can actually use :first :last modifiers in rules

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/LDAP.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/LDAP.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/LDAP.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/LDAP.pm Sat Apr 23 12:18:23 2022
@@ -27,7 +27,7 @@ Mail::SpamAssassin::Conf::LDAP - load Sp
 =head1 DESCRIPTION
 
 Mail::SpamAssassin is a module to identify spam using text analysis and
-several internet-based realtime blacklists.
+several internet-based realtime blocklists.
 
 This class is used internally by SpamAssassin to load scores from an LDAP
 database.  Please refer to the C<Mail::SpamAssassin> documentation for public

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm Sat Apr 23 12:18:23 2022
@@ -26,7 +26,7 @@ Mail::SpamAssassin::Conf::Parser - parse
 =head1 DESCRIPTION
 
 Mail::SpamAssassin is a module to identify spam using text analysis and
-several internet-based realtime blacklists.
+several internet-based realtime blocklists.
 
 This class is used internally by SpamAssassin to parse its configuration files.
 Please refer to the C<Mail::SpamAssassin> documentation for public interfaces.
@@ -600,6 +600,7 @@ sub handle_conditional {
 
 # functions supported in the "if" eval:
 sub cond_clause_plugin_loaded {
+  return 1 if $_[1] eq 'Mail::SpamAssassin::Plugin::RaciallyCharged'; # removed in 4.1
   return $_[0]->{conf}->{plugins_loaded}->{$_[1]};
 }
 

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/SQL.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/SQL.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/SQL.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/SQL.pm Sat Apr 23 12:18:23 2022
@@ -27,7 +27,7 @@ Mail::SpamAssassin::Conf::SQL - load Spa
 =head1 DESCRIPTION
 
 Mail::SpamAssassin is a module to identify spam using text analysis and
-several internet-based realtime blacklists.
+several internet-based realtime blocklists.
 
 This class is used internally by SpamAssassin to load scores from an SQL
 database.  Please refer to the C<Mail::SpamAssassin> documentation for public

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/DBBasedAddrList.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/DBBasedAddrList.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/DBBasedAddrList.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/DBBasedAddrList.pm Sat Apr 23 12:18:23 2022
@@ -53,23 +53,23 @@ sub new_checker {
     'locked_file'	=> ''
   };
 
-  my @order = split(/\s+/, $main->{conf}->{auto_whitelist_db_modules});
+  my @order = split(/\s+/, $main->{conf}->{auto_welcomelist_db_modules});
   untaint_var(\@order);
   my $dbm_module = Mail::SpamAssassin::Util::first_available_module (@order);
   if (!$dbm_module) {
-    die "auto-whitelist: cannot find a usable DB package from auto_whitelist_db_modules: " .
-	$main->{conf}->{auto_whitelist_db_modules}."\n";
+    die "auto-welcomelist: cannot find a usable DB package from auto_welcomelist_db_modules: " .
+	$main->{conf}->{auto_welcomelist_db_modules}."\n";
   }
 
-  my $umask = umask ~ (oct($main->{conf}->{auto_whitelist_file_mode}));
+  my $umask = umask ~ (oct($main->{conf}->{auto_welcomelist_file_mode}));
 
   # if undef then don't worry -- empty hash!
-  if (defined($main->{conf}->{auto_whitelist_path})) {
-    my $path = $main->sed_path($main->{conf}->{auto_whitelist_path});
+  if (defined($main->{conf}->{auto_welcomelist_path})) {
+    my $path = $main->sed_path($main->{conf}->{auto_welcomelist_path});
     my ($mod1, $mod2);
 
     if ($main->{locker}->safe_lock
-            ($path, 30, $main->{conf}->{auto_whitelist_file_mode}))
+            ($path, 30, $main->{conf}->{auto_welcomelist_file_mode}))
     {
       $self->{locked_file} = $path;
       $self->{is_locked}   = 1;
@@ -80,20 +80,20 @@ sub new_checker {
       ($mod1, $mod2) = ('R/O', O_RDONLY);
     }
 
-    dbg("auto-whitelist: tie-ing to DB file of type $dbm_module $mod1 in $path");
+    dbg("auto-welcomelist: tie-ing to DB file of type $dbm_module $mod1 in $path");
 
     ($self->{is_locked} && $dbm_module eq 'DB_File') and
             Mail::SpamAssassin::Util::avoid_db_file_locking_bug($path);
 
     if (! tie %{ $self->{accum} }, $dbm_module, $path, $mod2,
-            oct($main->{conf}->{auto_whitelist_file_mode}) & 0666)
+            oct($main->{conf}->{auto_welcomelist_file_mode}) & 0666)
     {
       my $err = $!;   # might get overwritten later
       if ($self->{is_locked}) {
         $self->{main}->{locker}->safe_unlock($self->{locked_file});
         $self->{is_locked} = 0;
       }
-      die "auto-whitelist: cannot open auto_whitelist_path $path: $err\n";
+      die "auto-welcomelist: cannot open auto_welcomelist_path $path: $err\n";
     }
   }
   umask $umask;
@@ -106,10 +106,10 @@ sub new_checker {
 
 sub finish {
   my $self = shift;
-  dbg("auto-whitelist: DB addr list: untie-ing and unlocking");
+  dbg("auto-welcomelist: DB addr list: untie-ing and unlocking");
   untie %{$self->{accum}};
   if ($self->{is_locked}) {
-    dbg("auto-whitelist: DB addr list: file locked, breaking lock");
+    dbg("auto-welcomelist: DB addr list: file locked, breaking lock");
     $self->{main}->{locker}->safe_unlock ($self->{locked_file});
     $self->{is_locked} = 0;
   }
@@ -128,7 +128,7 @@ sub get_addr_entry {
   $entry->{msgcount} = $self->{accum}->{$addr} || 0;
   $entry->{totscore} = $self->{accum}->{$addr.'|totscore'} || 0;
 
-  dbg("auto-whitelist: db-based $addr scores ".$entry->{msgcount}.'/'.$entry->{totscore});
+  dbg("auto-welcomelist: db-based $addr scores ".$entry->{msgcount}.'/'.$entry->{totscore});
   return $entry;
 }
 
@@ -143,7 +143,7 @@ sub add_score {
     $entry->{msgcount}++;
     $entry->{totscore} += $score;
 
-    dbg("auto-whitelist: add_score: new count: ".$entry->{msgcount}.", new totscore: ".$entry->{totscore});
+    dbg("auto-welcomelist: add_score: new count: ".$entry->{msgcount}.", new totscore: ".$entry->{totscore});
 
     $self->{accum}->{$entry->{addr}} = $entry->{msgcount};
     $self->{accum}->{$entry->{addr}.'|totscore'} = $entry->{totscore};

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgLearner.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgLearner.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgLearner.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgLearner.pm Sat Apr 23 12:18:23 2022
@@ -97,8 +97,8 @@ sub learn_spam {
   my ($self, $id) = @_;
 
   # bug 4096
-  # if ($self->{main}->{learn_with_whitelist}) {
-  # $self->{main}->add_all_addresses_to_blacklist ($self->{msg});
+  # if ($self->{main}->{learn_with_welcomelist}) {
+  # $self->{main}->add_all_addresses_to_blocklist ($self->{msg});
   # }
 
   # use the real message-id here instead of mass-check's idea of an "id",
@@ -124,8 +124,8 @@ sub learn_ham {
   my ($self, $id) = @_;
 
   # bug 4096
-  # if ($self->{main}->{learn_with_whitelist}) {
-  # $self->{main}->add_all_addresses_to_whitelist ($self->{msg});
+  # if ($self->{main}->{learn_with_welcomelist}) {
+  # $self->{main}->add_all_addresses_to_welcomelist ($self->{msg});
   # }
 
   $self->{learned} = $self->{bayes_scanner}->learn (0, $self->{msg}, $id);
@@ -148,8 +148,8 @@ sub forget {
   my ($self, $id) = @_;
 
   # bug 4096
-  # if ($self->{main}->{learn_with_whitelist}) {
-  # $self->{main}->remove_all_addresses_from_whitelist ($self->{msg});
+  # if ($self->{main}->{learn_with_welcomelist}) {
+  # $self->{main}->remove_all_addresses_from_welcomelist ($self->{msg});
   # }
 
   $self->{learned} = $self->{bayes_scanner}->forget ($self->{msg}, $id);

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Sat Apr 23 12:18:23 2022
@@ -404,7 +404,7 @@ sub check_timed {
   # this lets us see ludicrously spammish mails (score: 40) etc., which
   # we can then immediately submit to spamblocking services.
   #
-  # TODO: change this to do whitelist/blacklists first? probably a plan
+  # TODO: change this to do welcomelist/blocklists first? probably a plan
   # NOTE: definitely need AWL stuff last, for regression-to-mean of score
 
   # TVD: we may want to do more than just clearing out the headers, but ...
@@ -632,7 +632,7 @@ ignored:
 
   - rules with tflags set to 'learn' (the Bayesian rules)
 
-  - rules with tflags set to 'userconf' (user white/black-listing rules, etc)
+  - rules with tflags set to 'userconf' (user welcome/block-listing rules, etc)
 
   - rules with tflags set to 'noautolearn'
 

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PersistentAddrList.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PersistentAddrList.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PersistentAddrList.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PersistentAddrList.pm Sat Apr 23 12:18:23 2022
@@ -33,7 +33,7 @@ SpamAssassin will call:
 
 =head1 DESCRIPTION
 
-All persistent address list implementations, used by the auto-whitelist
+All persistent address list implementations, used by the auto-welcomelist
 code to track known-good email addresses, use this as a base class.
 
 See C<Mail::SpamAssassin::DBBasedAddrList> for an example.
@@ -81,7 +81,7 @@ SpamAssassin classes.
 
 sub new_checker {
   my ($factory, $main) = @_;
-  die "auto-whitelist: unimplemented base method";	# override this
+  die "auto-welcomelist: unimplemented base method";	# override this
 }
 
 ###########################################################################
@@ -109,7 +109,7 @@ a C<count> key and a C<totscore> key.
 sub get_addr_entry {
   my ($self, $addr, $signedby) = @_;
   my $entry = { };
-  die "auto-whitelist: unimplemented base method";	# override this
+  die "auto-welcomelist: unimplemented base method";	# override this
   return $entry;
 }
 
@@ -117,27 +117,27 @@ sub get_addr_entry {
 
 =item $entry = $addrlist->add_score($entry, $score);
 
-This method should add the given score to the whitelist database for the
+This method should add the given score to the welcomelist database for the
 given entry, and then return the new entry.
 
 =cut
 
 sub add_score {
     my ($self, $entry, $score) = @_;
-    die "auto-whitelist: unimplemented base method"; # override this
+    die "auto-welcomelist: unimplemented base method"; # override this
 }
 
 ###########################################################################
 
 =item $entry = $addrlist->remove_entry ($entry);
 
-This method should remove the given entry from the whitelist database.
+This method should remove the given entry from the welcomelist database.
 
 =cut
 
 sub remove_entry {
   my ($self, $entry) = @_;
-  die "auto-whitelist: unimplemented base method";	# override this
+  die "auto-welcomelist: unimplemented base method";	# override this
 }
 
 ###########################################################################
@@ -145,7 +145,7 @@ sub remove_entry {
 =item $entry = $addrlist->finish ();
 
 Clean up, if necessary.  Called by SpamAssassin when it has finished
-checking, or adding to, the auto-whitelist database.
+checking, or adding to, the auto-welcomelist database.
 
 =cut
 

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin.pm Sat Apr 23 12:18:23 2022
@@ -846,7 +846,9 @@ Reference to the original message object
 
 =back
 
-=item $plugin->whitelist_address( { options ... } )
+=item $plugin->welcomelist_address( { options ... } )
+
+Previously whitelist_address which will work interchangeably until 4.1.
 
 Called when a request is made to add an address to a
 persistent address list.
@@ -863,7 +865,9 @@ Indicate if the call is being made from
 
 =back
 
-=item $plugin->blacklist_address( { options ... } )
+=item $plugin->blocklist_address( { options ... } )
+
+Previously blacklist_address which will work interchangeably until 4.1.
 
 Called when a request is made to add an address to a
 persistent address list.

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AWL.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AWL.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AWL.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AWL.pm Sat Apr 23 12:18:23 2022
@@ -17,7 +17,7 @@
 
 =head1 NAME
 
-Mail::SpamAssassin::Plugin::AWL - Normalize scores via auto-whitelist
+Mail::SpamAssassin::Plugin::AWL - Normalize scores via auto-welcomelist
 
 =head1 SYNOPSIS
 
@@ -28,14 +28,14 @@ To try this out, add this or uncomment t
 Use the supplied 60_awl.cf file (ie you don't have to do anything) or
 add these lines to a .cf file:
 
-  header AWL             eval:check_from_in_auto_whitelist()
-  describe AWL           From: address is in the auto white-list
+  header AWL             eval:check_from_in_auto_welcomelist()
+  describe AWL           From: address is in the auto welcome-list
   tflags AWL             userconf noautolearn
   priority AWL           1000
 
 =head1 DESCRIPTION
 
-This plugin module provides support for the auto-whitelist.  It keeps
+This plugin module provides support for the auto-welcomelist.  It keeps
 track of the average SpamAssassin score for senders.  Senders are
 tracked using a combination of their From: address and their IP address.
 It then uses that average score to reduce the variability in scoring
@@ -63,7 +63,7 @@ use warnings;
 # use bytes;
 use re 'taint';
 use Mail::SpamAssassin::Plugin;
-use Mail::SpamAssassin::AutoWhitelist;
+use Mail::SpamAssassin::AutoWelcomelist;
 use Mail::SpamAssassin::Util qw(untaint_var);
 use Mail::SpamAssassin::Logger;
 
@@ -80,7 +80,8 @@ sub new {
   bless ($self, $class);
 
   # the important bit!
-  $self->register_eval_rule("check_from_in_auto_whitelist", $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS);
+  $self->register_eval_rule("check_from_in_auto_welcomelist", $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS);
+  $self->register_eval_rule("check_from_in_auto_whitelist", $Mail::SpamAssassin::Conf::TYPE_HEAD_EVALS); # removed in 4.1
 
   $self->set_config($mailsaobject->{conf});
 
@@ -99,18 +100,20 @@ SpamAssassin handles incoming email mess
 
 =over 4
 
-=item use_auto_whitelist ( 0 | 1 )		(default: 1)
+=item use_auto_welcomelist ( 0 | 1 )		(default: 1)
 
-Whether to use auto-whitelists.  Auto-whitelists track the long-term
+Previously use_auto_whitelist which will work interchangeably until 4.1.
+
+Whether to use auto-welcomelists.  Auto-welcomelists track the long-term
 average score for each sender and then shift the score of new messages
 toward that long-term average.  This can increase or decrease the score
 for messages, depending on the long-term behavior of the particular
 correspondent.
 
-For more information about the auto-whitelist system, please look
-at the C<Automatic Whitelist System> section of the README file.
-The auto-whitelist is not intended as a general-purpose replacement
-for static whitelist entries added to your config files.
+For more information about the auto-welcomelist system, please look
+at the C<Automatic Welcomelist System> section of the README file.
+The auto-welcomelist is not intended as a general-purpose replacement
+for static welcomelist entries added to your config files.
 
 Note that certain tests are ignored when determining the final
 message score:
@@ -120,12 +123,15 @@ message score:
 =cut
 
   push (@cmds, {
-		setting => 'use_auto_whitelist',
+		setting => 'use_auto_welcomelist',
+		aliases => ['use_auto_whitelist'], # backward compatible - to be removed for 4.1
 		default => 1,
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL
 	       });
 
-=item auto_whitelist_factor n	(default: 0.5, range [0..1])
+=item auto_welcomelist_factor n	(default: 0.5, range [0..1])
+
+Previously auto_whitelist_factor which will work interchangeably until 4.1.
 
 How much towards the long-term mean for the sender to regress a message.
 Basically, the algorithm is to track the long-term mean score of messages for
@@ -143,12 +149,15 @@ mean; C<factor> = 0 mean just use the ca
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_factor',
+		setting => 'auto_welcomelist_factor',
+		aliases => ['auto_whitelist_factor'], # backward compatible - to be removed for 4.1
 		default => 0.5,
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC
 	       });
 
-=item auto_whitelist_ipv4_mask_len n	(default: 16, range [0..32])
+=item auto_welcomelist_ipv4_mask_len n	(default: 16, range [0..32])
+
+Previously auto_whitelist_ipv4_mask_len which will work interchangeably until 4.1.
 
 The AWL database keeps only the specified number of most-significant bits
 of an IPv4 address in its fields, so that different individual IP addresses
@@ -164,7 +173,8 @@ of 8, any split is allowed.
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_ipv4_mask_len',
+		setting => 'auto_welcomelist_ipv4_mask_len',
+		aliases => ['auto_whitelist_ipv4_mask_len'], # removed in 4.1
 		default => 16,
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC,
 		code => sub {
@@ -174,11 +184,13 @@ of 8, any split is allowed.
 		  } elsif ($value !~ /^\d+$/ || $value < 0 || $value > 32) {
 		    return $Mail::SpamAssassin::Conf::INVALID_VALUE;
 		  }
-		  $self->{auto_whitelist_ipv4_mask_len} = $value;
+		  $self->{auto_welcomelist_ipv4_mask_len} = $value;
 		}
 	       });
 
-=item auto_whitelist_ipv6_mask_len n	(default: 48, range [0..128])
+=item auto_welcomelist_ipv6_mask_len n	(default: 48, range [0..128])
+
+Previously auto_whitelist_ipv6_mask_len which will work interchangeably until 4.1.
 
 The AWL database keeps only the specified number of most-significant bits
 of an IPv6 address in its fields, so that different individual IP addresses
@@ -195,7 +207,8 @@ is allowed.
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_ipv6_mask_len',
+		setting => 'auto_welcomelist_ipv6_mask_len',
+		aliases => ['auto_whitelist_ipv6_mask_len'], # removed in 4.1
 		default => 48,
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC,
 		code => sub {
@@ -205,7 +218,7 @@ is allowed.
 		  } elsif ($value !~ /^\d+$/ || $value < 0 || $value > 128) {
 		    return $Mail::SpamAssassin::Conf::INVALID_VALUE;
 		  }
-		  $self->{auto_whitelist_ipv6_mask_len} = $value;
+		  $self->{auto_welcomelist_ipv6_mask_len} = $value;
 		}
 	       });
 
@@ -215,7 +228,7 @@ Used by the SQLBasedAddrList storage imp
 
 If this option is set the SQLBasedAddrList module will override the set
 username with the value given.  This can be useful for implementing global
-or group based auto-whitelist databases.
+or group based auto-welcomelist databases.
 
 =cut
 
@@ -225,7 +238,9 @@ or group based auto-whitelist databases.
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING
 	       });
 
-=item auto_whitelist_distinguish_signed
+=item auto_welcomelist_distinguish_signed
+
+Previously auto_whitelist_distinguish_signed which will work interchangeably until 4.1.
 
 Used by the SQLBasedAddrList storage implementation.
 
@@ -240,7 +255,8 @@ turning on this option.
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_distinguish_signed',
+		setting => 'auto_welcomelist_distinguish_signed',
+		aliases => ['auto_whitelist_distinguish_signed'], # removed in 4.1
 		default => 0,
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL
 	       });
@@ -256,32 +272,38 @@ user's C<user_prefs> file.
 
 =over 4
 
-=item auto_whitelist_factory module (default: Mail::SpamAssassin::DBBasedAddrList)
+=item auto_welcomelist_factory module (default: Mail::SpamAssassin::DBBasedAddrList)
 
-Select alternative whitelist factory module.
+Previously auto_whitelist_factory which will work interchangeably until 4.1.
+
+Select alternative welcomelist factory module.
 
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_factory',
+		setting => 'auto_welcomelist_factory',
+		aliases => ['auto_whitelist_factory'], # removed in 4.1
 		is_admin => 1,
 		default => 'Mail::SpamAssassin::DBBasedAddrList',
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING
 	       });
 
-=item auto_whitelist_path /path/filename (default: ~/.spamassassin/auto-whitelist)
+=item auto_welcomelist_path /path/filename (default: ~/.spamassassin/auto-welcomelist)
+
+Previously auto_whitelist_path which will work interchangeably until 4.1.
 
-This is the automatic-whitelist directory and filename.  By default, each user
-has their own whitelist database in their C<~/.spamassassin> directory with
+This is the automatic-welcomelist directory and filename.  By default, each user
+has their own welcomelist database in their C<~/.spamassassin> directory with
 mode 0700.  For system-wide SpamAssassin use, you may want to share this
 across all users, although that is not recommended.
 
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_path',
+		setting => 'auto_welcomelist_path',
+		aliases => ['auto_whitelist_path'], # removed in 4.1
 		is_admin => 1,
-		default => '__userstate__/auto-whitelist',
+		default => '__userstate__/auto-welcomelist',
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING,
 		code => sub {
 		  my ($self, $key, $value, $line) = @_;
@@ -291,13 +313,15 @@ across all users, although that is not r
 		  if (-d $value) {
 		    return $Mail::SpamAssassin::Conf::INVALID_VALUE;
 		  }
-		  $self->{auto_whitelist_path} = $value;
+		  $self->{auto_welcomelist_path} = $value;
 		}
 	       });
 
-=item auto_whitelist_db_modules Module ...	(default: see below)
+=item auto_welcomelist_db_modules Module ...	(default: see below)
 
-What database modules should be used for the auto-whitelist storage database
+Previously auto_whitelist_db_modules which will work interchangeably until 4.1.
+
+What database modules should be used for the auto-welcomelist storage database
 file.   The first named module that can be loaded from the perl include path
 will be used.  The format is:
 
@@ -313,15 +337,18 @@ preclude its use for the AWL (see SpamAs
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_db_modules',
+		setting => 'auto_welcomelist_db_modules',
+		aliases => ['auto_whitelist_db_modules'], # removed in 4.1
 		is_admin => 1,
 		default => 'DB_File GDBM_File SDBM_File',
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_STRING
 	       });
 
-=item auto_whitelist_file_mode		(default: 0700)
+=item auto_welcomelist_file_mode		(default: 0700)
+
+Previously auto_whitelist_file_mode which will work interchangeably until 4.1.
 
-The file mode bits used for the automatic-whitelist directory or file.
+The file mode bits used for the automatic-welcomelist directory or file.
 
 Make sure you specify this using the 'x' mode bits set, as it may also be used
 to create directories.  However, if a file is created, the resulting file will
@@ -330,7 +357,8 @@ not have any execute bits set (the umask
 =cut
 
   push (@cmds, {
-		setting => 'auto_whitelist_file_mode',
+		setting => 'auto_welcomelist_file_mode',
+		aliases => ['auto_whitelist_file_mode'], # removed in 4.1
 		is_admin => 1,
 		default => '0700',
 		type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC,
@@ -339,7 +367,7 @@ not have any execute bits set (the umask
 		  if ($value !~ /^0?[0-7]{3}$/) {
                     return $Mail::SpamAssassin::Conf::INVALID_VALUE;
                   }
-		  $self->{auto_whitelist_file_mode} = untaint_var($value);
+		  $self->{auto_welcomelist_file_mode} = untaint_var($value);
 		}
 	       });
 
@@ -390,7 +418,7 @@ The password for the database username,
 
 Used by the SQLBasedAddrList storage implementation.
 
-The table user auto-whitelists are stored in, for the above DSN.
+The table user auto-welcomelists are stored in, for the above DSN.
 
 =cut
 
@@ -404,15 +432,15 @@ The table user auto-whitelists are store
   $conf->{parser}->register_commands(\@cmds);
 }
 
-sub check_from_in_auto_whitelist {
+sub check_from_in_auto_welcomelist {
     my ($self, $pms) = @_;
 
-    return 0 unless ($pms->{conf}->{use_auto_whitelist});
+    return 0 unless ($pms->{conf}->{use_auto_welcomelist});
 
     my $timer = $self->{main}->time_method("total_awl");
 
     my $from = lc $pms->get('From:addr');
-  # dbg("auto-whitelist: From: $from");
+  # dbg("auto-welcomelist: From: $from");
     return 0 unless $from =~ /\S/;
 
     # find the earliest usable "originating IP".  ignore private nets
@@ -443,18 +471,18 @@ sub check_from_in_auto_whitelist {
     my $awlpoints = (sprintf "%0.3f", $points) + 0;
 
    # Create the AWL object
-    my $whitelist;
+    my $welcomelist;
     eval {
-      $whitelist = Mail::SpamAssassin::AutoWhitelist->new($pms->{main});
+      $welcomelist = Mail::SpamAssassin::AutoWelcomelist->new($pms->{main});
 
       my $meanscore;
       { # check
         my $timer = $self->{main}->time_method("check_awl");
-        $meanscore = $whitelist->check_address($from, $origip, $signedby);
+        $meanscore = $welcomelist->check_address($from, $origip, $signedby);
       }
       my $delta = 0;
 
-      dbg("auto-whitelist: AWL active, pre-score: %s, autolearn score: %s, ".
+      dbg("auto-welcomelist: AWL active, pre-score: %s, autolearn score: %s, ".
 	  "mean: %s, IP: %s, address: %s %s",
           $pms->{score}, $awlpoints,
           !defined $meanscore ? 'undef' : sprintf("%.3f",$meanscore),
@@ -463,13 +491,13 @@ sub check_from_in_auto_whitelist {
 
       if (defined $meanscore) {
 	$delta = $meanscore - $awlpoints;
-	$delta *= $pms->{main}->{conf}->{auto_whitelist_factor};
+	$delta *= $pms->{main}->{conf}->{auto_welcomelist_factor};
       
 	$pms->set_tag('AWL', sprintf("%2.1f",$delta));
         if (defined $meanscore) {
 	  $pms->set_tag('AWLMEAN', sprintf("%2.1f", $meanscore));
 	}
-	$pms->set_tag('AWLCOUNT', sprintf("%2.1f", $whitelist->count()));
+	$pms->set_tag('AWLCOUNT', sprintf("%2.1f", $welcomelist->count()));
 	$pms->set_tag('AWLPRESCORE', sprintf("%2.1f", $pms->{score}));
       }
 
@@ -478,7 +506,7 @@ sub check_from_in_auto_whitelist {
       # later ones.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=159704
       if (!$pms->{disable_auto_learning}) {
         my $timer = $self->{main}->time_method("update_awl");
-	$whitelist->add_score($awlpoints);
+	$welcomelist->add_score($awlpoints);
       }
 
       # now redundant, got_hit() takes care of it
@@ -491,135 +519,138 @@ sub check_from_in_auto_whitelist {
                       score => sprintf("%0.3f", $delta));
       }
 
-      $whitelist->finish();
+      $welcomelist->finish();
       1;
     } or do {
       my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
-      warn("auto-whitelist: open of auto-whitelist file failed: $eval_stat\n");
+      warn("auto-welcomelist: open of auto-welcomelist file failed: $eval_stat\n");
       # try an unlock, in case we got that far
-      eval { $whitelist->finish(); } if $whitelist;
+      eval { $welcomelist->finish(); } if $welcomelist;
       return 0;
     };
 
-    dbg("auto-whitelist: post auto-whitelist score: %.3f", $pms->{score});
+    dbg("auto-welcomelist: post auto-welcomelist score: %.3f", $pms->{score});
 
     # test hit is above
     return 0;
 }
+*check_from_in_auto_whitelist = \&check_from_in_auto_welcomelist; # removed in 4.1
 
-sub blacklist_address {
+sub blocklist_address {
   my ($self, $args) = @_;
 
-  return 0 unless ($self->{main}->{conf}->{use_auto_whitelist});
+  return 0 unless ($self->{main}->{conf}->{use_auto_welcomelist});
 
   unless ($args->{address}) {
-    print "SpamAssassin auto-whitelist: failed to add address to blacklist\n" if ($args->{cli_p});
-    dbg("auto-whitelist: failed to add address to blacklist");
+    print "SpamAssassin auto-welcomelist: failed to add address to blocklist\n" if ($args->{cli_p});
+    dbg("auto-welcomelist: failed to add address to blocklist");
     return;
   }
   
-  my $whitelist;
+  my $welcomelist;
   my $status;
 
   eval {
-    $whitelist = Mail::SpamAssassin::AutoWhitelist->new($self->{main});
+    $welcomelist = Mail::SpamAssassin::AutoWelcomelist->new($self->{main});
 
-    if ($whitelist->add_known_bad_address($args->{address}, $args->{signedby})) {
-      print "SpamAssassin auto-whitelist: adding address to blacklist: " . $args->{address} . "\n" if ($args->{cli_p});
-      dbg("auto-whitelist: adding address to blacklist: " . $args->{address});
+    if ($welcomelist->add_known_bad_address($args->{address}, $args->{signedby})) {
+      print "SpamAssassin auto-welcomelist: adding address to blocklist: " . $args->{address} . "\n" if ($args->{cli_p});
+      dbg("auto-welcomelist: adding address to blocklist: " . $args->{address});
       $status = 0;
     }
     else {
-      print "SpamAssassin auto-whitelist: error adding address to blacklist\n" if ($args->{cli_p});
-      dbg("auto-whitelist: error adding address to blacklist");
+      print "SpamAssassin auto-welcomelist: error adding address to blocklist\n" if ($args->{cli_p});
+      dbg("auto-welcomelist: error adding address to blocklist");
       $status = 1;
     }
-    $whitelist->finish();
+    $welcomelist->finish();
     1;
   } or do {
     my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
-    warn("auto-whitelist: open of auto-whitelist file failed: $eval_stat\n");
-    eval { $whitelist->finish(); };
+    warn("auto-welcomelist: open of auto-welcomelist file failed: $eval_stat\n");
+    eval { $welcomelist->finish(); };
     return 0;
   };
 
   return $status;
 }
+*blacklist_address = \&blocklist_address; # removed in 4.1
 
-sub whitelist_address {
+sub welcomelist_address {
   my ($self, $args) = @_;
 
-  return 0 unless ($self->{main}->{conf}->{use_auto_whitelist});
+  return 0 unless ($self->{main}->{conf}->{use_auto_welcomelist});
 
   unless ($args->{address}) {
-    print "SpamAssassin auto-whitelist: failed to add address to whitelist\n" if ($args->{cli_p});
-    dbg("auto-whitelist: failed to add address to whitelist");
+    print "SpamAssassin auto-welcomelist: failed to add address to welcomelist\n" if ($args->{cli_p});
+    dbg("auto-welcomelist: failed to add address to welcomelist");
     return 0;
   }
 
-  my $whitelist;
+  my $welcomelist;
   my $status;
 
   eval {
-    $whitelist = Mail::SpamAssassin::AutoWhitelist->new($self->{main});
+    $welcomelist = Mail::SpamAssassin::AutoWelcomelist->new($self->{main});
 
-    if ($whitelist->add_known_good_address($args->{address}, $args->{signedby})) {
-      print "SpamAssassin auto-whitelist: adding address to whitelist: " . $args->{address} . "\n" if ($args->{cli_p});
-      dbg("auto-whitelist: adding address to whitelist: " . $args->{address});
+    if ($welcomelist->add_known_good_address($args->{address}, $args->{signedby})) {
+      print "SpamAssassin auto-welcomelist: adding address to welcomelist: " . $args->{address} . "\n" if ($args->{cli_p});
+      dbg("auto-welcomelist: adding address to welcomelist: " . $args->{address});
       $status = 1;
     }
     else {
-      print "SpamAssassin auto-whitelist: error adding address to whitelist\n" if ($args->{cli_p});
-      dbg("auto-whitelist: error adding address to whitelist");
+      print "SpamAssassin auto-welcomelist: error adding address to welcomelist\n" if ($args->{cli_p});
+      dbg("auto-welcomelist: error adding address to welcomelist");
       $status = 0;
     }
 
-    $whitelist->finish();
+    $welcomelist->finish();
     1;
   } or do {
     my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
-    warn("auto-whitelist: open of auto-whitelist file failed: $eval_stat\n");
-    eval { $whitelist->finish(); };
+    warn("auto-welcomelist: open of auto-welcomelist file failed: $eval_stat\n");
+    eval { $welcomelist->finish(); };
     return 0;
   };
 
   return $status;
 }
+*whitelist_address = \&welcomelist_address; # removed in 4.1
 
 sub remove_address {
   my ($self, $args) = @_;
 
-  return 0 unless ($self->{main}->{conf}->{use_auto_whitelist});
+  return 0 unless ($self->{main}->{conf}->{use_auto_welcomelist});
 
   unless ($args->{address}) {
-    print "SpamAssassin auto-whitelist: failed to remove address\n" if ($args->{cli_p});
-    dbg("auto-whitelist: failed to remove address");
+    print "SpamAssassin auto-welcomelist: failed to remove address\n" if ($args->{cli_p});
+    dbg("auto-welcomelist: failed to remove address");
     return 0;
   }
 
-  my $whitelist;
+  my $welcomelist;
   my $status;
 
   eval {
-    $whitelist = Mail::SpamAssassin::AutoWhitelist->new($self->{main});
+    $welcomelist = Mail::SpamAssassin::AutoWelcomelist->new($self->{main});
 
-    if ($whitelist->remove_address($args->{address}, $args->{signedby})) {
-      print "SpamAssassin auto-whitelist: removing address: " . $args->{address} . "\n" if ($args->{cli_p});
-      dbg("auto-whitelist: removing address: " . $args->{address});
+    if ($welcomelist->remove_address($args->{address}, $args->{signedby})) {
+      print "SpamAssassin auto-welcomelist: removing address: " . $args->{address} . "\n" if ($args->{cli_p});
+      dbg("auto-welcomelist: removing address: " . $args->{address});
       $status = 1;
     }
     else {
-      print "SpamAssassin auto-whitelist: error removing address\n" if ($args->{cli_p});
-      dbg("auto-whitelist: error removing address");
+      print "SpamAssassin auto-welcomelist: error removing address\n" if ($args->{cli_p});
+      dbg("auto-welcomelist: error removing address");
       $status = 0;
     }
   
-    $whitelist->finish();
+    $welcomelist->finish();
     1;
   } or do {
     my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
-    warn("auto-whitelist: open of auto-whitelist file failed: $eval_stat\n");
-    eval { $whitelist->finish(); };
+    warn("auto-welcomelist: open of auto-welcomelist file failed: $eval_stat\n");
+    eval { $welcomelist->finish(); };
     return 0;
   };
 

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm?rev=1900215&r1=1900214&r2=1900215&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DKIM.pm Sat Apr 23 12:18:23 2022
@@ -186,7 +186,7 @@ sub set_config {
 
 Previously whitelist_from_dkim which will work interchangeably until 4.1.
 
-Works similarly to welcomelist_from (previously whitelist_from), except that in addition to matching
+Works similarly to welcomelist_from, except that in addition to matching
 an author address (From) to the pattern in the first parameter, the message
 must also carry a valid Domain Keys Identified Mail (DKIM) signature made by
 a signing domain (SDID, i.e. the d= tag) that is acceptable to us.
@@ -403,7 +403,7 @@ is only informational.
 
   push (@cmds, {
     setting => 'welcomelist_from_dkim',
-    aliases => ['whitelist_from_dkim'],
+    aliases => ['whitelist_from_dkim'], # removed in 4.1
     type => $Mail::SpamAssassin::Conf::CONF_TYPE_ADDRLIST,
     code => sub {
       my ($self, $key, $value, $line) = @_;
@@ -417,7 +417,6 @@ is only informational.
       my $address = $1;
       my $sdid = defined $2 ? $2 : '';  # empty implies author domain signature
       $address =~ s/(\@[^@]*)\z/lc($1)/e;  # lowercase the email address domain
-      #Previously the first parameter was whitelist_from_dkim
       $self->{parser}->add_to_addrlist_dkim('welcomelist_from_dkim',
                                             $address, lc $sdid);
     }
@@ -425,7 +424,7 @@ is only informational.
 
   push (@cmds, {
     setting => 'def_welcomelist_from_dkim',
-    aliases => ['def_whitelist_from_dkim'],
+    aliases => ['def_whitelist_from_dkim'], # removed in 4.1
     type => $Mail::SpamAssassin::Conf::CONF_TYPE_ADDRLIST,
     code => sub {
       my ($self, $key, $value, $line) = @_;
@@ -446,7 +445,7 @@ is only informational.
 
   push (@cmds, {
     setting => 'unwelcomelist_from_dkim',
-    aliases => ['unwhitelist_from_dkim'],
+    aliases => ['unwhitelist_from_dkim'], # removed in 4.1
     type => $Mail::SpamAssassin::Conf::CONF_TYPE_ADDRLIST,
     code => sub {
       my ($self, $key, $value, $line) = @_;
@@ -460,7 +459,6 @@ is only informational.
       my $address = $1;
       my $sdid = defined $2 ? $2 : '';  # empty implies author domain signature
       $address =~ s/(\@[^@]*)\z/lc($1)/e;  # lowercase the email address domain
-      #Previously the first parameter was whitelist_from_dkim
       $self->{parser}->remove_from_addrlist_dkim('welcomelist_from_dkim',
                                                  $address, lc $sdid);
       $self->{parser}->remove_from_addrlist_dkim('def_welcomelist_from_dkim',
@@ -664,17 +662,10 @@ sub check_dkim_testing {
 sub check_for_dkim_welcomelist_from {
   my ($self, $pms) = @_;
   $self->_check_dkim_welcomelist($pms)  if !$pms->{welcomelist_checked};
-  #Was originally dkim_match_in_whitelist_from_dkim and dkim_match_in_whitelist_auth respectively
   return $pms->{dkim_match_in_welcomelist_from_dkim} || 
          $pms->{dkim_match_in_welcomelist_auth};
 }
-
-#Stub for backwards compatibility - Remove in SA 4.1
-sub check_for_dkim_whitelist_from {
-
-  return check_for_dkim_welcomelist_from(@_);
-    
-}
+*check_for_dkim_whitelist_from = \&check_for_dkim_welcomelist_from; # removed in 4.1
 
 sub check_for_def_dkim_welcomelist_from {
   my ($self, $pms) = @_;
@@ -682,13 +673,7 @@ sub check_for_def_dkim_welcomelist_from
   return $pms->{dkim_match_in_def_welcomelist_from_dkim} || 
          $pms->{dkim_match_in_def_welcomelist_auth};
 }
-
-#Stub for backwards compatibility - Remove in SA 4.1
-sub check_for_def_dkim_whitelist_from {
-
-  return check_for_def_dkim_welcomelist_from(@_);
-
-}
+*check_for_def_dkim_whitelist_from = \&check_for_def_dkim_welcomelist_from; # removed in 4.1
 
 # ---------------------------------------------------------------------------
 
@@ -1175,7 +1160,6 @@ sub _check_dkim_adsp {
 sub _check_dkim_welcomelist {
   my ($self, $pms) = @_;
 
-  #Was originally whitelist_checked, changed due to bz7826
   $pms->{welcomelist_checked} = 1;
 
   $self->_get_authors($pms)  if !$pms->{dkim_author_addresses};
@@ -1222,13 +1206,13 @@ sub _check_dkim_welcomelist {
     }
   }
   if (@valid) {
-    dbg("dkim: author %s, WHITELISTED by %s",
+    dbg("dkim: author %s, WELCOMELISTED by %s",
         $authors_str, join(", ",@valid));
   } elsif (@fail) {
     dbg("dkim: author %s, found in %s BUT IGNORED",
         $authors_str, join(", ",@fail));
   } else {
-    dbg("dkim: author %s, not in any dkim whitelist", $authors_str);
+    dbg("dkim: author %s, not in any dkim welcomelist", $authors_str);
   }
 }
 
@@ -1253,7 +1237,7 @@ sub _wlcheck_acceptable_signature {
   }
 }
 
-# use a traditional welcomelist_from -style (previously whitelist_from) addrlist, the only acceptable DKIM
+# use a traditional welcomelist_from -style addrlist, the only acceptable DKIM
 # signature is an Author Domain Signature.  Note: don't pre-parse and store
 # domains; that's inefficient memory-wise and only saves one m//
 #