[Dovecot] Shared Folders via Symlinking
Hi folks,
I'm trying to set up shared folders via symlinking and have come across a problem. I created a folder for one user, then symlinked it to another. I figured that one thing that is likely to happen at some point is that user 2 is going to decide they don't want to look at that folder any more, and will delete it, so I tried this. Much to my relief, it didn't delete the actual mails, just the symlink. However, it did alter the dovecot.index.cache file to indicate that the folder had been removed, and subsequent attempts to select this folder via the primary user resulted in an error, "NO Mailbox was deleted under us". I had to delete dovecot.index.cache to get it working again.
Sorry - can't bring myself to call folders mailboxes... ;-)
Adrian Mardlin in charge @ The Very Good Email Company t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com
The content of this email and any attachment is private and may be legally privileged. If you are not the intended recipient, any use, disclosure, copying or forwarding of this email and/or its attachments is unauthorised. If you have received this email in error please notify the sender by email and delete this message and any attachments immediately from this system.
The Very Good Email Company is a trading style of APM Internet Limited. APM Internet Limited is a limited company incorporated in England and Wales with registration number 04601087 and whose registered office is at Charter Court, Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE
I've managed to fix this initial problem by using INDEX=MEMORY. However, there's another side-effect. When deleting a symlinked folder, it leaves behind a file called ..DOVECOT-TRASHED, which is still symlinked. This then prevents that user from deleting any other folders.
Adrian Mardlin in charge @ The Very Good Email Company t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com
On 21 Dec 2010, at 11:26, Adrian Mardlin wrote:
Hi folks,
I'm trying to set up shared folders via symlinking and have come across a problem. I created a folder for one user, then symlinked it to another. I figured that one thing that is likely to happen at some point is that user 2 is going to decide they don't want to look at that folder any more, and will delete it, so I tried this. Much to my relief, it didn't delete the actual mails, just the symlink. However, it did alter the dovecot.index.cache file to indicate that the folder had been removed, and subsequent attempts to select this folder via the primary user resulted in an error, "NO Mailbox was deleted under us". I had to delete dovecot.index.cache to get it working again.
Sorry - can't bring myself to call folders mailboxes... ;-)
Adrian Mardlin in charge @ The Very Good Email Company t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com
The content of this email and any attachment is private and may be legally privileged. If you are not the intended recipient, any use, disclosure, copying or forwarding of this email and/or its attachments is unauthorised. If you have received this email in error please notify the sender by email and delete this message and any attachments immediately from this system.
The Very Good Email Company is a trading style of APM Internet Limited. APM Internet Limited is a limited company incorporated in England and Wales with registration number 04601087 and whose registered office is at Charter Court, Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE
The content of this email and any attachment is private and may be legally privileged. If you are not the intended recipient, any use, disclosure, copying or forwarding of this email and/or its attachments is unauthorised. If you have received this email in error please notify the sender by email and delete this message and any attachments immediately from this system.
The Very Good Email Company is a trading style of APM Internet Limited. APM Internet Limited is a limited company incorporated in England and Wales with registration number 04601087 and whose registered office is at Charter Court, Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE
On Wed, 2010-12-22 at 11:02 +0000, Adrian Mardlin wrote:
I've managed to fix this initial problem by using INDEX=MEMORY. However, there's another side-effect. When deleting a symlinked folder, it leaves behind a file called ..DOVECOT-TRASHED, which is still symlinked. This then prevents that user from deleting any other folders.
Well, http://hg.dovecot.org/dovecot-2.0/rev/b78e772cf1d2 fixes this problem but I'm not sure what to do about the indexing problem.. I'll either have to fix it some way or just disallow symlinks..
On 30 Dec 2010, at 11:46, Timo Sirainen wrote:
On Wed, 2010-12-22 at 11:02 +0000, Adrian Mardlin wrote:
I've managed to fix this initial problem by using INDEX=MEMORY. However, there's another side-effect. When deleting a symlinked folder, it leaves behind a file called ..DOVECOT-TRASHED, which is still symlinked. This then prevents that user from deleting any other folders.
Well, http://hg.dovecot.org/dovecot-2.0/rev/b78e772cf1d2 fixes this problem but I'm not sure what to do about the indexing problem.. I'll either have to fix it some way or just disallow symlinks..
How about simply deleting the index files before removing the symlink? Why would the Index files need to indicate that a mailbox has been deleted - surely that's handled by the fact that it's not there any more?
Regards,
Adrian
The content of this email and any attachment is private and may be legally privileged. If you are not the intended recipient, any use, disclosure, copying or forwarding of this email and/or its attachments is unauthorised. If you have received this email in error please notify the sender by email and delete this message and any attachments immediately from this system.
The Very Good Email Company is a trading style of APM Internet Limited. APM Internet Limited is a limited company incorporated in England and Wales with registration number 04601087 and whose registered office is at Charter Court, Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE
On Sat, 2011-01-01 at 16:35 +0000, Adrian Mardlin wrote:
Well, http://hg.dovecot.org/dovecot-2.0/rev/b78e772cf1d2 fixes this problem but I'm not sure what to do about the indexing problem.. I'll either have to fix it some way or just disallow symlinks..
How about simply deleting the index files before removing the symlink? Why would the Index files need to indicate that a mailbox has been deleted - surely that's handled by the fact that it's not there any more?
It's to avoid race conditions when another session accesses a mailbox during mailbox deletion. For example quota could get screwed up.
participants (2)
-
Adrian Mardlin
-
Timo Sirainen