Craig Jackson
2006-Oct-10 17:20 UTC
[Dovecot] How Dovecot handles email changed by file operations
Hi, We have been using Courier-imap for a few years. I am always in the process of reviewing competing software, and hence my interest in Dovecot. Question: If email files are moved between IMAP folders (on the same IMAP server or a different one) or deleted using shell scripts, how does this impact Dovecot's indexes or its method of keeping track of the email? How likely is index or file corruption or race condition? An example, is the centralized removal of mail in all users' Junk folder older than 30 days. We use Maildir format and Dovecot 1.0-RC7 with Mysql. We have about 150 users. Thanks. Craig
Anand Buddhdev
2006-Oct-10 18:03 UTC
[Dovecot] How Dovecot handles email changed by file operations
Craig Jackson wrote:> Hi,Hi Craig,> Question: If email files are moved between IMAP folders (on the same > IMAP server or a different one) or deleted using shell scripts, how > does this impact Dovecot's indexes or its method of keeping track of > the email? How likely is index or file corruption or race condition? > An example, is the centralized removal of mail in all users' Junk > folder older than 30 days.As far as I know, if you add or remove files to a Maildir, then dovecot will have no problem. It will rebuild the indexes as necessary. Besides my IMAP client, I occasionally use mutt to access my Maildirs directly, and haven't had a problem so far. What _would_ cause a problem is if you modify the contents of a file in a Maildir. Dovecot won't notice that, and the change (in the headers) may not be propagated. -- Anand
Timo Sirainen
2006-Oct-10 18:09 UTC
[Dovecot] How Dovecot handles email changed by file operations
On 10.10.2006, at 20.20, Craig Jackson wrote:> Question: If email files are moved between IMAP folders (on the same > IMAP server or a different one) or deleted using shell scripts, how > does > this impact Dovecot's indexes or its method of keeping track of the > email? How likely is index or file corruption or race condition? An > example, is the centralized removal of mail in all users' Junk folder > older than 30 days.Works just fine. Well, there is a very small possibility of readdir() syscall skipping some files if they're being moved exactly at the same time, which causes the mails to get temporarily lost, then in the next sync a couple of error messages will be written to Dovecot's logs and then they show up again. Courier has the exact same problem, but it just handles it silently (and worse than Dovecot by reusing UIDs that were already told to be expunged to clients). -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20061010/501a6d3b/attachment.bin>