[Dovecot] Shared folder (namespace) access hanging
Jeff Turner
jeff at atlassian.com
Tue May 16 09:07:08 EEST 2006
Hi,
I'm using Dovecot 1.0-b8. We use a shared 'support' account for incoming
support mail. For security reasons we want to instead have everyone with their
own account, accessing a shared 'support' folder. So I've configured dovecot
with a public 'Support' namespace:
default_mail_env = maildir:/imap/mailboxes/%u
namespace private {
separator = /
prefix =
inbox = yes
}
namespace public {
separator = /
location =
maildir:/imap/mailboxes/support:CONTROL=/imap/mailboxes/%u/shared-settings/support/control
prefix = Support/
hidden = no
}
So now:
- User 'support' logs in (this is the user whose folder is being
shared). Dovecot creates a dovecot-uidlist file:
root at redback:/imap/mailboxes/support/.INBOX.test# cat dovecot-uidlist
1 1147757548 9
1 1147755677.P8078Q3M183587.redback.sydney.atlassian.com:2,RSace
2 1147755677.P8078Q2M183587.redback.sydney.atlassian.com:2,abcdf
3 1147755677.P8078Q1M183587.redback.sydney.atlassian.com:2,Sabcd
4 1147756077.P8078Q8.redback.sydney.atlassian.com:2,Sabcd
5 1147756440.P8461Q3M643698.redback.sydney.atlassian.com:2,Sa
6 1147756440.P8461Q2M643698.redback.sydney.atlassian.com:2,Sa
7 1147756440.P8461Q1M643698.redback.sydney.atlassian.com:2,Sa
8 1147756440.P8461Q0M643698.redback.sydney.atlassian.com:2,Sa
root at redback:/imap/mailboxes/support/.INBOX.test# ls -la
total 60
drwxrwx--- 5 jturner mail 4096 May 16 15:32 .
drwxrwxrwx 59 support mail 4096 May 16 15:31 ..
drwxrwx--- 2 jturner mail 4096 May 16 15:18 cur
-rw-rw-rw- 1 support mail 448 May 16 15:32 dovecot.index
-rw-rw-rw- 1 support mail 21504 May 16 15:32 dovecot.index.cache
-rw-rw-rw- 1 support mail 512 May 16 15:32 dovecot.index.log
-rw------- 1 support mail 72 May 16 15:28 dovecot-keywords
-rw-rw-rw- 1 jturner mail 0 May 16 14:52 dovecot-shared
-rw-rw-rw- 1 support mail 516 May 16 15:32 dovecot-uidlist
drwxrwx--- 2 jturner mail 4096 May 16 15:01 new
drwxrwx--- 2 jturner mail 4096 May 16 15:14 tmp
root at redback:/imap/mailboxes/support/.INBOX.test#
- If I now log in as 'jturner' and subscribe to this folder, there
appears to be nothing in the 'test' folder. On disk, the folder
subscription is registered but the test folder's CONTROL directory is
empty:
# ls /imap/mailboxes/jturner/shared-settings/support/control/
subscriptions
# cat /imap/mailboxes/jturner/shared-settings/support/control/subscriptions
INBOX.test
# ls /imap/mailboxes/jturner/shared-settings/support/control/.INBOX.test/
#
Restarting dovecot and Thunderbird makes no difference.
However, if I delete dovecot.index and dovecot.index.log from
/imap/mailboxes/support/.INBOX.test/, then suddenly it works. User
'jturner' can view the folder contents, and a uidlist file for them
appears:
# cat /imap/mailboxes/jturner/shared-settings/support/control/.INBOX.test/dovecot-uidlist
1 1147758095 9
1 1147755677.P8078Q3M183587.redback.sydney.atlassian.com:2,RSace
2 1147755677.P8078Q2M183587.redback.sydney.atlassian.com:2,abcdf
3 1147755677.P8078Q1M183587.redback.sydney.atlassian.com:2,Sabcd
4 1147756077.P8078Q8.redback.sydney.atlassian.com:2,Sabcd
5 1147756440.P8461Q3M643698.redback.sydney.atlassian.com:2,Sa
6 1147756440.P8461Q2M643698.redback.sydney.atlassian.com:2,Sa
7 1147756440.P8461Q1M643698.redback.sydney.atlassian.com:2,Sa
8 1147756440.P8461Q0M643698.redback.sydney.atlassian.com:2,Sa
Although the contents is the same (1-8), the UIDVALIDITY at the top is
different to that for the 'support' user:
# head -1 /imap/mailboxes/jturner/shared-settings/support/control/.INBOX.test/dovecot-uidlist
1 1147758095 9
# head -1 /imap/mailboxes/support/.INBOX.test/dovecot-uidlist
1 1147757548 9
and now if I log back in as 'support' and access the folder, dovecot
complains:
dovecot: May 16 15:47:05 Error: IMAP(support): Corrupted index cache file /imap/mailboxes/support/.INBOX.test/dovecot.index.cache: indexid changed
Switching back and forth results in various errors:
dovecot: May 16 15:48:04 Error: IMAP(support): Corrupted transaction log file /imap/mailboxes/support/.INBOX.test/dovecot.index.log: end_offset (656) > current sync_offset (512)
dovecot: May 16 15:48:04 Error: IMAP(support): Corrupted transaction log file /imap/mailboxes/support/.INBOX.test/dovecot.index.log: invalid indexid (1147758095 != 1147757548)
dovecot: May 16 15:48:04 Error: IMAP(support): Corrupted transaction log file /imap/mailboxes/support/.INBOX.test/dovecot.index.log: invalid new transaction log sequence (2 >= 2)
dovecot: May 16 15:48:04 Error: IMAP(support): Lost transaction log file /imap/mailboxes/support/.INBOX.test/dovecot.index.log seq 1
------------------------------
In the wild, I've seen frequent occurrences of this error, where dovecot
seems to switch between the UIDVALIDITY of 'support' and a user's
dovecot-uidlists:
dovecot: May 16 13:56:28 Error: IMAP(jturner): Maildir /imap/mailboxes/support/.INBOX sync: UIDVALIDITY changed (1147751603 -> 1147686345)
and here's it toggling back from 'support' to jturner's dovecot-uidlist
uidvalidity:
dovecot: May 16 14:16:04 Error: IMAP(support): Maildir /imap/mailboxes/support/.INBOX sync: UIDVALIDITY changed (1147752716 -> 1147751603)
I've also seen plenty of processes being killed, seemingly at random,
about 3 or 4 a minute:
# cat /usr/local/logs/dovecot | grep killed.wit
...
dovecot: May 16 12:00:16 Error: child 32706 (imap) killed with signal 6
dovecot: May 16 12:00:16 Error: child 32649 (imap) killed with signal 14
dovecot: May 16 12:00:45 Error: child 32412 (imap) killed with signal 6
dovecot: May 16 12:01:02 Error: child 32702 (imap) killed with signal 6
dovecot: May 16 12:01:02 Error: child 368 (imap) killed with signal 6
dovecot: May 16 12:01:02 Error: child 357 (imap) killed with signal 6
dovecot: May 16 12:01:16 Error: child 383 (imap) killed with signal 6
dovecot: May 16 12:02:26 Error: child 32297 (imap) killed with signal 6
...
So I'm confused. Am I doing something stupid? Why is there a common
.cache file (it doesn't get created in the CONTROL dir), but not a common
dovecot-uidlists? Is anyone actually *using* shared folders? :)
Thanks,
Jeff
More information about the dovecot
mailing list