Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* newbie spam filtering with gnus
@ 2015-04-01  2:31 Steven Arntson
  2015-04-01 13:38 ` Enrico Schumann
       [not found] ` <mailman.3137.1427899913.31049.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 13+ messages in thread
From: Steven Arntson @ 2015-04-01  2:31 UTC (permalink / raw)
  To: info-gnus-english

Several times in the last few months I've read through the Gnus manual
about filtering out spam, and I always end overwhelmed. But I would like
to accomplish something. I'm getting about 50 spam mails a day right now
in my POP "nnml:mail.misc". They are all pretty "obvious" spam of the
sort containing word salad under subject lines about discounted drugs
and impossible enhancements. I've downloaded Spamassassin, but haven't
been able to get my head around fancy splitting, connecting Gnus to
Spamassassin, &c. And there appear to be many other options besides
Spamassassin, which I am at a loss to evaluate.

Is there any sort of simple "starter kit" for newcomers getting going on
filtering out spam?

Thank you for any advice aimed at a not-very-technical person!
-steven

Emacs 24.4.1
Gnus 5.13



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-01  2:31 newbie spam filtering with gnus Steven Arntson
@ 2015-04-01 13:38 ` Enrico Schumann
  2015-04-02 16:56   ` Steven Arntson
       [not found] ` <mailman.3137.1427899913.31049.info-gnus-english@gnu.org>
  1 sibling, 1 reply; 13+ messages in thread
From: Enrico Schumann @ 2015-04-01 13:38 UTC (permalink / raw)
  To: Steven Arntson; +Cc: info-gnus-english

On Wed, 01 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:

> Several times in the last few months I've read through the Gnus manual
> about filtering out spam, and I always end overwhelmed. But I would like
> to accomplish something. I'm getting about 50 spam mails a day right now
> in my POP "nnml:mail.misc". They are all pretty "obvious" spam of the
> sort containing word salad under subject lines about discounted drugs
> and impossible enhancements. I've downloaded Spamassassin, but haven't
> been able to get my head around fancy splitting, connecting Gnus to
> Spamassassin, &c. And there appear to be many other options besides
> Spamassassin, which I am at a loss to evaluate.
>
> Is there any sort of simple "starter kit" for newcomers getting going on
> filtering out spam?
>
> Thank you for any advice aimed at a not-very-technical person!
> -steven
>

When I used POP some years ago, what worked out of the box for me was
using SpamAssassin as an external programme (spamc) during splitting, as
described in the manual:

http://www.gnu.org/software/emacs/manual/html_node/gnus/SpamAssassin.html

To quote from the relevant section:

,----
| [A] solution is to call the external tools during splitting. Example
| fancy split method:
| 
|   (setq nnmail-split-fancy '(| (: kevin-spamassassin)
|                                ...))
| 
|   (defun kevin-spamassassin ()
|     (save-excursion
|       (save-restriction
|         (widen)
|         (if (eq 1 (call-process-region (point-min) (point-max)
|                                        "spamc" nil nil nil "-c"))
|             "spam"))))
`----



Kind regards,
     Enrico

