Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Enrico Schumann <es@enricoschumann.net>
To: Steven Arntson <steven@stevenarntson.com>
Cc: info-gnus-english@gnu.org
Subject: Re: newbie spam filtering with gnus
Date: Sat, 04 Apr 2015 07:59:53 +0200	[thread overview]
Message-ID: <87384g302u.fsf@enricoschumann.net> (raw)
In-Reply-To: <87a8ypc7nv.fsf@stevenarntson.com> (Steven Arntson's message of "Fri, 03 Apr 2015 12:51:16 -0700")

On Fri, 03 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:

> Enrico Schumann <es@enricoschumann.net> writes:
>
>> On Thu, 02 Apr 2015, Steven Arntson <steven@stevenarntson.com> 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


  reply	other threads:[~2015-04-04  5:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01  2:31 Steven Arntson
2015-04-01 13:38 ` Enrico Schumann
2015-04-02 16:56   ` Steven Arntson
2015-04-02 18:48     ` Enrico Schumann
2015-04-02 21:54       ` Steven Arntson
2015-04-03 10:08         ` Enrico Schumann
2015-04-03 19:51           ` Steven Arntson
2015-04-04  5:59             ` Enrico Schumann [this message]
2015-04-04 16:55               ` Steven Arntson
2015-04-04 17:08                 ` Steven Arntson
2015-04-04 20:20                 ` Enrico Schumann
     [not found] ` <mailman.3137.1427899913.31049.info-gnus-english@gnu.org>
2015-04-01 22:53   ` Emanuel Berg
2015-04-02 18:53     ` Enrico Schumann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87384g302u.fsf@enricoschumann.net \
    --to=es@enricoschumann.net \
    --cc=info-gnus-english@gnu.org \
    --cc=steven@stevenarntson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).