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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10339 invoked from network); 21 Sep 2020 16:16:48 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 21 Sep 2020 16:16:48 -0000 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 1kKOTz-00FVT3-CS; Mon, 21 Sep 2020 11:16:03 -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 1kKOTu-00FVR6-FJ for ding@lists.math.uh.edu; Mon, 21 Sep 2020 11:15:58 -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 1kKOTr-006R0C-QF for ding@lists.math.uh.edu; Mon, 21 Sep 2020 11:15:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Date: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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=P9qCpFF6BSidYzBw+f0JIu/74A15KhMSV/1iDTUGjhA=; b=JIGdRGdPSlmYspmi7FDRd1VMWB X4StWU4uMcUHO2SlluZWzwF1DHo4eVR0CQwhUkFTMP/vrA7kNiPZAF6+lEuD2EtC1d0JVmL/bN7S7 H1DvR0xJ9n3+0rmsV/7/Pi0jhgvXIugkq8jkqrRhPzuGi4zIBwvWFi/KBZIlpZec4ar8=; Received: from www1564.sakura.ne.jp ([219.94.163.204]) by quimby with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKOTe-0006Yn-41 for ding@gnus.org; Mon, 21 Sep 2020 18:15:50 +0200 Received: from cumulonimbus.local (KD210155075200.ec-userreverse.dion.ne.jp [210.155.75.200]) (authenticated bits=0) by www1564.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 08LGFapf070873 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Sep 2020 01:15:36 +0900 (JST) (envelope-from hirotaka@hondalaw.com) Message-Id: From: Hirotaka Honda To: ding@gnus.org Subject: spam-split of spam.el with bsfilter Date: Tue, 22 Sep 2020 01:15:35 +0900 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk 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 -- 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