Cyrus (Sieve) and external programs

Pedro silva psilva at onesource.pt
Wed May 30 09:21:57 EDT 2018


Niels, 

sa-learn would be the way to go, but my spamassassin is not on the same
server as my mailboxes. I tried solution with a common mailbox and
something like fetchmail on my spamassassin machine, but could not get
it to work as I intended. 

You are right about learning based on user experience, but as it is a
score based learning I would like to try to see how it goes. Maybe I'll
come to regret it but well... 

Best regards, 

Pedro Silva 

On 30-05-2018 10:42, Niels Dettenbach via Info-cyrus wrote:

> Am Mittwoch, 30. Mai 2018, 10:44:09 CEST schrieb Pedro silva: 
> 
>> Ive seen something like this in other distributions (eg.:
>> https://wiki.dovecot.org/HowTo/AntispamWithSieve) I was just
>> wondering if the same is possible with cyrus or cyrus sieve.
> 
> Just for reading mail files into i.e. spamassassin efficently periodically (in a 
> small to "large" amount of mailboxes) you could do things (by i.e. cron) 
> like:
> 
> - for a "few hundreds" mailboxes (as long as the shell did not complain a to 
> long result list) by cron:
> 
> spam-learn /var/spool/imap/user/*/SpamLearn/*.
> 
> for i.e. a cyrus imap Folder called "SpamLearn" (i.e. auto-created in every 
> mailbox). You possibly have to adapt the whole path to your config/setup.
> 
> - or for much more of, do a loop over:
> 
> for each user:
> spam-learn /var/spool/imap/user/$user/Spam/*.
> 
> In a 2nd step you may delete the Spam folder content by a little imap script 
> to avoid re-reading yet processed mails. "spam-learn" is a script / program 
> which reads emails direcftly fom files.
> 
> seems a bit ugly, but works very efficient on filesystem level. It sepends from 
> the filesystem layer how powerful this could be for you.
> 
> - If you want to avoid cron and process "instantly" you may use the notifier 
> principle as described from Pedro to start such a script for a single mailbox 
> if /at least one) mail is placed in that Folder..
> 
> - It should be possible to to use inotify or similiar filesystem notification 
> features to start such a script too.
> 
> I'm personally do not like "spam training" by users as this often leads to 
> bad / not valuable results, as many typical end users (by my experience) 
> misunderstand what "spam" (technically) is (and/or change their mind about). 
> I.e. they use "forwarded" "spam" fom any external mail sevice/pop, regular 
> list mail fom a company (which all is a valid mail). Such things leads to 
> false positives or (if less weighted) just not useful processing overhead. 
> But this may depend fom the practical application (i do not use Spam marking 
> ("Spam Folder") - just bouncing - as checking Spam Folders costs the end user 
> additional work time if they rely on email....
> 
> good luck.
> best regards,
> 
> niels.
> -- 
> ---
> Niels Dettenbach
> Syndicat IT & Internet
> http://www.syndicat.com
> PGP: https://syndicat.com/pub_key.asc
> ---
> 
> ----
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20180530/c09c655e/attachment.html>


More information about the Info-cyrus mailing list