Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Filtering Spam Messages With Bogofilter

35 views
Skip to first unread message

Volkan YAZICI

unread,
Sep 11, 2009, 3:00:37 AM9/11/09
to
Hi,

Below are spam related configurations in my ~/.emacs file.

(setq spam-use-bogofilter t)
(require 'spam)

(setq
gnus-spam-process-newsgroups
'(("nnml:.*"
(gnus-group-spam-exit-processor-bogofilter
gnus-group-ham-exit-processor-bogofilter)))
gnus-spam-process-destinations '(("nnml:.*" "nnml:spam"))
gnus-ham-process-destinations '(("nnml:spam" "nnml:reclassify"))
(setq spam-junk-mailgroups '("nnml:spam") spam-split-group
"nnml:spam")

When I mark a message as spam via S x, it gets highlighted white by
gnus, but I don't see any action performed by gnus to update the
bogofilter spam database. I'm suspecting some missing group-exit hooks
related with updating bogofilter spam database. (~/.bogofilter
directory is totally empty.) Does anybody have any ideas about what I
might be missing? (BTW, yes, there exists a `bogofilter' binary in the
$PATH environment variable.) Any helps will be really appreciated.

OTOH, it'd be really awesome if people can share their own spam
configurations too.


Regards.

P.S. BTW, this is "GNU Emacs 22.2.1 (i486-pc-linux-gnu) of 2008-11-09
on raven, modified by Debian" with "Gnus v5.11".

Ted Zlatanov

unread,
Sep 14, 2009, 3:22:53 PM9/14/09
to
On Fri, 11 Sep 2009 00:00:37 -0700 (PDT) Volkan YAZICI <volkan...@gmail.com> wrote:

VY> Below are spam related configurations in my ~/.emacs file.

VY> (setq spam-use-bogofilter t)
VY> (require 'spam)

VY> (setq
VY> gnus-spam-process-newsgroups
VY> '(("nnml:.*"
VY> (gnus-group-spam-exit-processor-bogofilter
VY> gnus-group-ham-exit-processor-bogofilter)))
VY> gnus-spam-process-destinations '(("nnml:.*" "nnml:spam"))
VY> gnus-ham-process-destinations '(("nnml:spam" "nnml:reclassify"))
VY> (setq spam-junk-mailgroups '("nnml:spam") spam-split-group
VY> "nnml:spam")

VY> When I mark a message as spam via S x, it gets highlighted white by
VY> gnus, but I don't see any action performed by gnus to update the
VY> bogofilter spam database. I'm suspecting some missing group-exit hooks
VY> related with updating bogofilter spam database. (~/.bogofilter
VY> directory is totally empty.) Does anybody have any ideas about what I
VY> might be missing? (BTW, yes, there exists a `bogofilter' binary in the
VY> $PATH environment variable.) Any helps will be really appreciated.

Hi,

your configuration looks OK. Can you turn up gnus-verbose to 9 and see
what's in *Messages*?

VY> OTOH, it'd be really awesome if people can share their own spam
VY> configurations too.

Mine is not exciting because it's entirely server-based, Gnus doesn't do
much besides moving articles. I would appreciate it if you gave your
opinion about spam.el in the spam2.el thread I started just recently.

Thanks
Ted

Volkan YAZICI

unread,
Sep 15, 2009, 4:14:31 AM9/15/09
to
On Sep 14, 10:22 pm, Ted Zlatanov <t...@lifelogs.com> wrote:
> your configuration looks OK.  Can you turn up gnus-verbose to 9 and see
> what's in *Messages*?

First using "C-u 2 g" to retrieve the messages.

Checking new news...
nnml: Reading incoming mail from file...
spam-split: widening the buffer (spam-use-bogofilter requires it)
spam-split: calling the spam-check-bogofilter function
Wrote /home/vy/gnus/mail/debian-user/39021
spam-split: widening the buffer (spam-use-bogofilter requires it)
spam-split: calling the spam-check-bogofilter function
Wrote /home/vy/gnus/mail/bilkent/1302

Entering to "misc" group, marking a message as spam via "S x" and
closing the group buffer via "q".

