Hi everyone, I've been thinking of phasing out my spamassassin installation (it's hardly doing me any good these days) in favour of dspam. Now since I'm working on this anyway, I thought I'd configure it so when users get any spam, it is delivered into a special folder. I figure I need the 1.0 test series for this, so I can make that folder fixed. But, I also want to allow them to move spam in and out of that folder and dspam can learn it. Anyway, I found a message dating back a while where Timo says this could easily be implemented in a plugin (in the 1.0 test series), but I can't put my finger on how to do it. Does anyone have an example plugin that can run commands when mail is moved in or out of a special folder? Or is there any plugin-writing documentation? Thanks, johannes
On 2004-12-14 16:03:50 +0100, Johannes Berg wrote:> I've been thinking of phasing out my spamassassin installation (it's > hardly doing me any good these days) in favour of dspam. Now since I'm > working on this anyway, I thought I'd configure it so when users get any > spam, it is delivered into a special folder. I figure I need the 1.0 > test series for this, so I can make that folder fixed. But, I also want > to allow them to move spam in and out of that folder and dspam can learn > it. > > Anyway, I found a message dating back a while where Timo says this could > easily be implemented in a plugin (in the 1.0 test series), but I can't > put my finger on how to do it. Does anyone have an example plugin that > can run commands when mail is moved in or out of a special folder? Or is > there any plugin-writing documentation?why not do it at delivery stage from your MTA? imho it is the better place for spamassassin. just my 2 cents darix -- irssi - the client of the smart and beautiful people http://www.irssi.de/
On 14.12.2004, at 17:03, Johannes Berg wrote:> Anyway, I found a message dating back a while where Timo says this > could easily be implemented in a plugin (in the 1.0 test series), but > I can't put my finger on how to do it. Does anyone have an example > plugin that can run commands when mail is moved in or out of a special > folder? Or is there any plugin-writing documentation?Is this enough? http://dovecot.org/patches/1.0/copy_plugin.c Dovecot would need a real plugin API some day which would make things easier.. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20041215/4c0dc13c/attachment-0001.bin>
Timo Sirainen wrote:> Is this enough? > > http://dovecot.org/patches/1.0/copy_plugin.c > > Dovecot would need a real plugin API some day which would make things > easier..I might be interested in working on this, but I'd need a little more details. How is this linked in (and what library)? How is copy_plugin_init() called (it looks like this replaces the default COPY command)? John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748
Timo Sirainen schrieb:> Is this enough? > > http://dovecot.org/patches/1.0/copy_plugin.cYes, it'll serve as a starting point on how to do things. Thanks much. johannes
Tom Allison wrote:> Shared Folder? > Wouldn't you have to do something like this anyways?Something like this in a very broad sense: I have exactly _one_ special folder, supposed to always contain only spam.> If you don't like the folders idea, then tagged the SUBJECT lines and > deliver everything as per usual. I don't do this, I opt for the > multiple folders..Oh, I like the folders idea! I just don't like having to put the maintenance burden on me as a user. Why shouldn't the system do all this /behind the scenes/ with a little special help from the IMAP server?> It's one option. Just to provide some ideas on how it can work.But then, what's wrong with my other suggestion about making that scale by implementing your NewXY folders behind the scenes? johannes
Johannes Berg wrote:> [...]I've collected my thoughs now: http://johannes.sipsolutions.net/wiki/Projects/dovecot-dspam-integration johannes
Am Donnerstag, 16. Dezember 2004 11:46 schrieben Sie:> > script. Even there you can optimize a lot by changing some of the > > queries to allow indizes to take effect. > Have you done that,Yes.> and if so would you share?Yes, of course. I already submitted it to the dspam author but did not get any reaction so I don't know if he considered to include it. In dspam 3.0 the rule to clean up dspam_token_data was terribly stressing my system, changing it to the equivalent (I hope ;) - delete from dspam_token_data where ((innocent_hits=0 and spam_hits < 5) - or (innocent_hits=1 and spam_hits < 3) or (innocent_hits=2 and - spam_hits = 0)) and @a-to_days(last_hit) > 30; reduced the queries run time by a factor of 10 to 50 easily. I simply "flattened" the atrithmetic expression within the "where" clause to allow the indices to support this query.> But this is getting too much OT, maybe we should move over to the dspam > mailing list :)I'm not subscribed there - maybe now everything is said and everyone will excuse this OT mail? ;) Greetings, Gunter -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + http://aachen.uni-dsl.de/ - Der direkte Draht in's Hochschulnetz! + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 362) BSI: Eine Art Ghostbuster-Truppe f?r Sicherheitsfragen (Spiegel Online) -- http://www.iks-jena.de/mitarb/lutz/usenet/Fachbegriffe.der.Informatik.htm l#362 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + PGP-verschl?sselte Mails bevorzugt! + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20041216/9b8c224c/attachment-0001.bin>