[Dovecot] Patches
Bernard Blackham
b-dovecot at blackham.com.au
Sat Oct 4 04:27:00 EEST 2003
On Fri, Oct 03, 2003 at 12:27:13PM +0800, Grahame Bowland wrote:
> > Any other patches thatI ought to add. Or better yet, will there be a
> > 0.99.11 soon?
>
> The only other patch we're running is the one by Bernard Blackham
> (it's in the list archives) so that "Deleted" and "Draft" messages
> are handled properly in mbox files. It's a fairly important patch,
> and it'd be really great if it was in the Debian package.
Timo clarified that the patch was only necessary for mboxes, not
maildirs so part of it wasn't applied. Attached is the correct patch
for mboxes only. Without it, users will get very confused very
quickly so it'd be good to see it in the Debian package. :)
For new installations, it's fine, but if you upgrade to a version
with this patch, users will discover all their Draft messages as
Deleted and all their Deleted messages as Draft. I have a small
utility to reverse these flags in an mbox if anybody is interested.
Thanks,
Bernard.
--
Bernard Blackham
bernard at blackham dot com dot au
-------------- next part --------------
diff -ruN dovecot-0.99.10/src/lib-index/mbox/mbox-index.c dovecot-0.99.10.brb/src/lib-index/mbox/mbox-index.c
--- dovecot-0.99.10/src/lib-index/mbox/mbox-index.c Mon May 19 15:26:46 2003
+++ dovecot-0.99.10.brb/src/lib-index/mbox/mbox-index.c Sat Sep 27 13:19:41 2003
@@ -157,13 +157,13 @@
case 'F':
flags |= MAIL_FLAGGED;
break;
- case 'D':
+ case 'T':
flags |= MAIL_DRAFT;
break;
case 'R':
flags |= MAIL_SEEN;
break;
- case 'T':
+ case 'D':
flags |= MAIL_DELETED;
break;
}
diff -ruN dovecot-0.99.10/src/lib-index/mbox/mbox-rewrite.c dovecot-0.99.10.brb/src/lib-index/mbox/mbox-rewrite.c
--- dovecot-0.99.10/src/lib-index/mbox/mbox-rewrite.c Sun Jun 15 11:43:05 2003
+++ dovecot-0.99.10.brb/src/lib-index/mbox/mbox-rewrite.c Sat Sep 27 13:19:54 2003
@@ -210,9 +210,9 @@
str = t_strconcat("X-Status: ",
(ctx->msg_flags & MAIL_ANSWERED) ? "A" : "",
- (ctx->msg_flags & MAIL_DRAFT) ? "D" : "",
+ (ctx->msg_flags & MAIL_DELETED) ? "D" : "",
(ctx->msg_flags & MAIL_FLAGGED) ? "F" : "",
- (ctx->msg_flags & MAIL_DELETED) ? "T" : "",
+ (ctx->msg_flags & MAIL_DRAFT) ? "T" : "",
x_status, NULL);
if (o_stream_send_str(ctx->output, str) < 0)
diff -ruN dovecot-0.99.10/src/lib-storage/index/mbox/mbox-save.c dovecot-0.99.10.brb/src/lib-storage/index/mbox/mbox-save.c
--- dovecot-0.99.10/src/lib-storage/index/mbox/mbox-save.c Sun Jun 15 11:43:05 2003
+++ dovecot-0.99.10.brb/src/lib-storage/index/mbox/mbox-save.c Sat Sep 27 13:20:28 2003
@@ -131,11 +131,11 @@
if ((flags & MAIL_ANSWERED) != 0)
str_append_c(str, 'A');
- if ((flags & MAIL_DRAFT) != 0)
+ if ((flags & MAIL_DELETED) != 0)
str_append_c(str, 'D');
if ((flags & MAIL_FLAGGED) != 0)
str_append_c(str, 'F');
- if ((flags & MAIL_DELETED) != 0)
+ if ((flags & MAIL_DRAFT) != 0)
str_append_c(str, 'T');
str_append_c(str, '\n');
}
More information about the dovecot
mailing list