-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
       [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
  0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg @ 2015-04-01 22:53 UTC (permalink / raw)
  To: info-gnus-english

Enrico Schumann <es@enricoschumann.net> writes:

> When I used POP some years ago, what worked out of
> the box for me was using SpamAssassin as an external
> programme (spamc) during splitting, as described in
> the manual:

I also use POP and I don't get that many spams: those
I get I am able to KILL which is helpful as they do
come back [1].

Are you saying POP compared to IMAP is more
susceptible to spam? Those are protocols that deal
with the client fetch of mail from the server.

IMAP is more advanced, and so more complicated, but
I always thought them to be mere protocols - defining
the message syntax as well as the order and meaning of
exchanges (e.g., handshakes and so on) in different
situations, with no implications as to anti-spam.

Or do you mean that particular methods, e.g.
SpamAssassin which you mention, only works with POP?

If you get a lot of spam, perhaps it is easier and
more efficient to just get a new e-mail address which
is a bit unintuitive and which you never submit to web
services or publish verbatim on pages or in mails?

For example, I always mention my address as

    embe8573 AT&T student DOS uu DOS se

I don't know if that is clever but considering I have
a home page with that handle and that all addresses
are constructed according to that pattern, and besides
the amount of communication and the width of my public
interface, I'd say something must be working as again,
I don't get much spam.

[1] http://user.it.uu.se/~embe8573/conf/emacs-init/gnus/lamer.el

-- 
underground experts united
http://user.it.uu.se/~embe8573

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-01 13:38 ` Enrico Schumann
@ 2015-04-02 16:56   ` Steven Arntson
  2015-04-02 18:48     ` Enrico Schumann
  0 siblings, 1 reply; 13+ messages in thread
From: Steven Arntson @ 2015-04-02 16:56 UTC (permalink / raw)
  To: Enrico Schumann; +Cc: info-gnus-english

Enrico Schumann <es@enricoschumann.net> writes:

> On Wed, 01 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:
>> Is there any sort of simple "starter kit" for newcomers getting going on
>> filtering out spam?
>>
>> Thank you for any advice aimed at a not-very-technical person!
>> -steven
>>
>
> When I used POP some years ago, what worked out of the box for me was
> using SpamAssassin as an external programme (spamc) during splitting, as
> described in the manual:
>
> http://www.gnu.org/software/emacs/manual/html_node/gnus/SpamAssassin.html
>
> To quote from the relevant section:
>
> ,----
> | [A] solution is to call the external tools during splitting. Example
> | fancy split method:
> | 
> |   (setq nnmail-split-fancy '(| (: kevin-spamassassin)
> |                                ...))
> | 
> |   (defun kevin-spamassassin ()
> |     (save-excursion
> |       (save-restriction
> |         (widen)
> |         (if (eq 1 (call-process-region (point-min) (point-max)
> |                                        "spamc" nil nil nil "-c"))
> |             "spam"))))
> `----
>
>
>
> Kind regards,
>      Enrico

Thank you for this---I've read, or tried to, the page you've referenced,
though it's far over my head. I put the code above into my .gnus.el
file. However, I really am in the dark! For instance, is the `...' in
the second line of that code an ellipsis telling me to put my own items
in there, or is it active code that should be preserved? Do I really use
"kevin-spamassassin" or am I to change that to something that has to do
with my own system? At present, the code isn't doing anything as far as
I can tell.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-02 16:56   ` Steven Arntson
@ 2015-04-02 18:48     ` Enrico Schumann
  2015-04-02 21:54       ` Steven Arntson
  0 siblings, 1 reply; 13+ messages in thread
From: Enrico Schumann @ 2015-04-02 18:48 UTC (permalink / raw)
  To: Steven Arntson; +Cc: info-gnus-english

On Thu, 02 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:

> Enrico Schumann <es@enricoschumann.net> writes:
>
>> On Wed, 01 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:
>>> Is there any sort of simple "starter kit" for newcomers getting going on
>>> filtering out spam?
>>>
>>> Thank you for any advice aimed at a not-very-technical person!
>>> -steven
>>>
>>
>> When I used POP some years ago, what worked out of the box for me was
>> using SpamAssassin as an external programme (spamc) during splitting, as
>> described in the manual:
>>
>> http://www.gnu.org/software/emacs/manual/html_node/gnus/SpamAssassin.html
>>
>> To quote from the relevant section:
>>
>> ,----
>> | [A] solution is to call the external tools during splitting. Example
>> | fancy split method:
>> | 
>> |   (setq nnmail-split-fancy '(| (: kevin-spamassassin)
>> |                                ...))
>> | 
>> |   (defun kevin-spamassassin ()
>> |     (save-excursion
>> |       (save-restriction
>> |         (widen)
>> |         (if (eq 1 (call-process-region (point-min) (point-max)
>> |                                        "spamc" nil nil nil "-c"))
>> |             "spam"))))
>> `----
>>
>>
>>
>> Kind regards,
>>      Enrico
>
> Thank you for this---I've read, or tried to, the page you've referenced,
> though it's far over my head. I put the code above into my .gnus.el
> file. However, I really am in the dark! For instance, is the `...' in
> the second line of that code an ellipsis telling me to put my own items
> in there, or is it active code that should be preserved? Do I really use
> "kevin-spamassassin" or am I to change that to something that has to do
> with my own system? At present, the code isn't doing anything as far as
> I can tell.

