OK, I am running (for many years now) an existing courier_imap maildir ++ setup with exim as the MTA. Has been fine. I have my own custom ldap schema for user account definition and authorization. I installed dovecot 1.0 beta 7 as a test and have it listening on a different port. I would like, if possible, to set things up so that a user could use either dovecot or courier. Having to re-subscribe to folders is OK when moving to dovecot. (It would be nice to be able to make a symbolic link from courier's subscription file to the dovecot one though) (My client for testing is the Mac OS X (10.4.6) Mail client Mail.app -- it seems to do an auto subscribe to folders) I set up a namespace for dovecot, using the wiki as a guide, so: namespace private { # Hierarchy separator to use. You should use the same separator for all # namespaces or some clients get confused. '/' is usually a good one. separator = . # Prefix required to access this namespace. This needs to be different for # all namespaces. For example "Public/". prefix = INBOX. # Physical location of the mailbox. This is in same format as # default_mail_env, which is also the default for it. location = . # There can be only one INBOX, and this setting defines which namespace # has it. inbox = yes # If namespace is hidden, it's not advertised to clients via NAMESPACE # extension or shown in LIST replies. This is mostly useful when converting # from another server with different namespaces which you want to depricate # but still keep working. For example you can create hidden namespaces with hidden=no } (location has to be . or something similar since my ldap schema is purely virtual users and returns the actual root of the maildir) I am able to get the root mailbox (INBOX) to work. I can see new mail and look at mail messages etc. I create a new account in Mail.app that logs in to an existing account (to make sure there is no client cached info involved). It logs in and is able to see the imap folders that exist for this account. However, clicking on the folder does not show any messages at all. dovecot is not creating a subscription file inside the maildir (Mail.app does not allow you to subscribe to folders -- it subscribes to all existing folders for you) And if I try and create a new folder inside the account I get a "CREATE" command failed, server error: unknown namespace How can I get the folders to work with dovecot using my existing maildir++ setup? Thanks Chad --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider chad at shire.net
On Apr 26, 2006, at 2:53 PM, Dean Blackburn wrote:> Apple Mail is, from IMAP's perspective, broken. It's impossible to > unsubscribe, which in turn makes troubleshooting like this a PITA. > > We use Apple Mail successfully onsite with Dovecot, but we did ALL > our client testing in Thunderbird, which gives (mostly) good error > messages. Once you have namespaces happy in Tbird, you can start > cycling through the (few) options that are tweakable in Mail until > it works without complaining (as much).What you really need is for dovecot to be able to log all incoming imap commands. However, I have log and debug stuff, everything that I can find, turned on, and I cannot get dovecot to dump the requests it is getting. Note that Apple Mail has no problems with courier Chad> > :) > > -deano > > > Chad Leigh -- Shire.Net LLC wrote: >> OK, I am running (for many years now) an existing courier_imap >> maildir++ setup with exim as the MTA. Has been fine. I have my >> own custom ldap schema for user account definition and authorization. >> >> I installed dovecot 1.0 beta 7 as a test and have it listening on >> a different port. I would like, if possible, to set things up so >> that a user could use either dovecot or courier. Having to re- >> subscribe to folders is OK when moving to dovecot. (It would be >> nice to be able to make a symbolic link from courier's >> subscription file to the dovecot one though) >> >> (My client for testing is the Mac OS X (10.4.6) Mail client >> Mail.app -- it seems to do an auto subscribe to folders) >> >> I set up a namespace for dovecot, using the wiki as a guide, so: >> >> namespace private { >> # Hierarchy separator to use. You should use the same separator >> for all >> # namespaces or some clients get confused. '/' is usually a >> good one. >> separator = . >> >> # Prefix required to access this namespace. This needs to be >> different for >> # all namespaces. For example "Public/". >> prefix = INBOX. >> >> # Physical location of the mailbox. This is in same format as >> # default_mail_env, which is also the default for it. >> location = . >> >> # There can be only one INBOX, and this setting defines which >> namespace >> # has it. >> inbox = yes >> >> # If namespace is hidden, it's not advertised to clients via >> NAMESPACE >> # extension or shown in LIST replies. This is mostly useful >> when converting >> # from another server with different namespaces which you want >> to depricate >> # but still keep working. For example you can create hidden >> namespaces with >> hidden=no >> } >> >> (location has to be . or something similar since my ldap schema is >> purely virtual users and returns the actual root of the maildir) >> >> I am able to get the root mailbox (INBOX) to work. I can see new >> mail and look at mail messages etc. >> >> I create a new account in Mail.app that logs in to an existing >> account (to make sure there is no client cached info involved). >> It logs in and is able to see the imap folders that exist for this >> account. >> >> However, clicking on the folder does not show any messages at >> all. dovecot is not creating a subscription file inside the >> maildir (Mail.app does not allow you to subscribe to folders -- it >> subscribes to all existing folders for you) >> >> And if I try and create a new folder inside the account I get a >> "CREATE" command failed, server error: unknown namespace >> >> How can I get the folders to work with dovecot using my existing >> maildir++ setup? >> >> Thanks >> Chad >> >> --- >> Chad Leigh -- Shire.Net LLC >> Your Web App and Email hosting provider >> chad at shire.net >> >> >> >--- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider chad at shire.net
On Wed, April 26, 2006 16:12, "Chad Leigh -- Shire.Net LLC" <chad at shire.net> said:> OK, I am running (for many years now) an existing courier_imap maildir++ > setup with exim as the MTA. > I set up a namespace for dovecot, using the wiki as a guide, so: > > namespace private { > separator = . > prefix = INBOX. > location = . > inbox = yes > hidden=no > } > > However, clicking on the folder does not show any messages at all. > dovecot is not creating a subscription file inside the maildir > (Mail.app does not allow you to subscribe to folders -- it subscribes > to all existing folders for you) > > And if I try and create a new folder inside the account I get a > "CREATE" command failed, server error: unknown namespaceThis is what we're using and our Courier maildirs are able to work with Dovecot... default_mail_env = maildir:~/ namespace private { separator = . prefix = INBOX. inbox = no } namespace private { separator = . prefix inbox = yes hidden = yes } Also, here are patches to make Dovecot use Courier's subscription file properly... --- src/lib-storage/index/maildir/maildir-storage.h: -#define SUBSCRIPTION_FILE_NAME "subscriptions" +#define SUBSCRIPTION_FILE_NAME "courierimapsubscribed" --- src/lib-storage/subscription-file/subscription-file.c @49 unsigned int i; // BB - added variable @55 /* BB - changed loop to skip over lines with just INBOX and remove INBOX. from the beginning of the line, for courier-imap compatibility */ for (i = 0;; i++) { while ((line = i_stream_next_line(input)) == NULL) { switch (i_stream_read(input)) { case -1: if (input->stream_errno != 0 && (input->stream_errno != ESTALE || !ignore_estale)) { subsfile_set_syscall_error(storage, "read()", path); *failed_r = TRUE; } return NULL; case -2: /* mailbox name too large */ mail_storage_set_critical(storage, "Subscription file %s contains lines longer " "than %u characters", path, MAX_MAILBOX_LENGTH); *failed_r = TRUE; return NULL; } } /* BB - remove INBOX. from the beginning of the line, for courier-imap compatibility */ if (strcmp(line, "INBOX") == 0) continue; if (strncmp(line, "INBOX.", 6) == 0) line += 6; break; } /* BB - end changes */ @147 /* BB - prepend INBOX. for courier-imap compatibility */ -if (o_stream_send_str(output, line) < 0 || +if (o_stream_send_str(output, "INBOX.") < 0 || + o_stream_send_str(output, line) < 0 || @150 -line = t_strconcat(name, "\n", NULL); +/* BB - prepend INBOX. for courier-imap compatibility */ +line = t_strconcat("INBOX.", name, "\n", NULL);