[Dovecot] Shared folders not woking for me
Hello,
I'm new to dovecot, please forgive me my silly questions. :-)
My OS is FreeBSD 6.1. I just installed dovecot 1.0.beta9. I have created a public namespace this way:
namespace public { separator = / prefix = Public/ location = maildir:/var/mail/public }
namespace private { separator = / prefix = location = maildir:/home/%u/Maildir inbox = yes }
Then I created a new group and added a user to it:
pw groupadd das pw usermod testuser -g das
Then I created some files in /var/mail/public:
drwxrwx--- 2 testuser das 512 Jul 11 19:22 Tasks drwx------ 2 testuser mail 512 Jul 11 19:20 cur drwxrwx--- 2 testuser das 512 Jul 11 19:24 dovecot-shared drwx------ 2 testuser mail 512 Jul 11 19:20 new drwx------ 2 testuser mail 512 Jul 11 19:20 tmp
Then I restarted dovecot, and I tried to subscribe to 'Tasks', but my email client (Thunderbird 1.5) does not allow it.
My other problem is about the "inbox = yes" setting. The private namespace does have an inbox, and it shows up in thunderbird. But it does not show my e-mails. I know that I have emails, I can read them with the 'mail' command.
Please help me.
Laszlo
My other problem is about the "inbox = yes" setting. The private namespace does have an inbox, and it shows up in thunderbird. But it does not show my e-mails. I know that I have emails, I can read them with the 'mail' command.
Another comment for this. I'm using postfix, and my inbox is in
/var/mail/testuser
and it is not in maildir format. But this is the system wide inbox, I guess dovecot can handle this?
Laszlo
On 7/11/2006 09:36, Nagy László seems to have typed:
namespace private { separator = / prefix = location = maildir:/home/%u/Maildir inbox = yes
[snip]
My other problem is about the "inbox = yes" setting. The private namespace does have an inbox, and it shows up in thunderbird. But it does not show my e-mails. I know that I have emails, I can read them with the 'mail' command.
I don't know about the shared mailboxes section, but from the "private" section, it looks like you are trying to have Dovecot use maildir, but if you are getting mail using the "mail" command, then you are using mbox not maildirs.
To setup the system to use maildir, I had to recompile procmail.
If you want to do this, I did the following (FreeBSD 6.1) (as root):
cd /usr/ports/mail/procmail
make
emacs /usr/ports/mail/procmail/work/procmail-3.xx/src/authenticate.c # (where xx) is some numbers corresponding to whatever version is in your ports.) # Change Lines 41-51:
/*#ifndef MAILSPOOLDIR */ #define MAILSPOOLDIR "/usr/mail/" /* watch the trailing / */ /*#endif */ /*#ifndef MAILSPOOLSUFFIX */ #define MAILSPOOLSUFFIX "/" /* suffix to force maildir or MH style */ /*#endif */ #ifndef MAILSPOOLHASH #define MAILSPOOLHASH 0 /* 2 would deliver to /var/spool/mail/b/a/bar */ #endif /*#define MAILSPOOLHOME "/.mail" /* watch the leading / */
cd /usr/ports/mail/procmail/work/procmail-3.xx/src/ make cd /usr/ports/mail/procmail/ make install
# This will cause the mail to be delivered to maildir:/usr/mail/%u
hth
Peter A. Giessel írta:
On 7/11/2006 09:36, Nagy László seems to have typed:
namespace private { separator = / prefix = location = maildir:/home/%u/Maildir inbox = yes
[snip]
My other problem is about the "inbox = yes" setting. The private namespace does have an inbox, and it shows up in thunderbird. But it does not show my e-mails. I know that I have emails, I can read them with the 'mail' command.
I don't know about the shared mailboxes section, but from the "private" section, it looks like you are trying to have Dovecot use maildir, but if you are getting mail using the "mail" command, then you are using mbox not maildirs.
To setup the system to use maildir, I had to recompile procmail.
Thanks. I solved this problem by doing this:
namespace private { separator = / inbox = yes hidden = yes prefix = "#mbox/" location = mbox:/home/%u:INBOX=/var/mail/%u }
namespace private { separator = / prefix = location = maildir:/home/%u/Maildir }
namespace public { separator = / prefix = Public/ location = maildir:/var/mail/public }
I also could create a shared folder. The problem was that I had to use '.Tasks' instead of 'Tasks'. Now I'm having permission problems, but will solve soon. :-)
Laszlo
I also could create a shared folder. The problem was that I had to use '.Tasks' instead of 'Tasks'.
Now I'm having permission problems, but will solve soon. :-) I was wrong. :-) Short description follows.
I create a new group, and add two users to it:
pw groupadd das pw usermod gandalf -g das pw usermod tony -g das
Then I create a shared folder:
mkdir /var/mail/public cd /var/mail/public mkdir dovecot-shared mkdir .Tasks mkdir .Tasks.gandalf mkdir .Tasks.tony cp dovecot-shared .Tasks cp dovecot-shared .Tasks.gandalf cp dovecot-shared .Tasks.tony cd /var/mail/public chmod -R 770 public chown -R davecot:das public
Then I create this namespace:
namespace public { separator = / prefix = Public/ location = maildir:/var/mail/public }
Then I start dovecot, and try to login with gandalf, and subscribe to 'Public/Tasks', 'Public/Tasks/gandalf' and 'Public/Tasks/tony' folders. Fine. The main point is to allow users in the 'das' group to read/write messages in the public folders above.
Now here are the problems:
- When I login and subscribe with user gandalf, dovecot creates the cur,new,tmp subfolders and dovecot.index,dovecot.index.cache and dovecot.index.log files. The files are okay - they are owned by gandalf:das, and their permission is 660. But the 'new' 'cur' and 'tmp' folders are owned by dovecot:mail. Why?
- All right, I go to /var/mail/ again, and do "chown -R dovecot:das public ; chmod -R 770 dovecot:das public". This is still bad. I simply cannot subscribe to these folders. I think I know why. The server side process is running under 'gandalf:mail' or 'tony:mail'. The dirs have permission 770, but owned by 'dovecot:das'.
How can I create a group of users which can use the same public folders? (Other users should not!)
Thanks,
Laszlo
Nagy László wrote:
How can I create a group of users which can use the same public folders? (Other users should not!)
In beta 9 you need to set umask=0007 in dovecot.conf in order to get user created directories to be group read/write.
This has supposedly been fixed in the latest release but I haven't tested yet.
Mark
Mark Nienberg írta:
Nagy László wrote:
How can I create a group of users which can use the same public folders? (Other users should not!)
In beta 9 you need to set umask=0007 in dovecot.conf in order to get user created directories to be group read/write.
This has supposedly been fixed in the latest release but I haven't tested yet. Oh yes, this was the problem!
Thank you very much! :-)
Laszlo
Nagy László wrote:
- When I login and subscribe with user gandalf, dovecot creates the cur,new,tmp subfolders and dovecot.index,dovecot.index.cache and dovecot.index.log files. The files are okay - they are owned by gandalf:das, and their permission is 660. But the 'new' 'cur' and 'tmp' folders are owned by dovecot:mail. Why?
chgrp das /var/mail/public chmod g+s /var/mail/public
Mark
participants (3)
-
Mark Nienberg
-
Nagy László
-
Peter A. Giessel