[Caveat: I cannot test what I describe below since I do not use this
 setup any more.]

First, make sure that SpamAssassin is installed on your system. For
instance, open a terminal and type 'spamc -V', and it should tell you
the installed version.

Then, in your .gnus.el, add something like this:

  (setq nnmail-split-methods 'nnmail-split-fancy
        nnmail-split-fancy '(| (: kevin-spamassassin)
                               "catchall.inbox"))

In which "catchall.inbox" is the group to which all non-spam mails go.

Also add the function kevin-spamassassin, as given in the manual (and
above). The "spam" in the last line of the function is the group to
which spam emails go.

Good luck.

[And you may rename 'kevin-spamassassin' as you wish, as long as you
also use that name with 'nnmail-split-fancy'.]


-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-01 22:53   ` Emanuel Berg
@ 2015-04-02 18:53     ` Enrico Schumann
  0 siblings, 0 replies; 13+ messages in thread
From: Enrico Schumann @ 2015-04-02 18:53 UTC (permalink / raw)
  To: info-gnus-english

On Thu, 02 Apr 2015, Emanuel Berg <embe8573@student.uu.se> writes:

> Enrico Schumann <es@enricoschumann.net> writes:
>
>> When I used POP some years ago, what worked out of
>> the box for me was using SpamAssassin as an external
>> programme (spamc) during splitting, as described in
>> the manual:
>
> I also use POP and I don't get that many spams: those
> I get I am able to KILL which is helpful as they do
> come back [1].
>
> Are you saying POP compared to IMAP is more
> susceptible to spam? Those are protocols that deal
> with the client fetch of mail from the server.
>
> IMAP is more advanced, and so more complicated, but
> I always thought them to be mere protocols - defining
> the message syntax as well as the order and meaning of
> exchanges (e.g., handshakes and so on) in different
> situations, with no implications as to anti-spam.
>
> Or do you mean that particular methods, e.g.
> SpamAssassin which you mention, only works with POP?
>
> If you get a lot of spam, perhaps it is easier and
> more efficient to just get a new e-mail address which
> is a bit unintuitive and which you never submit to web
> services or publish verbatim on pages or in mails?
>
> For example, I always mention my address as
>
>     embe8573 AT&T student DOS uu DOS se
>
> I don't know if that is clever but considering I have
> a home page with that handle and that all addresses
> are constructed according to that pattern, and besides
> the amount of communication and the width of my public
> interface, I'd say something must be working as again,
> I don't get much spam.
>
> [1] http://user.it.uu.se/~embe8573/conf/emacs-init/gnus/lamer.el

The original question was: what is an easy way to handle spam
messages in Gnus? 

I pointed the OP to one relatively-easy way, which does not
require much configuration in Gnus, as described in the manual.

I specifically mentioned POP because the OP said he used POP, and
the configuration may differ for an IMAP setup.

