Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Is there a simple way to set up spam filtering?
@ 2016-01-03  7:44 Sivaram Neelakantan
  2016-01-03 18:04 ` Teemu Likonen
  0 siblings, 1 reply; 8+ messages in thread
From: Sivaram Neelakantan @ 2016-01-03  7:44 UTC (permalink / raw)
  To: info-gnus-english


So, I look at the docs and it's got a good deal of info on setting up
something to filter spam.  Me, I just want a spam folder, mark a few
mails as spam in mail.misc and over time gnus figures out the spam
mails and moves it automagically to spam folder.  Possible?

Seriously, the docs chapter on spam is hard.  Too hard to even set it
up.  And that's not even coming to the fancy splitting part.

sivaram
-- 


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

* Re: Is there a simple way to set up spam filtering?
  2016-01-03  7:44 Is there a simple way to set up spam filtering? Sivaram Neelakantan
@ 2016-01-03 18:04 ` Teemu Likonen
  2016-01-30 18:34   ` Saša Janiška
  0 siblings, 1 reply; 8+ messages in thread
From: Teemu Likonen @ 2016-01-03 18:04 UTC (permalink / raw)
  To: Sivaram Neelakantan; +Cc: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 1369 bytes --]

Sivaram Neelakantan [2016-01-03 13:14:16+05:30] wrote:

> So, I look at the docs and it's got a good deal of info on setting up
> something to filter spam.  Me, I just want a spam folder, mark a few
> mails as spam in mail.misc and over time gnus figures out the spam
> mails and moves it automagically to spam folder.  Possible?

Gnus can't know what's spam (not very well at least) but a good external
system can. I use and like Bogofilter which must be trained with good
messages and spam messages. It works very well after a training period.
Bogofilter is a separate program but it's easy to install in GNU/Linux
systems. I don't know about other operating systems.

Gnus's spam system can be configured to use Bogofilter but I agree that
as a whole it's quite complicated. I used it many years - and it worked
nicely - but eventually wrote a simpler Bogofilter-based system that is
enough for my own needs:

https://github.com/tlikonen/gnus-bogofilter

> Seriously, the docs chapter on spam is hard.  Too hard to even set it
> up.  And that's not even coming to the fancy splitting part.

Fancy splitting (nnmail-split-fancy) is required because it's the way to
hook custom code to incoming mail delivery.

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]



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

* Re: Is there a simple way to set up spam filtering?
  2016-01-03 18:04 ` Teemu Likonen
@ 2016-01-30 18:34   ` Saša Janiška
  2016-01-30 19:16     ` Teemu Likonen
  0 siblings, 1 reply; 8+ messages in thread
From: Saša Janiška @ 2016-01-30 18:34 UTC (permalink / raw)
  To: info-gnus-english

On Ned, 2016-01-03 at 20:04 +0200, Teemu Likonen wrote:

I'd like to migrate back to Gnus (from Evolution) and need some help
with Gnus-Bogofilter setup...

> Gnus's spam system can be configured to use Bogofilter but I agree
> that as a whole it's quite complicated. I used it many years - and it
> worked nicely - but eventually wrote a simpler Bogofilter-based system
> that is enough for my own needs:

By looking at my old gnus-bogofilter.el snippet I see that you were the
one which modified the code...

> Fancy splitting (nnmail-split-fancy) is required because it's the way
> to hook custom code to incoming mail delivery.

...but it didn't required nnmail-split-fancy which I (still) do not
use. 

So, I'be very thankful if you can provide some help how to either use
Gnus' spam package or your gnus-bogofilter package?

Btw, let me say that I'm playing with Spacemacs, so it would be nice to
have spam handling included in Gnus layer in the future...


Sincerely,
Gour

-- 
He who is regulated in his habits of eating, sleeping, recreation
and work can mitigate all material pains by practicing the yoga system.




