unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notspam: a notmuch interface to spamassassin
@ 2013-03-06  6:43 Jameson Graef Rollins
  2013-03-06  8:30 ` Nicolas Pouillard
  2013-03-06 18:40 ` Svend Sorensen
  0 siblings, 2 replies; 6+ messages in thread
From: Jameson Graef Rollins @ 2013-03-06  6:43 UTC (permalink / raw)
  To: Notmuch Mail

[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]

Hey, folks.  I put together a little python program as an interface
between notmuch and spamassassin (sa) that I thought others might be
interested in:

git://finestructure.net/notspam

It's only dependencies are a running local sa daemon and python-notmuch.
It's pretty straightforward: it's just a single python script that has
two main functions 'learn' and 'tag'.  'Learn' takes a notmuch search
and pipes the resulting messages into sa (via sa-learn) to be classified
as ham or spam.  'Tag' takes a notmuch search and passes the resulting
messages through the sa classifier (via spamc) to be tagged as ham or
spam.

Here's how I've been using it:

 * Tag spam manually with the tag 'spam'.  It's good to have done this
   for a while to build up a good amount of manual classification.

 * Once you've got some manual classification, teach sa:

   notspam learn spam tag:spam
   notspam learn ham not tag:spam

   Everything after the meat ('spam'/'ham') are the notmuch search
   terms.  Rerun this periodically to update, but you might want to
   restrict the search a little so sa-learn doesn't eat a lot of
   overhead reprocessing old messages that haven't changed
   classification.

 * Call 'notspam tag' in your post-new hook (all my new messages are
   tagged 'new' initially):

   notspam tag --spam=spamd tag:new

   I give the sa-classified mail a different tag so it's easy to
   distinguish what was classified by me and what was classified by sa.

Pretty simple.  See 'notspam help' for more info.

Right now it's geared specifically for sa, but it would be easy to
expand it to handle arbitrary learn/classify commands.  If there's any
further interest in this, I would be happy to help push on it more.

jamie.

PS: if anyone has any suggestions for Bayesian classifiers better than
sa I'm all ears.  I'm not so happy with sa at the moment.  It misses a
lot more spam than I would like.  Maybe I just haven't tweaked it out
yet, in which case if anyone has any suggestions on how to improve sa's
classification I'm also all ears.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: notspam: a notmuch interface to spamassassin
  2013-03-06  6:43 notspam: a notmuch interface to spamassassin Jameson Graef Rollins
@ 2013-03-06  8:30 ` Nicolas Pouillard
  2013-03-06 16:12   ` Jameson Graef Rollins
  2013-03-06 18:40 ` Svend Sorensen
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Pouillard @ 2013-03-06  8:30 UTC (permalink / raw)
  To: Jameson Graef Rollins, Notmuch Mail

Quoting Jameson Graef Rollins (2013-03-06 07:43:12)
> Hey, folks.  I put together a little python program as an interface
> between notmuch and spamassassin (sa) that I thought others might be
> interested in:
> 
> git://finestructure.net/notspam

Good idea!

[...]

> PS: if anyone has any suggestions for Bayesian classifiers better than
> sa I'm all ears.  I'm not so happy with sa at the moment.  It misses a
> lot more spam than I would like.  Maybe I just haven't tweaked it out
> yet, in which case if anyone has any suggestions on how to improve sa's
> classification I'm also all ears.

As a competitor there is afew [1] which internally uses dbacl.

As of  other spam  filters per  se, I  know my  previous boss  wrote one
called SpamOracle  [2]. The tool  itself seems  to not see  much changes
these days (2003). I  do not use it myself, however  I know people using
it [3] and its very likely that the software is good enough and does not
need much maintenance.

Supporting multiple  tools would be great  and having a nice  way to use
several at  the same time  would be  cool... thinking of  your interface
seems  to trivially  support this  by simply  running the  tool multiple
times.

Best regards,
-- NP

[1]: https://github.com/teythoon/afew
[2]: http://spamoracle.forge.ocamlcore.org/
[3]: http://qa.debian.org/popcon.php?package=spamoracle

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

* Re: notspam: a notmuch interface to spamassassin
  2013-03-06  8:30 ` Nicolas Pouillard