-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-02 18:48     ` Enrico Schumann
@ 2015-04-02 21:54       ` Steven Arntson
  2015-04-03 10:08         ` Enrico Schumann
  0 siblings, 1 reply; 13+ messages in thread
From: Steven Arntson @ 2015-04-02 21:54 UTC (permalink / raw)
  To: info-gnus-english

Enrico Schumann <es@enricoschumann.net> writes:

> On Thu, 02 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:
>
>> Enrico Schumann <es@enricoschumann.net> writes:
>>
>>> On Wed, 01 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:
>>>> Is there any sort of simple "starter kit" for newcomers getting going on
>>>> filtering out spam?
>>>>
>>>> Thank you for any advice aimed at a not-very-technical person!
>>>> -steven
>>>>
>>>
>>> When I used POP some years ago, what worked out of the box for me was
>>> using SpamAssassin as an external programme (spamc) during splitting, as
>>> described in the manual:
>>>
>>> http://www.gnu.org/software/emacs/manual/html_node/gnus/SpamAssassin.html
>>>
>>> To quote from the relevant section:
>>>
>>> ,----
>>> | [A] solution is to call the external tools during splitting. Example
>>> | fancy split method:
>>> | 
>>> |   (setq nnmail-split-fancy '(| (: kevin-spamassassin)
>>> |                                ...))
>>> | 
>>> |   (defun kevin-spamassassin ()
>>> |     (save-excursion
>>> |       (save-restriction
>>> |         (widen)
>>> |         (if (eq 1 (call-process-region (point-min) (point-max)
>>> |                                        "spamc" nil nil nil "-c"))
>>> |             "spam"))))
>>> `----
>>>
>>>
>>>
>>> Kind regards,
>>>      Enrico
>>
>> Thank you for this---I've read, or tried to, the page you've referenced,
>> though it's far over my head. I put the code above into my .gnus.el
>> file. However, I really am in the dark! For instance, is the `...' in
>> the second line of that code an ellipsis telling me to put my own items
>> in there, or is it active code that should be preserved? Do I really use
>> "kevin-spamassassin" or am I to change that to something that has to do
>> with my own system? At present, the code isn't doing anything as far as
>> I can tell.
>
> [Caveat: I cannot test what I describe below since I do not use this
>  setup any more.]
>
> First, make sure that SpamAssassin is installed on your system. For
> instance, open a terminal and type 'spamc -V', and it should tell you
> the installed version.
>
> Then, in your .gnus.el, add something like this:
>
>   (setq nnmail-split-methods 'nnmail-split-fancy
>         nnmail-split-fancy '(| (: kevin-spamassassin)
>                                "catchall.inbox"))
>
> In which "catchall.inbox" is the group to which all non-spam mails go.
>
> Also add the function kevin-spamassassin, as given in the manual (and
> above). The "spam" in the last line of the function is the group to
> which spam emails go.
>
> Good luck.
>
> [And you may rename 'kevin-spamassassin' as you wish, as long as you
> also use that name with 'nnmail-split-fancy'.]

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?

Thank you very much for all of your help here! This is the farthest I've
yet gotten with this.

-steven



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-02 21:54       ` Steven Arntson
@ 2015-04-03 10:08         ` Enrico Schumann
  2015-04-03 19:51           ` Steven Arntson
  0 siblings, 1 reply; 13+ messages in thread
From: Enrico Schumann @ 2015-04-03 10:08 UTC (permalink / raw)
  To: Steven Arntson; +Cc: info-gnus-english

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.


-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-03 10:08         ` Enrico Schumann
@ 2015-04-03 19:51           ` Steven Arntson
  2015-04-04  5:59             ` Enrico Schumann
  0 siblings, 1 reply; 13+ messages in thread
From: Steven Arntson @ 2015-04-03 19:51 UTC (permalink / raw)
  To: info-gnus-english

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.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-03 19:51           ` Steven Arntson
@ 2015-04-04  5:59             ` Enrico Schumann
  2015-04-04 16:55               ` Steven Arntson
  0 siblings, 1 reply; 13+ messages in thread
