Bug 78816

Summary: Hashcash support for Kmail
Product: [Applications] kmail2 Reporter: Max <max>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REOPENED ---    
Severity: wishlist CC: annma, robert, tro
Priority: NOR    
Version: 1.99.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Max 2004-03-31 17:18:30 UTC
Version:           1.5.4 (using KDE KDE 3.1.4)
Installed from:    SuSE RPMs
OS:          Linux

Now that Spamassassin is going to dole out minus points for valid Hashcash headers (check out www.hashcash.org if you hear the word for the first time, it's very cool), it would be excellent if KMail could somehow be made to optionally  generate X-Hashcash headers when sending out email. Bit length of hash collision should also be configurable.

If somebody knows a way to plug such support into my present 1.5.4 KMail, I would be very happy to hear about that.

Regards,
Max

External resources:

Spamassassin discussion about hashcash can be found here:
http://bugzilla.spamassassin.org/show_bug.cgi?id=796

Hashcash inventor
http://www.cypherspace.org/adam/

Hashcash FAQ
http://www.hashcash.org/faq/
Comment 1 Kurt Seebauer 2004-06-23 22:12:55 UTC
Would it be possible to create an outgoing mail filter like
"add header" -> "X-Hashcash" -> value: $(hashcash -mb24 $RECIPIENT) ?
Then it would be very easy to use the hashcash command line tool. 
Comment 2 Don Sanders 2004-06-24 11:44:48 UTC
The pipe through filter action and advanced option apply this filter 
to sent messages are your friends, I hear them calling you now.

Comment 3 Martin Hans 2004-06-24 13:59:40 UTC
As far as I understand, the "apply to sent messages" option makes the filter apply to messages after they are sent, not before. So this could not add a hashcash stamp.
Comment 4 Don Sanders 2004-07-01 10:25:32 UTC
On Thursday 24 June 2004 21:59, Martin Hans wrote:
> As far as I understand, the "apply to sent
> messages" option makes the filter apply to messages after they are
> sent, not before. So this could not add a hashcash stamp.

Well that's a very good point, sorry for replying too hastily.

I could implement a pre-sending filter and lobby for it to be accepted 
into CVS. But that work would have to be scheduled on the same 
commercial basis as the other features I plan to work on as described 
on http://kontact.org/shopping/

Don.

Comment 5 Adam Back 2004-08-16 22:54:00 UTC
hashcash v1 is going into the debian distribution.  spamassassin 3.0 which will be released soon now also has support for hashcash v1.

Any progress on getting hashcash support in kmail?
Comment 6 Ingo Klöcker 2004-09-06 14:59:21 UTC
Being able to apply filters to messages before they are sent sometimes really makes sense. But does hashcash support really make sense? My problem with spam is that spamassassin still doesn't catch all of it. Usage of hashcash can't improve this. The usage of hashcash can only help lower the percentage of false positives. But so far no message which was sent with KMail (i.e. User-Agent: KMail/x.y.z) was falsely classified as spam. So I think the usage of hashcash will have exactly no effect.

I will close this wish as duplicate of wish 48938 because once pre-sending filtering is implemented it can easily be used to add HashCash headers to your outgoing messages. I don't think it makes sense to add any hashcash specific code to KMail.


*** This bug has been marked as a duplicate of 48938 ***
Comment 7 Adam Back 2004-09-11 22:22:17 UTC
I would like to reopen this bug.

The claims about hashcash ineffectivness appear wrong.  Please read http://www.hashcash.org/faq/

hashcash is not _just_ spamassassin, though spam assassin is one filtering system that includes hashcash support as a means of avoiding false +ves.  There are many types of false positives.  Mail config enforcement bounces, DNS config bounces, IP blacklists, bayesian filter false +ves, etc etc.  Hashcash can and should be used to reduce the false positives in all of these to restore reliability to email.

> My problem with spam is that spamassassin still doesn't catch all of it.

Specifically the _reason_ SA is not catching all of spam is because it is configured to be conservative to avoid losing mail.  As spam levels increase (many claim as high as 10% a month!) spam filters will commonly be made less descriminating to try reduce the volume reaching ISP users.  

Another example bayesian filter: the one in mozilla routinely gives non-negligible numbers of false positives.  (We are also working on mozilla hashcash accept and send support).

When hashcash reaches wider deployment on the filtering side sending stamps will become increasingly important to achieve mail sending reliability.

I do not think this warrants closing as a duplicate of a filtering bug.

Direct support was the wish topic.
Comment 8 Adam Back 2004-09-11 22:30:00 UTC
Additionally: For good support of hashcash it is not so easy to just add to an outgoing filter.  Some UI progress indicator would be ideal as it can be time consuming.

Also some smarter things would make it much easier to use: precomputed stamps pool, and hooks to trigger precomputing (on clicking reply, or as recipients are entered) would be required for good integration.
Comment 9 Eric S. Johansson 2004-09-12 00:21:35 UTC
as the creator of camram (www.camram.org), a rather full featured anti-spam system featuring hashcash, I would also welcome support for hashcash in any e-mail user agent.  I recommend however slightly different support based on my experiences.

At a raw, bare bones minimum, send and recognize stamps.  It is incredibly important however to generate stamps in background where the user will not notice the computation time.  It's also important to nice the process so that other things can be done during stamp generation. 

on the next level of sophistication, I would recommend looking closely at replicating the camram filter sequence.  Specifically having a chain of filters hashcash, automatically generated white list, and then content filter.  The important detail about the automatically generated white list is that it is simply white listing who you send e-mail to.  reason for this logicis if you send e-mail to someone, you probably want to get e-mail back from them.  It's been extremely successful within camram if you're careful about filling the white list.  Another advantage of this white list is that it allows you to minimize stamp generation and also improve user experience.

I would also recommend building in support directly for hashcash.  It's hard to get output stamping right especially if you're preserving a good user experience.  You need to connect the send button to the SMTP agent via a queue.  inbound filtering is somewhat easier but it's still different from previously seen plug-in environments.
Comment 10 Danny Angelo Carminati Grein 2004-11-11 00:46:05 UTC
I think the this wish need be reopened. Its NOT only a outgoing special filter issue.
Comment 11 George Staikos 2004-11-12 01:12:15 UTC
I think this is a good idea actually, and I'm very tempted to start implementing it.  If KDE developers and users start using it, I can easily alter my spamassassin rules to be more effective.
Comment 12 Bart Verwilst 2005-02-09 15:16:14 UTC
Any news on this wishlist item? I would really like to see this feature in kmail... It's a real bonus to have in the war against spam ;)
Comment 13 Harlan Lieberman-Berg 2006-12-15 22:53:11 UTC
This bug should really be reopened -- I'd like to see this feature in Kmail (it's the only thing making me consider switch mail clients)
Comment 14 Adam Back 2006-12-15 23:01:06 UTC
the close note on this bug is totally bogus.  The bug listed as a "duplicate" isnt even remotely related!!  Please reopen this bug.
Comment 15 Ingo Klöcker 2006-12-16 22:48:50 UTC
I still think that using the not-yet-implemented pre-sending filtering is the correct solution for this. We didn't hard-code support for any spam filters in KMail so why should we hard-code Hashcash support. Anyway, patches are welcome.
Comment 16 Lance Haverkamp 2006-12-16 23:02:57 UTC
> I still think that using the not-yet-implemented pre-sending filtering is the 
> correct solution for this. We didn't hard-code support for any spam filters in 
> KMail so why should we hard-code Hashcash support. Anyway, patches are welcome. 

