Hello, I currently have a setup on my system with what I call "magic folders" to enable spam filter training. Here's how it works: 1. If you have a false-negative, put the spam into the Spam.Report folder 2. If you have a false-positive (which has all kinds of ugly spamassassin protective markup in it), put the message into the Spam.NotSpam folder Currently what happens is that a cron job comes along every five minutes and processes the messages in those folders. In the case of the NotSpam folder, it strips the message of the spamassassin markup, retrains the bayesian net, and redelivers the message (e.g. via deliver). In the case of the Report folder, the message is used to train the bayesian net (among other things) and then deleted. I'd love to be able to trigger these actions when the mail is moved, rather than have a cron job inspecting the mailboxes. I looked into the antispam plugin (http://johannes.sipsolutions.net/Projects/dovecot-antispam), which seems nice but doesn't appear sufficiently generic for my needs. What would really work is if I could get it set up such that putting a message into either of those directories is turned into piping the message to a script of my choosing (a different one for each folder). Does anyone know a good way of getting my own custom behavior in here, or is my cronjob setup probably the best way? ~Kyle -- The optimist thinks this is the best of all possible worlds. The pessimist fears it is true. -- J. Robert Oppenheimer -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 204 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20080611/9c4fca5d/attachment-0002.bin>
Hi The anispam plugin does exactly what you need, and you could forget the cron script. If you use SpamAssassin, you could add a rule to Sieve to move the Spam messages when they arrives to the Spam folder. If a user moves a message from Spam folder to any other folder, then the message is considered a false possitive (when this move is detected you could run sa-learn inmediatly, without the cron script); the other way, when a user moves a message INTO the spam folder you could run again the sa-learn script, but with different parameters. I am testing antispam plugin with dovecot 1.1rcX, but it looks there is a conflict with quota plugin. Anyway you can view the documentation i have done, but it is in spanish. http://wiki.nutum.es/linux/samba/samba_ldap_mds/instalacion_y_configuracion_de_dovecot Regards. 2008/6/11 Kyle Wheeler <kyle-dovecot at memoryhole.net>:> Hello, > > I currently have a setup on my system with what I call "magic folders" to > enable spam filter training. Here's how it works: > > 1. If you have a false-negative, put the spam into the Spam.Report > folder > 2. If you have a false-positive (which has all kinds of ugly > spamassassin protective markup in it), put the message into the > Spam.NotSpam folder > > Currently what happens is that a cron job comes along every five minutes and > processes the messages in those folders. In the case of the NotSpam folder, > it strips the message of the spamassassin markup, retrains the bayesian > net, and redelivers the message (e.g. via deliver). In the case of the > Report folder, the message is used to train the bayesian net (among other > things) and then deleted. > > I'd love to be able to trigger these actions when the mail is moved, rather > than have a cron job inspecting the mailboxes. > > I looked into the antispam plugin > (http://johannes.sipsolutions.net/Projects/dovecot-antispam), which seems > nice but doesn't appear sufficiently generic for my needs. What would really > work is if I could get it set up such that putting a message into either of > those directories is turned into piping the message to a script of my > choosing (a different one for each folder). > > Does anyone know a good way of getting my own custom behavior in here, or is > my cronjob setup probably the best way? > > ~Kyle > -- > The optimist thinks this is the best of all possible worlds. The pessimist > fears it is true. > -- J. Robert Oppenheimer >
Kyle Wheeler wrote:> Hello, > > I currently have a setup on my system with what I call "magic folders" > to enable spam filter training. Here's how it works: > > 1. If you have a false-negative, put the spam into the Spam.Report > folder > 2. If you have a false-positive (which has all kinds of ugly > spamassassin protective markup in it), put the message into the > Spam.NotSpam folder > > Currently what happens is that a cron job comes along every five > minutes and processes the messages in those folders. In the case of > the NotSpam folder, it strips the message of the spamassassin markup, > retrains the bayesian net, and redelivers the message (e.g. via > deliver). In the case of the Report folder, the message is used to > train the bayesian net (among other things) and then deleted. > > I'd love to be able to trigger these actions when the mail is moved, > rather than have a cron job inspecting the mailboxes. > > I looked into the antispam plugin > (http://johannes.sipsolutions.net/Projects/dovecot-antispam), which > seems nice but doesn't appear sufficiently generic for my needs. What > would really work is if I could get it set up such that putting a > message into either of those directories is turned into piping the > message to a script of my choosing (a different one for each folder). > > Does anyone know a good way of getting my own custom behavior in here, > or is my cronjob setup probably the best way? > > ~KyleHello Kyle, Have you tried the plugin using the mailtrain backend? Basically it will forward the message, as attachment, to spam/notspam addresses that you define. That includes the use of a %u variable expansion, if you choose to use retrain addresses like like spam-username at domain.com or something. I've been pretty happy with with it and it scales a lot better than piping the message into a retrain command, since the mail system itself will handle the load in a more intelligent way. Regards, Hugo Monteiro. -- ci.fct.unl.pt:~# cat .signature Hugo Monteiro Email : hugo.monteiro at fct.unl.pt Telefone : +351 212948300 Ext.15307 Centro de Inform?tica Faculdade de Ci?ncias e Tecnologia da Universidade Nova de Lisboa Quinta da Torre 2829-516 Caparica Portugal Telefone: +351 212948596 Fax: +351 212948548 www.ci.fct.unl.pt apoio at fct.unl.pt ci.fct.unl.pt:~# _
On Wed, 2008-06-11 at 10:25 -0500, Kyle Wheeler wrote:> Hello, > > I currently have a setup on my system with what I call "magic folders" > to enable spam filter training. Here's how it works: > > 1. If you have a false-negative, put the spam into the Spam.Report > folder > 2. If you have a false-positive (which has all kinds of ugly > spamassassin protective markup in it), put the message into the > Spam.NotSpam folder > > Currently what happens is that a cron job comes along every five > minutes and processes the messages in those folders. In the case of > the NotSpam folder, it strips the message of the spamassassin markup, > retrains the bayesian net, and redelivers the message (e.g. via > deliver). In the case of the Report folder, the message is used to > train the bayesian net (among other things) and then deleted. > > I'd love to be able to trigger these actions when the mail is moved, > rather than have a cron job inspecting the mailboxes. > > I looked into the antispam plugin > (http://johannes.sipsolutions.net/Projects/dovecot-antispam), which > seems nice but doesn't appear sufficiently generic for my needs. What > would really work is if I could get it set up such that putting a > message into either of those directories is turned into piping the > message to a script of my choosing (a different one for each folder). > > Does anyone know a good way of getting my own custom behavior in here, > or is my cronjob setup probably the best way? > > ~KyleHello Kyle, As a temporary solution, and if your linux box as iNotify support, I suggest you use incron. incron is an "inotify cron" system. It works like the regular cron but is driven by filesystem events instead of time events. Andre Rodier r e d 2 - Service Driven Development 34-35 Eastcastle Street, London W1W 8DW www.red2.co.uk | andre.rodier at red2.co.uk (+44) 0870 471 8492 direct (+44) 0751 124 4961 mobile
Kyle,> 1. If you have a false-negative, put the spam into the Spam.Report > folder > 2. If you have a false-positive (which has all kinds of ugly > spamassassin protective markup in it), put the message into the > Spam.NotSpam folder> I looked into the antispam plugin > (http://johannes.sipsolutions.net/Projects/dovecot-antispam), which > seems nice but doesn't appear sufficiently generic for my needs.No, the plugin doesn't support that. You _could_ do that by loading the plugin twice (the plugin supports compiling as a different plugin name) and configuring the first as such: * declare "Spam.NotSpam" as "spam" folder and make the spam->notspam move a no-op, the notspam->spam the reporting and the second * declare "spam.report" as "spam" folder and make the spam->notspam move a no-op, the notspam->spam do the reporting But that's quite complicated. johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080611/d3b27311/attachment-0002.bin>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 11 Jun 2008, Kyle Wheeler wrote:> those directories is turned into piping the message to a script of my > choosing (a different one for each folder).There is a pipe plugin, which README exactly fits this sentence, search the archives of this list. Bye, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIUOeBVJMDrex4hCIRAuGRAKCoeDuCI2c595H0ubW8BKTT4NS0EwCePkK3 fDuFvdTMtQEo7S4/BERSEn8=YfAK -----END PGP SIGNATURE-----