From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19840 invoked from network); 10 Apr 2021 10:50:51 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 10 Apr 2021 10:50:51 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lVBCS-00GGUQ-9P for ml@inbox.vuxu.org; Sat, 10 Apr 2021 05:50:48 -0500 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1lVBCR-006mUp-Lf for ml@inbox.vuxu.org; Sat, 10 Apr 2021 05:50:47 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lVBCP-006mUh-Cv for ding@lists.math.uh.edu; Sat, 10 Apr 2021 05:50:45 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lVBCM-00G0wY-K0 for ding@lists.math.uh.edu; Sat, 10 Apr 2021 05:50:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:In-Reply-To:Date:References:Subject: To:From:Message-Id:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6jyJ5Rwgl+vaTsXZNx9fe/pR55AjIGV5t2s+lVxNc8g=; b=ApBchbe7vXtZb3Bh/nSMU/Sufa s197cis7v84gx48dZD6Lc00sZj8N1kanwfRwsXodzeWJcbMDstKSBam3J0OW5B4dNFXyP53dbkKkT phQUz/KmWGLAZMo9NwJ+P4IF7SezCiwB+S411fvcBUPH1q+hZQzIDRkzFyyluxTKX2Ys=; Received: from www1564.sakura.ne.jp ([219.94.163.204]) by quimby.gnus.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVBCC-0003AD-LM for ding@gnus.org; Sat, 10 Apr 2021 12:50:37 +0200 Received: from cumulonimbus.local (i219-165-237-176.s02.a013.ap.plala.or.jp [219.165.237.176]) (authenticated bits=0) by www1564.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 13AAoQ5c062067 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 10 Apr 2021 19:50:26 +0900 (JST) (envelope-from hirotaka@hondalaw.com) Message-Id: From: Hirotaka Honda To: ding@gnus.org Subject: Re: spam-split of spam.el with bsfilter References: Date: Sat, 10 Apr 2021 19:50:26 +0900 In-Reply-To: (Hirotaka Honda's message of "Tue, 22 Sep 2020 01:15:35 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Dear all spam-split function began to work after putting the name of the spam folder also in the argument of the function. (: spam-split "mail.spam") ;; "mail.spam" Best regards, Hirotaka Honda Honda Law Office ParkAxis ShibuyaSakuragaoka South 801 8-11 Sakuragaokacho, Shibuya-Ku Tokyo 150-0031 Japan Tel +81 3 3463 6602 Fax +81 3 3463 6608 http://www.hondalaw.com Hirotaka Honda writes: > Dear all > > I have been using nnmail-split-fancy as nnmail-split-methods with spam-split function on Emacs 24.5.1. It worked very well. > > After I changed my computer, installed Emacs 27.1 with Gnus v5.13, and compiled bogofilter, I could not make bogofilter work for spam-split (somehow, I could get values by S t in summery buffer), however long time I examined. > > Luckily I found that bsfilter seems supported by spam.el. > bsfilter is able to handle spams in Japanese. > > Environment > Previous (x86_64-apple-darwin15.3.0, NS apple-appkit-1404.34) of 2016-02-28 on my MacOS > Current (build 1, x86_64-apple-darwin19.6.0, Carbon Version 162 AppKit 1894.6) of 2020-09-06 > > Problem 1 > spam-split function seems sending mail text to bsfilter. But even when it replies "X-Spam-Flag: Yes", it will not send it to the folder specified by the value spam-split-group. > > I made a script, bsfilter-test, which confirmed the problem. > > Probelem 2 > When I try spam-generic-score at summery buffer by keys S t, I always get the message "Spamicity score 0" even if the message tested was evaluated as spam by bogofilter on the command line of shell. > > I would be grateful if someone gives me any clues or hints to solve the problems. > > ;;;; init file settings relating to spam.el is as the following: > (require 'spam) > (spam-initialize) > > (setq spam-junk-mailgroups '("mail.spam")) > (setq gnus-spam-process-destinations '(("nnml:.*" "nnml:mail.spam")) > gnus-ham-process-destinations '(("nnml:mail.spam" "nnml:mail.misc"))) > (setq spam-split-group '("mail.spam")) ;; nnml:xx wrong 9.17.2 Filtering Incoming Mail > (setq spam-mark-ham-unread-before-move-from-spam-group t) ;; Manual > > (setq spam-bogofilter-program "/opt/local/bin/bogofilter") > (setq spam-bogofilter-database-directory "/Users/hirotaka/.bogofilter") ;; right > > (setq spam-bsfilter-program "/Users/hirotaka/Applications/bin/bsfilter-test") > (setq spam-use-bsfilter t) > (setq spam-bsfilter-database-directory "/Users/hirotaka/.bsfilter") > > (setq gnus-install-group-spam-parameters nil) ;; necessary? > > (setq gnus-spam-process-newsgroups > '(("nnml:.*" ((spam spam-use-bsfilter) > (ham spam-use-bsfilter))))) > > (setq gnus-parameters > '( ("nnml:mail\\.spam" > (display . all) > (spam-contents gnus-group-spam-classification-spam) > (spam-process ((spam spam-use-bsfilter) (ham spam-use-bsfilter))) > (spam-process-destination . "nnml:mail.spam") > (ham-process-destination . "nnml:mail.misc") > (ham-marks (gnus-del-mark gnus-read-mark gnus-ticked-mark gnus-killed-mark)) > (spam-bsfilter-database-directory . "/Users/hirotaka/.bsfilter")) > ("nnml:mail\\.misc" > (display . all) > (spam-contents gnus-group-spam-classification-ham) > (spam-process ((spam spam-use-bsfilter) (ham spam-use-bsfilter))) > (spam-process-destination . "nnml:mail.spam") > (ham-process-destination . "nnml:mail.misc") > (ham-marks (gnus-del-mark gnus-read-mark gnus-ticked-mark gnus-killed-mark)) > (spam-marks (gnus-spam-mark)) > (spam-bsfilter-database-directory . "/Users/hirotaka/.bsfilter")) > ("nnml:mail\\.hirotaka" > (display . all) > (spam-contents gnus-group-spam-classification-ham) > (spam-process ((spam spam-use-bsfilter) (ham spam-use-bsfilter))) > (spam-process-destination . "nnml:mail.spam") > (ham-process-destination . "nnml:mail.misc") > (ham-marks (gnus-del-mark gnus-read-mark gnus-ticked-mark gnus-killed-mark)) > (spam-marks (gnus-spam-mark)) > (spam-bsfilter-database-directory . "/Users/hirotaka/.bsfilter")))) > > ;;;; bsfilter-test is as the following: > #!/opt/local/bin/bash > LOG=$HOME/tmp/bsfilter-spamel-log > FARGV=("$@") > FARGC=("$#") > TARGV=() > for ((i=0; i< $FARGC ;i++)){ > TARGV[i]=`echo ${FARGV[i]} | nkf -w` > echo $i ${FARGV[i]} ":" ${TARGV[i]} >> $LOG > } > nkf -w | bsfilter ${TARGV[0]} ${TARGV[1]} ${TARGV[2]} ${TARGV[3]} ${TARGV[4]} ${TARGV[5]} ${TARGV[6]} ${TARGV[7]} ${TARGV[8]} ${TARGV[9]} ${TARGV[10]} ${TARGV[11]} ${TARGV[12]} | tee -a $LOG > # nkf -w: nkf is a tool to convert coding. -w option means output UTF-8