On Tue, 2008-02-12 at 22:53 -0800, Ron Avriel wrote:

> I’d like to extend the mail_log plugin to log the uid and keywords of a mail 
> delivered by LDA. The keywords are set by the sieve plugin.
> I added a mail_log_save_finish() function hook listed below. 
> However, the uid of the mail is always zero 

Right, because the UIDs are assigned only when committing the
transaction. With v1.1 the UIDs are returned:

int mailbox_transaction_commit_get_uids(struct mailbox_transaction_context **t,
                                        uint32_t *uid_validity_r,
                                        uint32_t *first_saved_uid_r,
                                        uint32_t *last_saved_uid_r);

I don't think there's an easy way to get them with v1.0.

> and trying to get the keywords results in assertion failure, probably because 
> the message is not committed yet:

If this still happens with v1.1 I could take a look at fixing it..

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to