From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17551 Path: news.gmane.org!not-for-mail From: Enrico Schumann Newsgroups: gmane.emacs.gnus.user Subject: Re: newbie spam filtering with gnus Date: Sat, 04 Apr 2015 07:59:53 +0200 Message-ID: <87384g302u.fsf@enricoschumann.net> References: <87ego44m0v.fsf@stevenarntson.com> <87oan8c6js.fsf@enricoschumann.net> <87pp7msc3b.fsf@stevenarntson.com> <878ueapdrx.fsf@enricoschumann.net> <87619eqjq5.fsf@stevenarntson.com> <87zj6ph6cr.fsf@enricoschumann.net> <87a8ypc7nv.fsf@stevenarntson.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1428127231 31796 80.91.229.3 (4 Apr 2015 06:00:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Apr 2015 06:00:31 +0000 (UTC) Cc: info-gnus-english@gnu.org To: Steven Arntson Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Sat Apr 04 08:00:18 2015 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YeH7x-00016j-Kl for gegu-info-gnus-english@m.gmane.org; Sat, 04 Apr 2015 08:00:17 +0200 Original-Received: from localhost ([::1]:36306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeH7w-0004xD-Tz for gegu-info-gnus-english@m.gmane.org; Sat, 04 Apr 2015 02:00:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeH7u-0004x5-6Z for info-gnus-english@gnu.org; Sat, 04 Apr 2015 02:00:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeH7o-0006i3-8x for info-gnus-english@gnu.org; Sat, 04 Apr 2015 02:00:14 -0400 Original-Received: from www231.your-server.de ([188.40.28.11]:51998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeH7o-0006Ms-3o for info-gnus-english@gnu.org; Sat, 04 Apr 2015 02:00:08 -0400 Original-Received: from [88.198.220.130] (helo=sslproxy01.your-server.de) by www231.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80.1) (envelope-from ) id 1YeH7h-0005JY-70; Sat, 04 Apr 2015 08:00:01 +0200 Original-Received: from [188.61.221.110] (helo=radiance.enricoschumann.net) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1YeH7d-0000M1-OG; Sat, 04 Apr 2015 07:59:57 +0200 In-Reply-To: <87a8ypc7nv.fsf@stevenarntson.com> (Steven Arntson's message of "Fri, 03 Apr 2015 12:51:16 -0700") X-Authenticated-Sender: es@enricoschumann.net X-Virus-Scanned: Clear (ClamAV 0.98.5/20281/Fri Apr 3 20:15:01 2015) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 188.40.28.11 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:17551 Archived-At: On Fri, 03 Apr 2015, Steven Arntson writes: > Enrico Schumann writes: > >> On Thu, 02 Apr 2015, Steven Arntson writes: >> >> [...] >> >>> Spamc -V does give me a version number, so that seems to be working. I >>> added the code you recommended, so the full splitting/spam-oriented >>> lines of my .gnus are: >>> >>> | (setq nnmail-split-methods 'nnmail-split-fancy >>> | nnmail-split-fancy '(| (: kevin-spamassassin) >>> | "mail.misc")) >>> | >>> | (defun kevin-spamassassin () >>> | (save-excursion >>> | (save-restriction >>> | (widen) >>> | (if (eq 1 (call-process-region (point-min) (point-max) >>> | "spamc" nil nil nil "-c")) >>> | "spam")))) >>> >>> I can receive mail still---all seems to be working, but no spams have >>> yet been filtered. Are there steps I need to take directly with >>> Spamassassin to get it working? >> >> spamc requires that spamd is running (see 'man spamassassin'). In a >> terminal, try >> >> echo something | spamc -r >> >> If SpamAssassin works, it should tell you that the message ('something') >> is spam because it is missing headers etc. > > I entered `sudo spamd' on terminal, and that seemed to start spamd. I > followed with the input you recommended: > > echo something | spamc -r > > And the system told me it looked like spam---so it's all working! > > However, nothing's getting filtered yet. I feel like I should be > "teaching" the system by feeding it some spam? But am not sure how to > send a spam to spamassassin. I know the spam.el package provides the `$' > for marking things as spam, but the config we're working with here > doesn't use spam.el. The function 'kevin-spamassassin' sends the message to spamc. There is no need for teaching; it should work 'out of the box'. Well, ... :-) Random thoughts: 1. Just to be sure: you did evaluate the code above, for instance by reloading your .gnus.el or restarting Gnus? 2. Old (seen) mails, even if unread, will by default not be split, only incoming messages. 3. If splitting works and you did not have a group 'spam', then this group will be created, but you need to subscribe to it: in the *Group* buffer, press '^', then go to your server, press enter, to have all groups listed. 4. You can try if kevin-spamassassin works: go to a 'good' message and in the article-buffer, press 'C-u g', which should show the article in raw form. Enter 'M-: (kevin-spamassassin)'. If the function works and the message is not spam, you should see 'nil' in the echo area at the bottom. Now go to a spam message and do the same; you should see 'spam' in the echo area. -- Enrico Schumann Lucerne, Switzerland http://enricoschumann.net