[Dovecot] Using IMAP keywords instead of mailboxes for spam with dovecot-antispam
Timo Sirainen
tss at iki.fi
Thu Mar 20 17:04:42 EET 2008
On Thu, 2008-03-20 at 15:16 +0100, Johannes Berg wrote:
> The thing is that I don't know what context the update_keywords function
> runs in and whether it has a transaction at all, so I don't know how to
> roll back. I suppose it would be possible to grab the original keyword
> list before invoking super.update_keywords() and then resetting to that
> if the backend fails...
I haven't looked at your code, but struct mail always has a transaction
(mail->transaction). You could fail the transaction by hooking into
transaction_commit and calling rollback if your internal failure-flag
was set.
But that sounds a bit extreme. Aren't you just adding/removing a single
keyword? If so, you can use mail_update_keywords() to just add/remove
that without reading/touching other keywords.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080320/5d3254c2/attachment.bin
More information about the dovecot
mailing list