From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61041 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Hashcash-generation/check for IDN-domains Date: Thu, 29 Sep 2005 15:36:30 +0200 Message-ID: References: <87y85iejat.fsf@koldfront.dk> <87slvqfquu.fsf@koldfront.dk> <87y85hcy5s.fsf@koldfront.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1128001857 16047 80.91.229.2 (29 Sep 2005 13:50:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Sep 2005 13:50:57 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+m9573@lists.math.uh.edu Thu Sep 29 15:50:50 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EKylc-0000WQ-QH for ding-account@gmane.org; Thu, 29 Sep 2005 15:48:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EKylQ-0006dq-00; Thu, 29 Sep 2005 08:47:56 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EKyal-0006dl-00 for ding@lists.math.uh.edu; Thu, 29 Sep 2005 08:36:56 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1EKyai-0001CH-PC for ding@lists.math.uh.edu; Thu, 29 Sep 2005 08:36:55 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EKyac-0000Or-00 for ; Thu, 29 Sep 2005 15:36:47 +0200 Original-Received: from latte.josefsson.org (c494102a.s-bi.bostream.se [217.215.27.65]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3) with ESMTP id j8TDabPO000464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Sep 2005 15:36:42 +0200 Original-To: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:050929:asjo@koldfront.dk::rfP2qesIKixHU2C6:3IE X-Hashcash: 1:21:050929:ding@gnus.org::GfYRonRvc00AN4Hd:BPoe In-Reply-To: <87y85hcy5s.fsf@koldfront.dk> (Adam =?iso-8859-1?Q?Sj=F8gren'?= =?iso-8859-1?Q?s?= message of "Wed, 28 Sep 2005 11:57:35 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=failed version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yxa-iv X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on yxa.extundo.com X-Virus-Status: Clean X-MIME-Autoconverted: from 8bit to quoted-printable by yxa.extundo.com id j8TDabPO000464 X-Spam-Score: -2.4 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61041 Archived-At: asjo@koldfront.dk (Adam Sj=F8gren) writes: >>> The checking does seem a little too fragile though, in that spam-split >>> breaks just because hashcash.el can't understand a Hashcash-header >>> (i.e. the mail-check-payment should just return false when the header >>> is not understandable, right? Instead of the error that makes nnmail >>> think that my fancy-split configuration is invalid). > >> What error is that? Does it say "Unknown hashcash format version"? >> Perhaps the call to hashcash.el should be made in a condition-case. > > That is where it failed, in hashcash-version, when I got the message > about error in nnmail-split-methods. > > It's easy to recreate, just put the email in a buffer and run > mail-check-payment: "Unknown hashcash format version". Can you test this patch? 2005-09-29 Simon Josefsson * spam.el: Load hashcash when compiling, to avoid warnings. Don't autoload mail-check-payment. (spam-check-hashcash): Define unconditionally, since hashcash.el is part of Gnus now. Ignore errors from payment checking. --- spam.el 27 Sep 2005 16:46:44 +0200 7.75 +++ spam.el 29 Sep 2005 15:34:25 +0200=09 @@ -42,6 +42,7 @@ =20 (eval-when-compile (require 'cl)) (eval-when-compile (require 'spam-report)) +(eval-when-compile (require 'hashcash)) =20 (require 'gnus-sum) =20 @@ -2023,18 +2024,10 @@ =20 ;;{{{ Hashcash. =20 -(eval-when-compile - (autoload 'mail-check-payment "hashcash")) - -(condition-case nil - (progn - (require 'hashcash) - (defun spam-check-hashcash () "Check the headers for hashcash payments." - (mail-check-payment))) ;mail-check-payment returns a boolean + (ignore-errors (mail-check-payment))) ;mail-check-payment returns a boo= lean =20 - (file-error)) ;;}}} =20 ;;{{{ BBDB