Re: fetching spam from users' junk folders

Vladislav Kurz via Info-cyrus <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
On 12/07/16 18:35, Mikhail T. via Info-cyrus wrote:
> On 07.12.2016 12:00, [email protected] 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

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.