_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Is there a simple way to set up spam filtering?
  2016-01-30 18:34   ` Saša Janiška
@ 2016-01-30 19:16     ` Teemu Likonen
  2016-01-30 20:23       ` Saša Janiška
  0 siblings, 1 reply; 8+ messages in thread
From: Teemu Likonen @ 2016-01-30 19:16 UTC (permalink / raw)
  To: Saša Janiška; +Cc: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 1426 bytes --]

Saša Janiška [2016-01-30 19:34:50+01] wrote:

> So, I'be very thankful if you can provide some help how to either use
> Gnus' spam package or your gnus-bogofilter package?

Here's a configuration example for my gnus-bogofilter.el. You can add
this code in your Gnus init file (gnus.el):

    ;; Load gnus-bogofilter.el package.
    (require 'gnus-bogofilter)

    (setq nnmail-split-methods 'nnmail-split-fancy
          nnmail-mail-splitting-decodes t
          nnmail-split-fancy
          '(| (: bogofilter-split "spam" "unsure")
              ;; You can add split rules here if you want to.
              "misc"))

You should also read the docs for nnmail-split-fancy variable so that
you understand how mail splitting works. The above configuration will
move detected incoming spam messages to group "spam", unsure messages to
group "unsure" and all good (ham) messages to group "misc".

In Gnus summary buffer you can use commands M-x bogofilter-register-spam
and M-x bogofilter-register-ham to train Bogofilter's database. Those
will register the current message (or all marked messages) for
Bogofilter. Command M-x bogofilter-check will display current message's
status and spam score. Also see the functions' documentation.

And that's pretty much it.

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]



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

* Re: Is there a simple way to set up spam filtering?
  2016-01-30 19:16     ` Teemu Likonen
@ 2016-01-30 20:23       ` Saša Janiška
  2016-01-30 21:00         ` Teemu Likonen
  0 siblings, 1 reply; 8+ messages in thread
From: Saša Janiška @ 2016-01-30 20:23 UTC (permalink / raw)
  To: info-gnus-english

On Sub, 2016-01-30 at 21:16 +0200, Teemu Likonen wrote:

> You should also read the docs for nnmail-split-fancy variable so that
> you understand how mail splitting works. 

Sure. I'll do.

> The above configuration will move detected incoming spam messages to 
> group "spam", unsure messages to group "unsure" 

That's fine.

> and all good (ham) messages to group "misc".

Considering that I've several email accounts + accounts of wife/mother,
how to configure it to leave ham messages in original INBOX folder?

> In Gnus summary buffer you can use commands M-x bogofilter-register-spam and M-x bogofilter-register-ham to train Bogofilter's database. 

Those cmds are familiar to me from before. :-)


> Command M-x bogofilter-check will display current message's
> status and spam score. 

Nice one!


> Also see the functions' documentation.
> And that's pretty much it.

Thanks a lot.


Sincerely,
Gour

-- 
In the material world, one who is unaffected by whatever good
or evil he may obtain, neither praising it nor despising it,
is firmly fixed in perfect knowledge.




_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Is there a simple way to set up spam filtering?
  2016-01-30 20:23       ` Saša Janiška
@ 2016-01-30 21:00         ` Teemu Likonen
  2017-04-03  7:39           ` Saša Janiška
  0 siblings, 1 reply; 8+ messages in thread
From: Teemu Likonen @ 2016-01-30 21:00 UTC (permalink / raw)
  To: Saša Janiška; +Cc: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 945 bytes --]

Saša Janiška [2016-01-30 21:23:42+01] wrote:

> Considering that I've several email accounts + accounts of
> wife/mother, how to configure it to leave ham messages in original
> INBOX folder?

It sounds like you are using IMAP method. Then you need to read the info
page "(gnus) Client-Side IMAP Splitting" and use nnimap-split-fancy
variable.

After reading the info page "(gnus) Fancy Mail Splitting" I'd say that
putting the symbol nil as the split rule will leave the message where it
was. Here's again my fancy split rule example:

    (| (: bogofilter-split "spam" "unsure")
       ;; You can add split rules here if you want to.
       "misc"))

So in the example replace the string "misc" with symbol nil. I haven't
tested it and I don't use IMAP splitting so I give no guarantees.

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]



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

* Re: Is there a simple way to set up spam filtering?
  2016-01-30 21:00         ` Teemu Likonen
