Processing Maildir contents on message-by-message basis

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Feb 12 08:19:24 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 11 Feb 2015, Jeff Kletsky wrote:

> First off, if I wrangle and mangle the message files directly, do I have to 
> worry about the indexes, or do the indexes "magically" repair themselves in 
> cases where the messages are either altered (including headers) or removed?

1) Never ever modify a message on file system.

2) You can remove and add messages with no problem, the next time the 
mailbox is accessed, the indexes are repaired.

3) You can move messages to ../tmp (that would be a remove in the sense of 
the indexes), change the message there, modify the filename a bit, just to 
be sure, e.g. I add a counter after the hostname part: 
1222364652.P11383Q0M620284.<hostname><counter>,S=7215,W=7294:2, adjust S= 
and W=, and finally move the message back into '.../new' or '.../cur'. 
That way the message is seen as new one (add). If you do so and if you 
have more then 26 keywords in the mailbox, the 27th and up are lost, 
because they cannot be tagged on the filename itself. The indexes are 
repaired as well.

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBVNxiDHz1H7kL/d9rAQI8UAf+MQgqCZlfEi6c1Fg/rqPtR+WUiszaHNjK
kPZ7WDA2hbIgTncJNwRA+6Y4+qmKrSXj/bMhMLsMNlFPYeERw9plf8htYnIVVRgl
sV09otLJ4fBZCeLJwB3DVtFHkh34KSQD2BaUZwV0wyAwrgk6sB9lGaEtTS1Ci3Pu
RLSWl4yHuoN3uRuPTFwAoF5Iq3kG+EwxNY363HDdWqhqDHI7U+7Uj+LRWSi9jy/t
D2S30jvZHEvO7SqjgYdVhKPhNy6lgh1HLuoTTEMK+H5pQk3NnLKTld+d1MdB36F3
O/NrrnJiymF1NZgKri+OCy1T6UPOczfSGt9NkZF04DwSQ3a22tzwKg==
=etwA
-----END PGP SIGNATURE-----


More information about the dovecot mailing list