Rainer Weikusat
2010-Mar-21 21:22 UTC
[Dovecot] Possible programming error in maildir_mail_get_save_date
The maildir_mail_gate_save_date routine (lib-storage/index/maildir/maildir-mail.c) returns the save date when that was determined by looking at the ctime of the corresponding file. This is different from all other get_save_date routines which either return -1 if the date could not be determined or 0 to signal success. A particular problem caused by this would be that the first_nonexpunged_timestamp routine (plugins/expire/expire-plugin) never finds a not-yet-expired e-mail after the first message in a mailbox has been expunged when using the maildir storage and file ctimes for save dates, causing the expire_mailbox_transaction_commit function (same file) to delete expiry information for the mailbox in question from the expires table despite mails supposed to expire still exist. Patch below is against 1.2.11. ----- Index: dovecot/src/lib-storage/index/maildir/maildir-mail.c ==================================================================RCS file: /sysdata/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.2.2.1 diff -u -r1.1.1.2 -r1.1.1.2.2.1 --- dovecot/src/lib-storage/index/maildir/maildir-mail.c 15 Mar 2010 18:18:14 -0000 1.1.1.2 +++ dovecot/src/lib-storage/index/maildir/maildir-mail.c 19 Mar 2010 22:33:44 -0000 1.1.1.2.2.1 @@ -154,7 +154,7 @@ return -1; *date_r = data->save_date = st.st_ctime; - return data->save_date; + return 0; } static int
Timo Sirainen
2010-Mar-22 00:18 UTC
[Dovecot] Possible programming error in maildir_mail_get_save_date
On Sun, 2010-03-21 at 22:22 +0100, Rainer Weikusat wrote:> - return data->save_date; > + return 0;Thanks! I should have read this before releasing v2.0.beta4 just a few minutes ago. :) I guess this could explain (some of) the complaints about expire plugin not working right. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20100322/5b4b4ad0/attachment-0002.bin>