[Dovecot] spam plugin

Timo Sirainen tss at iki.fi
Sun Dec 19 09:42:40 EET 2004


On Sat, 2004-12-18 at 02:30 +0100, Johannes Berg wrote:
> Here's a new version, it compiles (and appears to work) except the part 
> in "copy_reclassified".
> 
> Can anyone help me (probably only Timo knows how) with that?
> http://johannes.sipsolutions.net/edit/Projects/dovecot-dspam-integration/pseudo-code

You can get the looping code from cmd-copy.c's fetch_and_copy(). Just
change mailbox_copy() to whatever you want to do with the message.
mail->get_stream() gives you contents to the messages, but you
previously said you wanted to hardlink the message? In that case you'd
have to #include "lib-storage/index/maildir/maildir-storage.h" and use
maildir_file_do() to make sure the message is found even if it's flags
are being changed. See maildir/maildir-copy.c how to do it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20041219/e24a6b65/attachment-0001.bin>


More information about the dovecot mailing list