From: Enrico Schumann @ 2015-04-04  5:59 UTC (permalink / raw)
  To: Steven Arntson; +Cc: info-gnus-english

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-04  5:59             ` Enrico Schumann
@ 2015-04-04 16:55               ` Steven Arntson
  2015-04-04 17:08                 ` Steven Arntson
  2015-04-04 20:20                 ` Enrico Schumann
  0 siblings, 2 replies; 13+ messages in thread
From: Steven Arntson @ 2015-04-04 16:55 UTC (permalink / raw)
  To: info-gnus-english

Enrico Schumann <es@enricoschumann.net> writes:

> 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.
>
> 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?
>
I'm embarrassed, but this was indeed part of the issue. Having
restarted, I received 3 spam mails. One was correctly filtered to "spam"
(victory!) but the other two still went to "inbox."

Checking the message headers, I see that the correctly filed spam
message had an "X-Spam Level" of "****". The unidentified spams were
logged as level "***". Yet, to my eye, they are all obvious spams.

I feel I'm on the road now, but is there a way to improve
performance?

Thank you again.

steven arntson



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-04 16:55               ` Steven Arntson
@ 2015-04-04 17:08                 ` Steven Arntson
  2015-04-04 20:20                 ` Enrico Schumann
  1 sibling, 0 replies; 13+ messages in thread
From: Steven Arntson @ 2015-04-04 17:08 UTC (permalink / raw)
  To: info-gnus-english

Steven Arntson <steven@stevenarntson.com> writes:

> Enrico Schumann <es@enricoschumann.net> writes:
>
>> 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.
>>
>> 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?
>>
> I'm embarrassed, but this was indeed part of the issue. Having
> restarted, I received 3 spam mails. One was correctly filtered to "spam"
> (victory!) but the other two still went to "inbox."
>
> Checking the message headers, I see that the correctly filed spam
> message had an "X-Spam Level" of "****". The unidentified spams were
> logged as level "***". Yet, to my eye, they are all obvious spams.


Reading again through the page you originally referenced, I find this:

|  As some spam is likely to get through anyway, you might want to have a
|  nifty function to call when you happen to read spam. And here is the
|  nifty function:
|  	
|  
| (defun my-gnus-raze-spam ()
|   "Submit SPAM to Vipul's Razor, then mark it as expirable."
|   (interactive)
|   (gnus-summary-save-in-pipe "razor-report -f -d" t)
|   (gnus-summary-mark-as-expirable 1))

Unfortunately, my elisp skills are too weak to understand what this
does.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: newbie spam filtering with gnus
  2015-04-04 16:55               ` Steven Arntson
  2015-04-04 17:08                 ` Steven Arntson
@ 2015-04-04 20:20                 ` Enrico Schumann
  1 sibling, 0 replies; 13+ messages in thread
From: Enrico Schumann @ 2015-04-04 20:20 UTC (permalink / raw)
  To: Steven Arntson; +Cc: info-gnus-english

On Sat, 04 Apr 2015, Steven Arntson <steven@stevenarntson.com> writes:

> Enrico Schumann <es@enricoschumann.net> writes:
>
>> 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.
>>
>> 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?
>>
> I'm embarrassed, but this was indeed part of the issue. Having
> restarted, I received 3 spam mails. One was correctly filtered to "spam"
> (victory!) but the other two still went to "inbox."
>
> Checking the message headers, I see that the correctly filed spam
> message had an "X-Spam Level" of "****". The unidentified spams were
> logged as level "***". Yet, to my eye, they are all obvious spams.
>
> I feel I'm on the road now, but is there a way to improve
> performance?
>
> Thank you again.
>
> steven arntson

I am glad that it worked. Now it all depends on how you configure
SpamAssassin (nothing to do with Emacs/Gnus). I cannot give you
any advice here, since SpamAssassin's default settings have been
good enough for me.

Kind regards,
     Enrico

-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-04-04 20:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01  2:31 newbie spam filtering with gnus 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
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

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).