[Dovecot] Maildir permissions, shared folders & postfix

Stroller linux.luser at myrealbox.com
Mon Jan 9 07:17:50 EET 2006


Hi there,

It's my understanding that shared folders can be implemented in the  
Dovecot IMAP server by simply symlinking one maildir to another, eg:

	$ ls -lan /home/DOMAIN/ned/.maildir/
	total 40
	drwx------  9 10012 10000   440 Jan  9 04:23 .
	drwxr-xr-x  3 10012 10000   160 Jan  6 06:32 ..
	drwx------  5 10012 10000   264 Jan  9 04:21 .Deleted Items
	drwx------  5 10012 10000   232 Jan  6 06:32 .Drafts
	drwx------  5 10012 10000   232 Jan  6 06:39 .Junk E-mail
	drwx------  5 10012 10000   264 Jan  9 04:33 .Sent
	lrwxrwxrwx  1 10012     0    24 Jan  6 07:36 .Stroller -> /home/ 
stroller/.maildir/
	drwx------  2 10012 10000   336 Jan  9 04:23 cur
	-rw-------  1 10012 10000   268 Jan  9 04:23 dovecot-uidlist
	-rw-------  1 10012 10000   192 Jan  9 04:23 dovecot.index
	-rw-------  1 10012 10000 21504 Jan  9 04:23 dovecot.index.cache
	-rw-------  1 10012 10000  1908 Jan  9 04:23 dovecot.index.log
	drwx------  2 10012 10000    48 Jan  9 04:23 new
	-rw-------  1 10012 10000    47 Jan  6 07:45 subscriptions
	drwx------  2 10012 10000    48 Jan  9 04:23 tmp

In the above configuration the user Ned has a mailbox "Stroller", in  
which he can read messages & stuff - I can log in as ned and drag &  
drop messages into this mailbox quite happily.

I thought all was well with this type of shared configuration until I  
actually started to try setting it up for the info at ourdomain.com  
mailbox, and tried delivering messages to it.

It seems that Postfix doesn't respect the permissions of the parent  
folder when delivering mail into it:

	# ls -ldn /home/info/.maildir/
	drwxrwx---  5 10021 10000 120 Jan  9 04:26 /home/info/.maildir/
	# ls -ln /home/info/.maildir/
	total 0
	drwxrwx---  2 10021 10000 48 Jan  9 04:26 cur
	drwxrwx---  2 10021 10000 48 Jan  9 04:33 new
	drwxrwx---  2 10021 10000 48 Jan  9 04:31 tmp
	# ls -ln /home/info/.maildir/new
	total 0
	# cat HungUp.txt | sendmail info
	# sudo ls -l /home/info/.maildir/new
	total 4
	# sudo ls -ln /home/info/.maildir/new
	total 4
	-rw-------  1 10021 10000 1806 Jan  9 04:39  
1136781544.V4804I3606cM633316.mail.domain.local

How inconsiderate of Postfix to set secure permissions on the message  
it delivered!! I need the message to have 660 permissions so that  
others in the group can read it! At present this causes Squirrelmail  
to squeal & give nasty messages whenever a shared mailbox is accesses.

Can anyone advise me how to resolve this, please?

Stroller.


PS: should you consider suggesting using Dovecot's "namespaces" type  
of shared mailbox, I'd be grateful if you could answer this first:  
http://dovecot.org/pipermail/dovecot/2005-December/010459.html




More information about the dovecot mailing list