@ 2013-03-06 16:12   ` Jameson Graef Rollins
  0 siblings, 0 replies; 6+ messages in thread
From: Jameson Graef Rollins @ 2013-03-06 16:12 UTC (permalink / raw)
  To: Nicolas Pouillard, Notmuch Mail

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

On Wed, Mar 06 2013, Nicolas Pouillard <np@nicolaspouillard.fr> wrote:
> As a competitor there is afew [1] which internally uses dbacl.

Hey, Nicolas.  I was definitely aware of afew, but I actually wasn't
aware it was using a Bayesian classifier underneath.  Thanks for
pointing me to dbacl.

> As of  other spam  filters per  se, I  know my  previous boss  wrote one
> called SpamOracle  [2]. The tool  itself seems  to not see  much changes
> these days (2003). I  do not use it myself, however  I know people using
> it [3] and its very likely that the software is good enough and does not
> need much maintenance.

From the looks of it, it wouldn't be hard to extend/modify notspam to
support either dbacl or spamoracle, or presumably any other classifier.
I'll see if I can hack something up.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: notspam: a notmuch interface to spamassassin
  2013-03-06  6:43 notspam: a notmuch interface to spamassassin Jameson Graef Rollins
  2013-03-06  8:30 ` Nicolas Pouillard
@ 2013-03-06 18:40 ` Svend Sorensen
  2013-03-07 14:57   ` Ruben Pollan
  1 sibling, 1 reply; 6+ messages in thread
From: Svend Sorensen @ 2013-03-06 18:40 UTC (permalink / raw)
  To: Jameson Graef Rollins, Notmuch Mail

Jameson Graef Rollins <jrollins@finestructure.net> writes:

> Hey, folks.  I put together a little python program as an interface
> between notmuch and spamassassin (sa) that I thought others might be
> interested in:
>
> git://finestructure.net/notspam

Nice!

> PS: if anyone has any suggestions for Bayesian classifiers better than
> sa I'm all ears.  I'm not so happy with sa at the moment.

I used bogofilter when I was hosting my own email, and I was happy with
it.

Svend

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

* Re: notspam: a notmuch interface to spamassassin
  2013-03-06 18:40 ` Svend Sorensen
@ 2013-03-07 14:57   ` Ruben Pollan
  2013-03-08  6:56     ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: Ruben Pollan @ 2013-03-07 14:57 UTC (permalink / raw)
  To: Jameson Graef Rollins, Notmuch Mail

Quoting Svend Sorensen (2013-03-06 19:40:19)
> Jameson Graef Rollins <jrollins@finestructure.net> writes:
> > PS: if anyone has any suggestions for Bayesian classifiers better than
> > sa I'm all ears.  I'm not so happy with sa at the moment.
> 
> I used bogofilter when I was hosting my own email, and I was happy with
> it.

I use crm114 as spam filter, it also works pretty well.


-- 
Rubén Pollán  | http://meskio.net/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nos vamos a Croatan.

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

* Re: notspam: a notmuch interface to spamassassin
  2013-03-07 14:57   ` Ruben Pollan
@ 2013-03-08  6:56     ` Tomi Ollila
  0 siblings, 0 replies; 6+ messages in thread
From: Tomi Ollila @ 2013-03-08  6:56 UTC (permalink / raw)
  To: notmuch

On Thu, Mar 07 2013, Ruben Pollan <meskio@sindominio.net> wrote:

> Quoting Svend Sorensen (2013-03-06 19:40:19)
>> Jameson Graef Rollins <jrollins@finestructure.net> writes:
>> > PS: if anyone has any suggestions for Bayesian classifiers better than
>> > sa I'm all ears.  I'm not so happy with sa at the moment.
>> 
>> I used bogofilter when I was hosting my own email, and I was happy with
>> it.
>
> I use crm114 as spam filter, it also works pretty well.

So many good choices.... Someone Else(TM) should write a wiki page
about spam filtering in notmuch :D

> Rubén Pollán  | http://meskio.net/


Tomi

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

end of thread, other threads:[~2013-03-08  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06  6:43 notspam: a notmuch interface to spamassassin Jameson Graef Rollins
2013-03-06  8:30 ` Nicolas Pouillard
2013-03-06 16:12   ` Jameson Graef Rollins
2013-03-06 18:40 ` Svend Sorensen
2013-03-07 14:57   ` Ruben Pollan
2013-03-08  6:56     ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).