From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/1983 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.gnus.user Subject: Re: spam assassin filtering Date: Mon, 27 Jan 2003 09:19:34 -0600 Message-ID: References: <874r7vclji.fsf@ibook.optushome.com.au> Reply-To: belanger@truman.edu NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138668576 13418 80.91.229.2 (31 Jan 2006 00:49:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:49:36 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:29:59 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.newsfirst.net!newshub.more.net!news.more.net!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:IGstNET7hKpJzPV76oEN+hCSIZI= Original-NNTP-Posting-Host: 150.243.167.195 Original-X-Trace: news.more.net 1043680775 150.243.167.195 (Mon, 27 Jan 2003 09:19:35 CST) Original-NNTP-Posting-Date: Mon, 27 Jan 2003 09:19:35 CST Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2123 Original-Lines: 60 X-Gnus-Article-Number: 2123 Tue Jan 17 17:29:59 2006 Xref: news.gmane.org gmane.emacs.gnus.user:1983 Archived-At: Alain Picard writes: > Hello all, > > Does anyone have a working setup of GNUS/spam assassin working? > The setup described in the manual (Oort v.7) doesn't seem to > work for me. The method in the cvs manual is to use fancy splitting with (setq nnmail-split-fancy '(| (: kevin-spamassassin) ...)) (defun kevin-spamassassin () (save-excursion (let ((buf (or (get-buffer " *nnmail incoming*") (get-buffer " *nnml move*")))) (if (not buf) (progn (message "Oops, cannot find message buffer") nil) (set-buffer buf) (if (eq 1 (call-process-region (point-min) (point-max) "spamc" nil nil nil "-c")) "spam"))))) This didn't work for me either. The output of spamc with the -c switch is 1 if the article is spam, but the function above seems to assume that the value of 'call-process-region' is the same as the output of spamc. I don't think that's the case, particularly here. If I'm right, this should probably be changed in the manual. > Any example of a configuration known to work in real life > would be helpful. There are a couple of ways of doing it in the lisp files on http://my.gnus.org/Lisp I have it set up the following way (with help from the above function, and the functions on my.gnus.org); it works for me. ==== from my .gnus ======= (setq nnmail-split-methods 'nnmail-split-fancy) (defun jpb-spamassassin () (with-temp-buffer (if (get-buffer " *nnmail incoming*") (insert-buffer " *nnmail incoming*") (insert-buffer gnus-original-article-buffer)) (call-process-region (point-min) (point-max) "spamc" t t nil "-f") (goto-char (point-min)) (when (re-search-forward "^X-Spam-Status: Yes" nil t) "Spam"))) (setq nnmail-split-fancy '(| <... a bunch of splits ...> (: jpb-spamassassin) "Misc")) ========================== Jay