Bug 7728 - Remove HashCash support from trunk
Summary: Remove HashCash support from trunk
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 enhancement
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-26 08:26 UTC by Henrik Krohns
Modified: 2020-02-27 19:58 UTC (History)
5 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Krohns 2019-06-26 08:26:33 UTC
I propose removing HashCash.pm completely and any mention of it in trunk/4.0. I don't think anyone used this even 15 years ago. Leaving things lingering as "unsupported legacy code" is not practical either.
Comment 1 AXB 2019-06-26 10:46:59 UTC
my +1 to removing
Comment 2 Kevin A. McGrail 2019-06-26 12:32:24 UTC
I don't even know what it does because I think the term HashCash has morphed over the decades.
Comment 3 Giovanni Bechis 2019-06-26 14:44:42 UTC
+1 to kill it
Comment 4 Henrik Krohns 2019-06-26 15:04:10 UTC
Done.

Notice that trunk/rules/init.pre with hashcash removed completely will end up in next 3.4.3 rc release, so it will not be active for any _new_ 3.4.3 installations. Old installations will not have init.pre overwritten, so I don't feel there is any reason to include this in 3.4 UPGRADE notes.

It's also removed from current rules. In the 0.00000001% chance that someone is actually using this, they can create the rules locally..

Sending        trunk/MANIFEST
Sending        trunk/UPGRADE
Sending        trunk/USAGE
Sending        trunk/rules/30_text_de.cf
Sending        trunk/rules/30_text_pt_br.cf
Sending        trunk/rules/50_scores.cf
Sending        trunk/rules/init.pre
Sending        trunk/rulesrc/10_force_active.cf
Sending        trunk/spamassassin.raw
Sending        trunk/t/all_modules.t
Sending        trunk/t/data/01_test_rules.cf
Sending        trunk/t/data/01_test_rules.pre
Sending        trunk/t/debug.t
Transmitting file data .............done
Committing transaction...
Committed revision 1862148.
Comment 5 jidanni 2020-02-15 01:58:28 UTC
All I know is now I am getting warnings

warn: plugin: failed to parse plugin (from @INC): Can't locate
Mail/SpamAssassin/Plugin/Hashcash.pm in @INC

because though present in
share/perl/5.28.1/Mail/SpamAssassin/Plugin
it is not present in
share/perl/5.30.0/Mail/SpamAssassin/Plugin

however other parts of the code are still trying to invoke it, despite
svn update; make clean; perl Makefile.PL; make; make install
etc.

I probably have to remove everything and reinstall to finally stop the errors!
Comment 6 Bill Cole 2020-02-15 05:06:19 UTC
(In reply to jidanni from comment #5)

> I probably have to remove everything and reinstall to finally stop the
> errors!

OR just fix your init.pre file to remove the directive to load the HashCash plugin.
Comment 7 jidanni 2020-02-15 09:40:44 UTC
OK, from now on I'll do rm -rf $PREFIX before doing the make stuff. Removes 90% of the cruft mounting up too!
Comment 8 Henrik Krohns 2020-02-15 09:45:04 UTC
(In reply to jidanni from comment #7)
> OK, from now on I'll do rm -rf $PREFIX before doing the make stuff. Removes
> 90% of the cruft mounting up too!

There's no reason to do that, and you also destroy your settings etc.

Removing HashCash was a rare occurence of removing ancient plugin/code that should never be run, even if some user has it loaded in some configs. Simply remove the loadplugin clause, there's nothing more to it.
Comment 9 Henrik Krohns 2020-02-15 09:57:31 UTC
I've added check to load_plugin() to warn gracefully about things like this.

  # Bug 7728
  if ($package eq 'Mail::SpamAssassin::Plugin::HashCash') {
    warn "plugin: $package is deprecated, remove loadplugin clause from your configuration\n";
    return;
  }

Sending        lib/Mail/SpamAssassin/PluginHandler.pm
Transmitting file data .done
Committing transaction...
Committed revision 1874052.
Comment 10 Kevin A. McGrail 2020-02-27 04:05:30 UTC
Henrik, can you submit that to 3.4 as well?  I'm coming up for air and will get 3.4.5 built.
Comment 11 Henrik Krohns 2020-02-27 06:03:06 UTC
(In reply to Kevin A. McGrail from comment #10)
> Henrik, can you submit that to 3.4 as well?  I'm coming up for air and will
> get 3.4.5 built.

Hashcash is still found in 3.4 branch, I don't see any need touch anything?
Comment 12 Kevin A. McGrail 2020-02-27 19:58:17 UTC
Ahh good point.  Ignore me. I've been installing 3.4.4, 3.4.5 and trunk and mixed up my brain.