fetching spam from users' junk folders

Vladislav Kurz vladislav.kurz at webstep.net
Thu Dec 8 05:34:28 EST 2016


On 12/07/16 18:35, Mikhail T. via Info-cyrus wrote:
> On 07.12.2016 12:00, info-cyrus-request at lists.andrew.cmu.edu wrote:
>> I use this to feed spamassassin automatically:
>> https://packages.debian.org/jessie/sa-learn-cyrus
> 
> Do you even need that? Each message can be found on the filesystem
> already in format directly understandable by sa-learn. I have the
> following cron-job running on my server as the cyrus-user:
> 
>     find /var/spool/imap/user/*/spam*/ -type f -name '[0-9]*.' | xargs
>     sa-learn --quiet --spam

Well that is in essence what sa-learn-cyrus does. It is just a nice
wrapper around that. As a bonus to it it can also delete (with ipurge)
the stuff that has been fed to sa-learn. I use "find | xargs sa-learn"
too, when I need to tweak the learning process more than sa-learn-cyrus
allows me to do.

Marcus Schopen wrote:
> Ah yes, thanks. I've seen that package a while a ago. My problem is,
> that SA and Cyrus are not running on the same host.

In that case it may be possible to share the spamassasin bayes database
via NFS, so that you can run sa-learn where the mailboxes are. But I'm
not sure if locking the bayes database is NFS-aware.

-- 
Regards
        Vladislav Kurz



More information about the Info-cyrus mailing list