[neomutt-users] What's the best spam filter to use?

Jörg Sommer joerg at jo-so.de
Mon Jun 10 11:25:48 CEST 2019

Steve Quezadas hat am So 09. Jun, 06:31 (-0700) geschrieben:
> Jorg,
> Thank you. I will try bogomail. Just so that I know, does it add some sort
> of flag on the email-list-headers window on mutt? Like does it highlight
> the item as red or put a "S" on it for spam or something? Or does it
> automatically put it in a spam folder?
> Also, is it better to to pair it with procmail or maildrop?

I use bogofilter with procmail and this rule:

:0 fw
| bogofilter -p -e
# -p)assthrough, -e)xitcode 0 for spam and ham

* ^X-Bogosity: Spam

Bogofilter adds a header to the mail with the classification and the
score. You should put this in the unignore rule: `unignore x-bogosity`.
You can colour this line as you like it: `color header yellow blue

I've defined those two keybindings to easily train bogofilter:

macro	index,pager	S	"<enter-command>unset wait_key<enter><pipe-entry>~/bin/bogofilter-train-needed -s<enter><enter-command>set wait_key<enter><delete-message>" "delete message as spam"
macro	index,pager	G	"<enter-command>unset wait_key<enter><pipe-entry>~/bin/bogofilter-train-needed -n<enter><enter-command>set wait_key<enter><save-message>=mdir/default<enter>" "delete message as good"

This is the script to only train a message, if it provides something new.
Feeding mails to bogofilter they don't provide new information, clutters
the knowledgebase and leads to worse results.


echo "$mail" |bogofilter -t

case "$?,$1" in
  0,-s|1,-n|3,*|*,) ;;
    echo "$mail" |bogofilter "$@"
    echo trained


Regards Jörg

#NieWiederCDU – Wir müssen die Zukunft gestalten, statt Überholtes erhalten

Je planmäßiger ein Mensch vorgeht,
desto stärker mag ihn der Zufall treffen.
                    Erich Krunau ‚Die Physiker‘
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 269 bytes
Desc: not available
URL: <https://{'listname': 'neomutt-users-neomutt.org', 'hostname': 'mailman.neomutt.org'}/pipermail/neomutt-users-neomutt.org/attachments/20190610/9c68d473/attachment.sig>

More information about the neomutt-users mailing list