Re: local SPAM filtering: was: [Patch] Enable multi-threaded POP3 retrieval
Albrecht Dreß <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.balsa |
|---|---|
| Message-ID | <[email protected]> |
Hi Jack: Am 07.01.18 04:11 schrieb(en) Jack: > Gentoo has quite a large list of apps in their mail-filter category. I have started to go through them, but so far, the problem for me is that most of the are not suitable for my usage - a single user wanting to filter multiple pop3 feeds. When I have more time, I'll go through the list with a bit more care than I have bothered with so far. However, thanks for the suggestions. I use spamassassin and procmail for local spam filtering. In short: (1) install spamassassin, its client (spamc) and procmail (2) optionally install razor and/or pyzor (3) initially train the Bayes db with the spam/ham files you can find on the spamassassin site (4) create a system-wide spamassassin config (Ubuntu/Debian: /etc/spamassassin/local.cf) according to your needs. I had to add the following for using Pyzor and for better filtering results ---8<---------------------------- required_score 4.0 use_pyzor 1 pyzor_options --homedir /etc/spamassassin use_bayes 1 bayes_path /var/lib/spamassassin/bayes_db/bayes ---8<---------------------------- (5) for testing, send a RFC822 file (e.g. one message from a maildir mailbox) to spamc: “spamc < message_file”. The output should contain a new “X-Spam-Status:” header (6) create/modify the ~/.procmailrc file by adding the following rules at the beginning (stolen from somewhere on the Internet): ---8<---------------------------- :0fw: .spamc.lck * < 4194304 | spamc :0: * ^X-Spam-Status: Yes Junk/ ---8<---------------------------- The first rule sends messages smaller than 4 MByte to spamc. The second shifts all messages which have been classified as spam to the Maildir mailbox “Junk”. If you trust your provider's spam headers (I don't; my provider classifies all GPG-encrypted messages as Spam…), you may /prepend/ appropriate rules to shift such messages to Junk, saving the time for the local check. (7) In the Balsa mailbox configuration, activate “Filter messages through procmail” and set “procmail -f -” as procmail command. From time to time, I use the messages in the Junk mailbox to train spamassassin: “sudo sa-learn --spam --progress ~/mail/Junk”. Hope this helps, Albrecht. _______________________________________________ balsa-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/balsa-list
signature.asc
(application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJaUhYkAAoJEEypbw5n59n4BBQH/A5C6wfMrsxtmcHDDwDED9KO 65eynsYpWJpSo8awgQcVWKy8JKW44RmuXAauLYrsl9DSfboK3xuzwdFeSvdXyEL6 pACLxtdtWngPTc02wMVCHHOe0EXivdnVVh3zcDnELGCmjoYORH6zlF60iyPTRpXr J8QYyAsLaewkgvF6WutltFlq073p3kdNvKyebQkVI+OarGw0mEGjBtuExmas4I2s c3vg8DqlhLv1pvF5zWN2ALudQu7rLJ65MJtdld9QhmVj3/KrZM8ICfmSOiT99Rle RUEHsLFVwbmjkt12UcmydfnOxDPcmNNO7A5xpvbF0UZq9uQ5Eojw8H1AtHDooEY= =lTYL -----END PGP SIGNATURE-----