Retrieving newsgroup: misc...
Fetching headers for misc...done
Sorting threads...done
Generating summary...done
No more unread articles
Exiting summary buffer and applying spam rules
Marking spam as expired without moving it
Expiring articles...done


Regards.

Ted Zlatanov

unread,
Sep 15, 2009, 8:57:11 AM9/15/09
to
On Tue, 15 Sep 2009 01:14:31 -0700 (PDT) Volkan YAZICI <volkan...@gmail.com> wrote:

VY> On Sep 14, 10:22�pm, Ted Zlatanov <t...@lifelogs.com> wrote:
>> your configuration looks OK. �Can you turn up gnus-verbose to 9 and see
>> what's in *Messages*?

VY> First using "C-u 2 g" to retrieve the messages.

VY> Checking new news...
VY> nnml: Reading incoming mail from file...
VY> spam-split: widening the buffer (spam-use-bogofilter requires it)
VY> spam-split: calling the spam-check-bogofilter function
VY> Wrote /home/vy/gnus/mail/debian-user/39021
VY> spam-split: widening the buffer (spam-use-bogofilter requires it)
VY> spam-split: calling the spam-check-bogofilter function
VY> Wrote /home/vy/gnus/mail/bilkent/1302

VY> Entering to "misc" group, marking a message as spam via "S x" and
VY> closing the group buffer via "q".

VY> Retrieving newsgroup: misc...
VY> Fetching headers for misc...done
VY> Sorting threads...done
VY> Generating summary...done
VY> No more unread articles
VY> Exiting summary buffer and applying spam rules
VY> Marking spam as expired without moving it
VY> Expiring articles...done

Bogofilter is not set as your group's spam exit processor (according to
spam-group-processor-p). Can you try using `G c' on a group and
explicitly set it in the group/topic parameters, then mark spam and
exit? If that works, we can check what's inconsistent in your Lisp
configuration (it looks fine as I said, but I may have missed
something). There are old-style and new-style backend specification
formats, which makes it even more annoying for you I'm sure.

Ted

Volkan YAZICI

unread,
Sep 16, 2009, 9:14:32 AM9/16/09
to
On Sep 15, 3:57 pm, Ted Zlatanov <t...@lifelogs.com> wrote:
> Bogofilter is not set as your group's spam exit processor (according to
> spam-group-processor-p).  Can you try using `G c' on a group and
> explicitly set it in the group/topic parameters, then mark spam and
> exit?  If that works, we can check what's inconsistent in your Lisp
> configuration (it looks fine as I said, but I may have missed
> something).  There are old-style and new-style backend specification
> formats, which makes it even more annoying for you I'm sure.

I "G c"ed into "misc" group and selected below parameters.

[X] Spam Summary Exit Processor: [Value Menu] Spam Summary Exit
Processor Choices:
Set:
[ ] gnus-group-spam-exit-processor-ifile
OBSOLETE: The ifile summary exit spam processor.
...
[ ] gnus-group-ham-exit-processor-copy
OBSOLETE: The ham copy exit ham processor. [More]
[ ] Spam: Gmane Report
[X] Spam: Bogofilter
[ ] Spam: Blacklist
...
[ ] Ham: Spam Oracle
Which spam or ham processors will be applied when the summary is
exited.

After pressing to "[Done]" I returned back to *Group* buffer and
marked an article in the "misc" group via "S x" and closed the group
buffer. Below are the related lines appeared in the *Messages* buffer.

Exiting summary buffer and applying spam rules

Registering 1 articles with classification spam, check spam-use-
bogofilter


Marking spam as expired without moving
it

Expiring articles...done
Quit

But when I entered into "misc" group again, I still see the spam
marked message with an "E" status (as was before). Shouldn't it be
disappeared and messaged would have moved into "spam" group?

BTW, I have below configurations in my ~/.gnus.el file and "misc" is
collected under "mail" topic.