Pre-filters may very well be the right way to implement hashcash...if so, this becomes a wishlist for a hashcash pre-filter.

Thanks,

Lance
Comment 17 Harlan Lieberman-Berg 2006-12-17 04:06:47 UTC
I agree with Lance and Igno on this one.  I'll take a look at the code, but I suspect it's not going to be something I can deal with.
Comment 18 Christian Sturm 2008-02-01 16:54:59 UTC
what about an option for adding the output of a program as header?
This may also solve other feature requests or at least provide a walk around.
Comment 19 Anne-Marie Mahfouf 2011-11-30 16:09:07 UTC
Reassigning to kmail2, please any reporter check the validity of this report and add a comment, thanks in advance
Comment 20 Robert Riemann 2014-10-22 15:41:51 UTC
I don't have any idea of the source code of kmail2, but I guess that this would be a nice junior job:

- add a checkmark option to the mail editor dialog (tab meta data) to enable the hashcash challenge.
- optionally: provide a spin to determine the work load (how many zeros to find)

- study the hashtag code from existing projects and 'copy'n'paste' it to the right place in kmail2's code.

If I find a free day, I could even imagine to do it my self (I haven't made yet my hands dirty with kmail development).
Comment 21 Robert Riemann 2014-10-22 15:42:52 UTC
a kmail related resource of the hashcash project: http://www.hashcash.org/mail/mua/kmail/