@ 2017-04-03  7:39           ` Saša Janiška
  0 siblings, 0 replies; 8+ messages in thread
From: Saša Janiška @ 2017-04-03  7:39 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 2856 bytes --]

Teemu Likonen <tlikonen@iki.fi> writes:

> It sounds like you are using IMAP method. Then you need to read the info
> page "(gnus) Client-Side IMAP Splitting" and use nnimap-split-fancy
> variable.

After long time and some experience with spam package I decided to
replace it with (simpler) gnus-bogofilter. Spam package worked OK, but
was not able to properly handly false positives…

> After reading the info page "(gnus) Fancy Mail Splitting" I'd say that
> putting the symbol nil as the split rule will leave the message where it
> was. Here's again my fancy split rule example:
>
>     (| (: bogofilter-split "spam" "unsure")
>        ;; You can add split rules here if you want to.
>        "misc"))
>
> So in the example replace the string "misc" with symbol nil. I haven't
> tested it and I don't use IMAP splitting so I give no guarantees.

I use several IMAP accounts and my setup looks as:

(setq gnus-secondary-select-methods
      '(
          (nnimap "gour"
                  (nnimap-address "…“")
                  (nnimap-server-port 993)
                  (nnimap-stream ssl)
                  (nnimap-authinfo-file "~/.authinfo.gpg")
                  (nnimap-inbox ("INBOX" "spam"))
                  (nnimap-split-methods 'nnimap-split-fancy)
                  (nnimap-split-fancy
                   (|
                    (: gnus-registry-split-fancy-with-parent)
                    (: bogofilter-split "spam" "unsure")
                    ("List-Id" ".*<swisseph.yahoogroups.com" "lists.sweph")
                    ("List-Id" ".*udruga\-lista\.atmarama\.org" "lists.udruga")
                    nil)))
                    
          (nnimap "anotherid"
                  (nnimap-address "imap.gmail.com")
                  (nnimap-server-port 993)
                  (nnimap-stream ssl)
                  (nnimap-authinfo-file "~/.authinfo.gpg")
                  (nnimap-inbox ("INBOX"))
                  (nnimap-split-methods 'nnimap-split-fancy) 
                  (nnimap-split-fancy
                   (|
                    (: gnus-registry-split-fancy-with-parent)
                    (: bogofilter-split "spam" "unsure")
                    nil)))
...

but, after launching Gnus, it puts new messages into 'bogus' groups and
i see the following in Messages buffer:

Error in ‘nnmail-split-methods’; using ‘bogus’ mail group:
(void-function bogofilter-split)

I was trying to replace 'nil' with "INBOX" which was used with 'spam'
package, but cannot get rid of bogus groups. Any hint what might be
wrong?


Sincerely,
Gour

-- 
Just try to learn the truth by approaching a spiritual master.
Inquire from him submissively and render service unto him.
The self-realized souls can impart knowledge unto you because
they have seen the truth.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]



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

* Re: Is there a simple way to set up spam filtering?
       [not found] <mailman.1601.1451839085.843.info-gnus-english@gnu.org>
@ 2016-01-03 16:49 ` notbob
  0 siblings, 0 replies; 8+ messages in thread
From: notbob @ 2016-01-03 16:49 UTC (permalink / raw)
  To: info-gnus-english

On 2016-01-03, Sivaram Neelakantan <shanks.n@gmail.com> wrote:

> Seriously, the docs chapter on spam is hard.  Too hard to even set it
> up.  And that's not even coming to the fancy splitting part.

I'm not sure why anyone still wants to use the CLI to read emails.

Ima CLI and emacs junkie, but still use Seamonkey to read incoming
email cuz of all the graphics (mpg, gifs, etc) friends include in
emails to me.  Seamonkey --and prolly a lotta other gui email
clients-- do all the spam filtering you mention.

nb


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

end of thread, other threads:[~2017-04-03  7:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-03  7:44 Is there a simple way to set up spam filtering? Sivaram Neelakantan
2016-01-03 18:04 ` Teemu Likonen
2016-01-30 18:34   ` Saša Janiška
2016-01-30 19:16     ` Teemu Likonen
2016-01-30 20:23       ` Saša Janiška
2016-01-30 21:00         ` Teemu Likonen
2017-04-03  7:39           ` Saša Janiška
     [not found] <mailman.1601.1451839085.843.info-gnus-english@gnu.org>
2016-01-03 16:49 ` notbob

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