[Dovecot] building a simple antispam plugin

Johannes Berg johannes at sipsolutions.net
Sat Apr 19 16:06:26 EEST 2008


> I'm trying to build another antispam plugin, but some things are a bit
> unclear.

What are you trying to achieve? Just build another backend for my
antispam plugin?

> In backend_handle_mail I put store the signature returned from
> signature_extract into my antispam_transaction_context. In
> backend_commit it appears that the signature is empty. (It wasn't in
> backend_handle_mail).
> Somehow between backend_handle_mail en backend_commit it has been
> cleared... When I use i_strdup it appears to work. Anyone can tell me
> where this clearing happens? Is i_strdup the right way to do it then?

Well, how did you put it in there? It's well possible that the memory
was allocated on a stack or in a pool that has been cleared/freed...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080419/43f9f9eb/attachment.bin 

More information about the dovecot mailing list