Hello,
I just installed dovecot (1.0.10) to replace UW-IMAP. So far almost everything works. But I need shared folders (mbox format). I hope I've set up everything but when a user subscribes to one of the shared folders a file .subscriptions with perm 600 is created in the parent directory of the shared mailboxes ("namespace public" below). As I understand the docs that file should go to the user's home directory, right? What did I wrong? Thank you in advance.
Here is my dovecot.conf (comments and blank lines stripped):
---- snip ---- protocols = imap imaps pop3 disable_plaintext_auth = no ssl_disable = yes mail_location = mbox:~/mbox:INBOX=/var/mail/%u:INDEX=/var/mailindexes/%u namespace private { inbox = yes } namespace public { prefix = Public/ location = mbox:/var/spool/imap:INDEX=/var/mailindexes hidden = no } mail_full_filesystem_access = yes mbox_read_locks = fcntl mbox_write_locks = fcntl protocol imap { } protocol pop3 { pop3_uidl_format = %08Xu%08Xv } protocol lda { } auth default { mechanisms = plain passdb shadow { } userdb passwd { } user = root } dict { } plugin { } ---- snip ----
--
Hello Charles,
On Sun, Feb 03, 2008 at 02:31:04PM -0500, you wrote:
Don't do this, just provide output of dovecot -n...
O.k., good idea. Here is the output of dovecot -n:
---- snip ---- # 1.0.10: /usr/local/etc/dovecot.conf protocols: imap imaps pop3 ssl_disable: yes disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login mail_location: mbox:~/mbox:INBOX=/var/mail/%u:INDEX=/var/mailindexes/%u mail_full_filesystem_access: yes mbox_write_locks: fcntl mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv namespace: type: private inbox: yes namespace: type: public prefix: Public/ location: mbox:/var/spool/imap:INDEX=/var/mailindexes auth default: passdb: driver: shadow userdb: driver: passwd ---- snip ----
Any hints?
--
On Sun, 2008-02-03 at 17:41 +0100, Jochen wrote:
Hello,
I just installed dovecot (1.0.10) to replace UW-IMAP. So far almost everything works. But I need shared folders (mbox format). I hope I've set up everything but when a user subscribes to one of the shared folders a file .subscriptions with perm 600 is created in the parent directory of the shared mailboxes ("namespace public" below). As I understand the docs that file should go to the user's home directory, right? What did I wrong? Thank you in advance.
The .subscriptions file goes to the mbox root directory. This can't be changed with mboxes. With maildir you could specify a different directory with :CONTROL=path.
location = mbox:/var/spool/imap:INDEX=/var/mailindexes
So to /var/spool/imap/.subscriptions with this setting, which is what you meant I guess?
With v1.1 there's a new subscriptions=no namespace setting. Then you can specify that you have all users' subscriptions in only the private namespace.
Hello Timo,
On Tue, Feb 05, 2008 at 12:47:08PM +0200, you wrote:
The .subscriptions file goes to the mbox root directory. This can't be changed with mboxes.
If I have a few central shared IMAP folders in mbox format, how could I manage the subscriptions problem? Here it is quite usual that several users subscribes to one or more of these folders. If the .subscriptions file goes to the root directory of those shared folders only the first user will be able to subscribe to these folders.
With maildir you could specify a different directory with :CONTROL=path.
O.k., is it possible to convert just the shared folders to Maildir leaving the user mailboxes in mbox format for now? That may be a workaround. I think the subscriptions file should be stored relative to user's $HOME.
With v1.1 there's a new subscriptions=no namespace setting. Then you can specify that you have all users' subscriptions in only the private namespace.
Great. But v1.1 does not compile in our good old mailserver. :-( gcc 2.91 (please, no comment on this...). Perhaps it is possible to compile a statically linked dovecot on one of our newer machines?
--
On Tue, 2008-02-05 at 14:50 +0100, Jochen wrote:
Hello Timo,
On Tue, Feb 05, 2008 at 12:47:08PM +0200, you wrote:
The .subscriptions file goes to the mbox root directory. This can't be changed with mboxes.
If I have a few central shared IMAP folders in mbox format, how could I manage the subscriptions problem? Here it is quite usual that several users subscribes to one or more of these folders. If the .subscriptions file goes to the root directory of those shared folders only the first user will be able to subscribe to these folders.
Right, that's a problem that can't be solved with v1.0 + mbox.
With maildir you could specify a different directory with :CONTROL=path.
O.k., is it possible to convert just the shared folders to Maildir leaving the user mailboxes in mbox format for now?
Yes. Just change the location = .. in the shared namespace to point to maildir instead of mbox.
With v1.1 there's a new subscriptions=no namespace setting. Then you can specify that you have all users' subscriptions in only the private namespace.
Great. But v1.1 does not compile in our good old mailserver. :-( gcc 2.91 (please, no comment on this...).
A few days (or weeks?) ago there was a patch in this list for compiling Dovecot v1.1 with gcc 2.95. That would probably work for 2.91 too.
Perhaps it is possible to compile a statically linked dovecot on one of our newer machines?
That should work too.
Hello Timo,
On Tue, Feb 05, 2008 at 04:43:57PM +0200, you wrote:
Yes. Just change the location = .. in the shared namespace to point to maildir instead of mbox.
It seems to work. A maildir structure is created according the location line in then configuration file.
But in Seamonkey, the MUA I use for the tests, the prefix is showed as a directory entry. I cannot subscribe to anything because the entry does not have any mailboxes to subscribe to.
Perhaps I did something wrong? Here is the actual configuration:
--- snip --- # 1.0.10: /usr/local/etc/dovecot.conf protocols: imap imaps pop3 ssl_disable: yes disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login mail_location: mbox:~/mbox:INBOX=/var/mail/%u:INDEX=/var/mailindexes/%u mail_full_filesystem_access: yes mbox_write_locks: fcntl mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv namespace: type: private inbox: yes namespace: type: public prefix: aatest/ location: maildir:/var/spool/imap/test:INDEX=/var/mailindexes:CONTROL=~ auth default: passdb: driver: shadow userdb: driver: passwd --- snip ---
A few days (or weeks?) ago there was a patch in this list for compiling Dovecot v1.1 with gcc 2.95. That would probably work for 2.91 too.
Tried it, does not help. 2.91 is REALLY old, I know. :-/
--- snip ---
failures.c:107: macro CONTEXT_CALLBACK' used with too many (6) args make[4]: *** [failures.o] Error 1 make[4]: Leaving directory
/tmp/dovecot-1.1.beta14/src/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory /tmp/dovecot-1.1.beta14/src/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory
/tmp/dovecot-1.1.beta14/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/dovecot-1.1.beta14'
make: *** [all] Error 2
--- snip ---
The problem is line 144 in src/lib/macro.h: --- snip --- # define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) --- snip ---
The compiler does not like the three dots in the parameter list. Unfortunately I don't know enough about C to correct that.
-- Regards, Jochen
On Feb 5, 2008, at 11:11 PM, Jochen wrote:
Hello Timo,
On Tue, Feb 05, 2008 at 04:43:57PM +0200, you wrote:
Yes. Just change the location = .. in the shared namespace to point
to maildir instead of mbox.It seems to work. A maildir structure is created according the location line in then configuration file.
But in Seamonkey, the MUA I use for the tests, the prefix is showed as a directory entry. I cannot subscribe to anything because the entry does not have any mailboxes to subscribe to.
Perhaps I did something wrong? Here is the actual configuration:
Add separator = / to the maildir namespace. All (visible) namespaces
must have the same separator (v1.1 forces this).
# define CONTEXT_CALLBACK(name, callback_type, callback,
context, ...) --- snip ---The compiler does not like the three dots in the parameter list. Unfortunately I don't know enough about C to correct that.
Well, at least one way to fix this would be to comment out from src/ lib/macros.h:
# define CONTEXT_TYPE_SAFETY
Hello Timo,
On Wed, Feb 06, 2008 at 09:15:53AM +0200, you wrote:
Add separator = / to the maildir namespace. All (visible) namespaces
must have the same separator (v1.1 forces this).
I added / as separator to both namespaces - private inbox and my shared imap box. No success. It appears in the "subscribe" window of SeaMonkey but without a checkbox (like the other entries have) and greyed out.
Well, at least one way to fix this would be to comment out from src/ lib/macros.h:
# define CONTEXT_TYPE_SAFETY
This cannot work since the problematic "..." appears in the "ifdef" branch and in the "else" branch (line 140..147 in src/lib/macro.h).
-- Regards, Jochen
On Feb 6, 2008, at 6:34 PM, Jochen wrote:
Hello Timo,
On Wed, Feb 06, 2008 at 09:15:53AM +0200, you wrote:
Add separator = / to the maildir namespace. All (visible) namespaces must have the same separator (v1.1 forces this).
I added / as separator to both namespaces - private inbox and my shared imap box. No success. It appears in the "subscribe" window of SeaMonkey but without a checkbox (like the other entries have) and greyed out.
It's always easier to check things by talking IMAP protocol directly:
telnet localhost 143 1 login username password 2 list "" *
Does the list look ok? Is the second parameter in all of the returned
lines "/"? Are the flags ok (no \Noselect)?
Hello Timo,
On Wed, Feb 06, 2008 at 06:48:41PM +0200, you wrote:
It's always easier to check things by talking IMAP protocol directly:
telnet localhost 143 1 login username password 2 list "" *
Does the list look ok? Is the second parameter in all of the returned
lines "/"? Are the flags ok (no \Noselect)?
--- snip ---
- LIST (\Noselect \HasChildren) "/" "AATest" --- snip ---
That is the shared folder I created for my tests. \HasChildren should be ok, these are "cur" "new" and "tmp". What is the reason for \Noselect?
On the other hand: the subdirs "cur" "new" and "tmp" are part of the internal structure of Maildir, right? Why are they interpreted as "\HasChildren"?
-- Regards, Jochen
On Feb 6, 2008, at 7:25 PM, Jochen wrote:
Hello Timo,
On Wed, Feb 06, 2008 at 06:48:41PM +0200, you wrote:
It's always easier to check things by talking IMAP protocol directly:
telnet localhost 143 1 login username password 2 list "" *
Does the list look ok? Is the second parameter in all of the returned lines "/"? Are the flags ok (no \Noselect)?
--- snip ---
- LIST (\Noselect \HasChildren) "/" "AATest" --- snip ---
That is the shared folder I created for my tests.
That's the namespace prefix, the actual shared mailboxes should be
under it. For example AATest/shared.
On the other hand: the subdirs "cur" "new" and "tmp" are part of the internal structure of Maildir, right? Why are they interpreted as "\HasChildren"?
They aren't. It's probably just that a namespace is expected to always
have mailboxes under it.
Hello Timo,
On Wed, Feb 06, 2008 at 07:37:05PM +0200, you wrote:
That's the namespace prefix, the actual shared mailboxes should be
under it. For example AATest/shared.
I modified the directory structure as follows:
/var/spool/imap/shared below that I have the (to be shared) Maildir folders aatest newbox test
In dovecot.conf I have --- snip --- namespace public { separator = / prefix = AAShared/ location = maildir:/var/spool/imap/shared:INDEX=/var/mailindexes:CONTROL=~ hidden = no } --- snip ---
The line in the telnet dialog remains the same: --- snip ---
- LIST (\Noselect \HasChildren) "/" "AAShared" --- snip ---
-- Regards, Jochen
On Feb 6, 2008, at 9:30 PM, Jochen wrote:
On Wed, Feb 06, 2008 at 07:37:05PM +0200, you wrote:
That's the namespace prefix, the actual shared mailboxes should be under it. For example AATest/shared.
I modified the directory structure as follows:
/var/spool/imap/shared below that I have the (to be shared) Maildir folders aatest newbox test
In dovecot.conf I have --- snip --- namespace public { separator = / prefix = AAShared/ location = maildir:/var/spool/imap/shared:INDEX=/var/ mailindexes:CONTROL=~ hidden = no } --- snip ---
The line in the telnet dialog remains the same: --- snip ---
- LIST (\Noselect \HasChildren) "/" "AAShared"
This is correct. AAShared is a non-selectable namespace prefix. What
about AAShared/aatest, AAShared/newbox and AAShared/test? Or aren't
they listed at all?
Or did you create the maildir directories as "aatest" and not
".aatest"? The dot is required.
Hello Timo,
On Wed, Feb 06, 2008 at 09:39:33PM +0200, you wrote:
Or did you create the maildir directories as "aatest" and not
".aatest"? The dot is required.
Hey. That was the problem. Sorry for the confusion. I think I have to read the Maildir specification a second time.
Thank you!
A few small issues remains open:
dovecot tries to create directories (at least "cur") just below the location: location = maildir:/var/spool/imap/shared
dovecot: IMAP(jochen): mkdir(/var/spool/imap/shared/cur) failed: Permission denied
There I now have only the (meanwhile subscribible) .aatest.
Btw: Which permissions are required for read-only shared Maildir boxes? Dovecot itself runs under root account but it seems that the children changes to the user, which is actually logged in?
-- Regards, Jochen
On Feb 6, 2008, at 10:33 PM, Jochen wrote:
Hello Timo,
On Wed, Feb 06, 2008 at 09:39:33PM +0200, you wrote:
Or did you create the maildir directories as "aatest" and not ".aatest"? The dot is required.
Hey. That was the problem. Sorry for the confusion. I think I have to read the Maildir specification a second time.
It's a Maildir++ thing.
dovecot tries to create directories (at least "cur") just below the location: location = maildir:/var/spool/imap/shared
This is kind of a bug, but too big of a change for v1.0. It's already
been fixed in v1.1.
Btw: Which permissions are required for read-only shared Maildir boxes? Dovecot itself runs under root account but it seems that the children changes to the user, which is actually logged in?
http://wiki.dovecot.org/UserIds explains this a bit. So the mail
user(s) need to have read-permissions to the maildir. Write permission
isn't needed if you don't want users to be able to change flags and if
you've set per-user index and control dirs.
Hello Timo,
On Wed, Feb 06, 2008 at 10:37:26PM +0200, you wrote:
It's a Maildir++ thing.
That might be the reason why I did not read about the dot. No problem now.
This is kind of a bug, but too big of a change for v1.0. It's already
been fixed in v1.1.
Should I just create the directories or should I ignore the error messages?
http://wiki.dovecot.org/UserIds explains this a bit.
I'll read it. Thank you.
-- Regards, Jochen
On Feb 8, 2008, at 1:19 PM, Jochen wrote:
This is kind of a bug, but too big of a change for v1.0. It's already been fixed in v1.1.
Should I just create the directories or should I ignore the error messages?
I'd think seeing errors in logs would be annoying, so wouldn't hurt
just creating them.
participants (3)
-
Charles Marcus
-
Jochen
-
Timo Sirainen