[Dovecot] Incorrect W value after filesystem corruption
Timo Sirainen
tss at iki.fi
Tue Dec 14 14:03:38 EET 2010
On Tue, 2010-12-14 at 00:52 +0000, Bob wrote:
> Dec 14 00:15:54 vm dovecot: IMAP(####@####): Maildir filename has wrong
> W value:
> /var/vmail/#####/####/cur/#########.M###########.??.????.??.??,S=4951,W=5057:2,RSa
..
> Can I suggest as an improvement this scenario is handled better? I saw
> one posting which said "this should never happen" but clearly it can and
> I think there could be better handing of it perhaps?
After filesystem corruption the W= value is correct, but the message
body is broken. Is it really ok to just change the W value rather than
log about it to get admin to replace the file with a working one from
backup? You clearly want the former, but I don't know if it's a good
idea.
Also if mails are compressed and you accidentally try to access them
without zlib plugin (e.g. first time via doveadm), you'll get these
errors. If Dovecot started changing the W values then, it would break
working mails due to a misconfiguration.
All this is especially problematic because changing the W value changes
the base filename, which causes the message to get a new UID number. So
the change will be noticeable to clients (and maybe users).
So I'm not all that sure what would be a good way to handle this. Maybe
with v2.0 some doveadm command could verify that these are valid and fix
if not (doveadm force-rebuild maybe).
More information about the dovecot
mailing list