(defun custom-nnmail-expiry-wait (group)
(cond ((member (gnus-group-topic group) '("mail" "personal")) 90)
(t 30)))

(setq
gnus-agent-expire-all nil
gnus-agent-expire-days 7
gnus-agent-expire-unagentized-dirs t
nnmail-expiry-wait 7
message-expires 7
nnmail-expiry-wait-function 'custom-nnmail-expiry-wait
gnus-auto-expirable-newsgroups ".*")


Regards.

Ted Zlatanov

unread,
Oct 8, 2009, 3:51:13 PM10/8/09
to
On Wed, 16 Sep 2009 06:14:32 -0700 (PDT) Volkan YAZICI <volkan...@gmail.com> wrote:

VY> On Sep 15, 3:57�pm, Ted Zlatanov <t...@lifelogs.com> wrote:
>> Bogofilter is not set as your group's spam exit processor (according to
>> spam-group-processor-p). �Can you try using `G c' on a group and
>> explicitly set it in the group/topic parameters, then mark spam and
>> exit? �If that works, we can check what's inconsistent in your Lisp
>> configuration (it looks fine as I said, but I may have missed
>> something). �There are old-style and new-style backend specification
>> formats, which makes it even more annoying for you I'm sure.

VY> I "G c"ed into "misc" group and selected below parameters.

VY> [X] Spam Summary Exit Processor: [Value Menu] Spam Summary Exit
VY> Processor Choices:
VY> Set:
VY> [ ] gnus-group-spam-exit-processor-ifile
VY> OBSOLETE: The ifile summary exit spam processor.
VY> ...
VY> [ ] gnus-group-ham-exit-processor-copy
VY> OBSOLETE: The ham copy exit ham processor. [More]
VY> [ ] Spam: Gmane Report
VY> [X] Spam: Bogofilter
VY> [ ] Spam: Blacklist
VY> ...
VY> [ ] Ham: Spam Oracle
VY> Which spam or ham processors will be applied when the summary is
VY> exited.

VY> After pressing to "[Done]" I returned back to *Group* buffer and
VY> marked an article in the "misc" group via "S x" and closed the group
VY> buffer. Below are the related lines appeared in the *Messages* buffer.

VY> Exiting summary buffer and applying spam rules
VY> Registering 1 articles with classification spam, check spam-use-
VY> bogofilter
VY> Marking spam as expired without moving
VY> it
VY> Expiring articles...done
VY> Quit

This is good, it means the Bogofilter backend was called for that message.

VY> But when I entered into "misc" group again, I still see the spam
VY> marked message with an "E" status (as was before). Shouldn't it be
VY> disappeared and messaged would have moved into "spam" group?

You need to set up the spam move target explicitly through `G c' again.
Give it a group name. The default (nil) means don't move, just mark
expired.

VY> BTW, I have below configurations in my ~/.gnus.el file and "misc" is
VY> collected under "mail" topic.

VY> (defun custom-nnmail-expiry-wait (group)
VY> (cond ((member (gnus-group-topic group) '("mail" "personal")) 90)
VY> (t 30)))

VY> (setq
VY> gnus-agent-expire-all nil
VY> gnus-agent-expire-days 7
VY> gnus-agent-expire-unagentized-dirs t
VY> nnmail-expiry-wait 7
VY> message-expires 7
VY> nnmail-expiry-wait-function 'custom-nnmail-expiry-wait
VY> gnus-auto-expirable-newsgroups ".*")

That's all fine, it just relates to expiry and not to spam.el.

Ted

Volkan YAZICI

unread,
Nov 8, 2009, 3:23:04 PM11/8/09
to
Hi,

For the records, I have pasted my fully working compact gnus
+bogofilter configuration to GnusSpam[1] page at EmacsWiki. (Thanks
Ted Zlatanov for his kindly help.)


Regards.

[1] http://www.emacswiki.org/emacs/GnusSpam

Ted Zlatanov

unread,
Nov 12, 2009, 2:09:28 PM11/12/09
to
On Sun, 8 Nov 2009 12:23:04 -0800 (PST) Volkan YAZICI <volkan...@gmail.com> wrote:

VY> For the records, I have pasted my fully working compact gnus
VY> +bogofilter configuration to GnusSpam[1] page at EmacsWiki. (Thanks
VY> Ted Zlatanov for his kindly help.)

VY> [1] http://www.emacswiki.org/emacs/GnusSpam

Thanks for spending time on this.

Ted

0 new messages