Hello, I've been playing around with using namespaces to change the way messages are stored. My idea was to use mbox for archival stuff, like this: namespace private { separator = . hidden = no inbox = yes prefox location = maildir:%h/Maildir } namespace private { separator = . hidden = no prefix = "INBOX.Archive." location = mbox:%h/Maildir/Archive } This works *GREAT*, and I'm really pleased with it. However, it occurred to me that for deeply frozen archives, it might be nice to gzip them. Conveniently, there's the zlib plugin. From what I could tell from the documentation, the compressed mbox names must end in ".gz", so I thought I could simply go into ~/Maildir/Archive and gzip everything. But when I did that, Dovecot started behaving strangely. First of all, the result of LIST shows the files like this: * LIST (\NoInferiors \Marked) "." "INBOX.Archive.Friends.gz" Which is obviously wrong. When I try to SELECT it, I get this: ? SELECT "INBOX.Archive.Friends.gz" ? NO Mailbox doesn't exist: Friends/gz Which seems to indicate that Dovecot is treating the dot in the extension as the separator (understandably), and failing. However, if I leave off the extension, I get this: ? SELECT "INBOX.Archive.Friends" ? NO Mailbox doesn't exist: Friends Which seems to indicate that Dovecot isn't translating "Friends" into "Friends.gz" for some reason. Then I remembered that in the ChangeLog, back in May, the zlib plugin was changed to look for the zlib header rather than the Z flag. I assume that was for using it with Maildirs, but I figured it was worth a shot. So I renamed the Friends.gz file to remove the extension. But that just gives me an error message: ? SELECT "INBOX.Archive.Friends" ? NO Mailbox isn't a valid mbox file It seems like loading the zlib plugin either doesn't have any effect, or I'm not doing it right. I have it in the config file along with other plugins that work just fine: mail_plugins = fts fts_squat zlib And when I check that with dovecot -p, it shows up: mail_plugins: fts fts_squat zlib There's no entry in the plugin {} section of the config file for the zlib plugin... but I assume that none is necessary. Am I doing something wrong? ~Kyle -- No people can be great who have ceased to be virtuous. -- Samuel Johnson, on the behavior of the British colonists in America -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 204 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20080624/ab6891ea/attachment-0002.bin>
On Tuesday, June 24 at 01:59 PM, quoth Kyle Wheeler:> I've been playing around with using namespaces to change the way > messages are stored. My idea was to use mbox for archival stuff, > like this: > > namespace private { > separator = . > hidden = no > inbox = yes > prefox > location = maildir:%h/Maildir > } > namespace private { > separator = . > hidden = no > prefix = "INBOX.Archive." > location = mbox:%h/Maildir/Archive > }Something seems to have gone wrong with my setup here. As I've been testing moving large numbers of email into the archive folders (2000+ messages), some of them never make it to the new namespace. Instead of showing up like they're supposed to, they appear as entirely empty messages. Inspecting the raw mbox file, the message has become just an mbox header and an empty line. Not good! Does anyone have any idea how I can help debug this? ~Kyle -- Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian Kernighan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 204 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20080624/653cc39e/attachment-0002.bin>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 OT, maybe, but this...> namespace private { > separator = . > hidden = no > inbox = yes > prefox ^^^...is such a nice typo I I couldn't resist :-) But I doubt it has to do with your original problem. Regards - -- tom?s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIYiR8Bcgs9XrR2kYRAgSjAJ9jwzWgWCfQX5dEeEHpkxgsJCOKngCbBdAc NTWQsIO+SNG6Kkscwsfncss=LOtI -----END PGP SIGNATURE-----
Kyle Wheeler wrote:> Conveniently, there's the zlib plugin. From what I could tell from the > documentation, the compressed mbox names must end in ".gz",Not a solution, but I believe also now that you don't need to change the ending? I think the plugin looks at the first few bytes to determine the type of the file? Ed W
On Tue, 2008-06-24 at 13:59 -0500, Kyle Wheeler wrote:> I've been playing around with using namespaces to change the way > messages are stored. My idea was to use mbox for archival stuff, like > this: > > namespace private { > separator = . > hidden = no > inbox = yes > prefox > location = maildir:%h/Maildir > } > namespace private { > separator = . > hidden = no > prefix = "INBOX.Archive." > location = mbox:%h/Maildir/Archive > }..> ? SELECT "INBOX.Archive.Friends.gz" > ? NO Mailbox doesn't exist: Friends/gzI'd just suggest switching separator to '/' and this problem goes away.> Then I remembered that in the ChangeLog, back in May, the zlib plugin > was changed to look for the zlib header rather than the Z flag. I > assume that was for using it with Maildirs, but I figured it was worth > a shot. So I renamed the Friends.gz file to remove the extension. But > that just gives me an error message: > > ? SELECT "INBOX.Archive.Friends" > ? NO Mailbox isn't a valid mbox fileFor mbox detecting this by reading the file header would be extra disk I/O (since often the file hasn't changed and Dovecot never has to open/read the file). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080712/453b6922/attachment-0002.bin>