[Dovecot] maildir compressed message fix patch
When a compressed maildir message has a bad S= size in its filename it puts the user in an unrecoverable state, since maildir's do_fix_size function just does a stat() on the maildir file and saves the compressed size in the filename.
This (quick, rough, barely tested) patch addresses this issue, it's inefficient, but we're already in a hopefully rare emergency situation.
--- maildir-mail.c 2014-02-11 22:23:37.000000000 +0000
+++ maildir-mail.c.new 2014-04-24 20:41:25.000000000 +0000
@@ -8,6 +8,7 @@
#include "maildir-filename.h"
#include "maildir-uidlist.h"
#include "maildir-sync.h"
+#include "compression.h"
#include
On 24.4.2014, at 23.54, Richard Platel rplatel@tucows.com wrote:
When a compressed maildir message has a bad S= size in its filename it puts the user in an unrecoverable state, since maildir's do_fix_size function just does a stat() on the maildir file and saves the compressed size in the filename.
These are also relevant:
http://hg.dovecot.org/dovecot-2.2/rev/1adbd576f320 http://hg.dovecot.org/dovecot-2.2/rev/3b9935fe9cb7
This (quick, rough, barely tested) patch addresses this issue, it's inefficient, but we're already in a hopefully rare emergency situation.
Well, I implemented this finally now properly: http://hg.dovecot.org/dovecot-2.2/rev/a1831c9896d4
On 02.05.2014 12:49, Timo Sirainen wrote:
On 24.4.2014, at 23.54, Richard Platel rplatel@tucows.com wrote:
When a compressed maildir message has a bad S= size in its filename it puts the user in an unrecoverable state, since maildir's do_fix_size function just does a stat() on the maildir file and saves the compressed size in the filename.
These are also relevant:
http://hg.dovecot.org/dovecot-2.2/rev/1adbd576f320 http://hg.dovecot.org/dovecot-2.2/rev/3b9935fe9cb7
This (quick, rough, barely tested) patch addresses this issue, it's inefficient, but we're already in a hopefully rare emergency situation.
Well, I implemented this finally now properly: http://hg.dovecot.org/dovecot-2.2/rev/a1831c9896d4
Yeah, thanks Timo! Dovecot's automagic fixing of broken things is back: "Now fixing your messed up S-value with pleasure."
I definitely owe you a beer next time we meet :-)
Regards
Christian
participants (3)
-
Christian Rohmann
-
Richard Platel
-
Timo Sirainen