[Dovecot] Dovecot and Mail.app
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm trying to convert a courier-imap installation over to using
Dovecot, but I'm having some problems with Mail.app on OS X. FTR, we
use both Mail.app and Thunderbird. Note that in the Mail.app
preferences, I have a blank IMAP Path Prefix. I'm using Dovecot
1.0_rc15 on Gentoo, and Mail.app from OS X 10.4.8, Thunderbird 1.5.0.9.
With the old courier setup, in Mail.app I would see a top level Inbox
folder, with an inbox icon'd folder underneath that representing the
IMAP account. That IMAP account subfolder would be the inbox of that
account. Under that, I'd see all the subfolders for that account.
Something like:
Inbox Account1 Folder1 Folder2 ... Account2 FolderA Outbox Drafts Sent Junk SmartFolder1 SmartFolder2
Note that a straight copy from the courier Maildir leaves me with
directories like ~/Maildir/.Folder1 and ~/Maildir/.Folder2 -- IOW,
they do not have .INBOX. prefix. I tried adding a "namespace
private" section, with separator, prefix, and inbox values as
specified in the docs.
This gives me the same layout in the Mail.app u/i as with Courier,
but there's a big problem: none of the folders under Account1 have
any contents. The folders are there, and in the right location, but
they have zero messages (even though they certainly have messages in
the filesystem). Nothing in the Dovecot log file indicates any
problem. But if I hover over say Folder1 in the Mail.app u/i, I see
a popup message like:
Mail was unable to open this mailbox on the server
"imap.example.com". The server error encountered was: Unknown namespace
Moving over to Thunderbird though, I see exactly what I want to see.
Top level expandable is the account, with Inbox under that, which
expands to all my folders. Of course Thunderbird supports
subscriptions, which Mail.app does not, so I only see the folders
I've subscribed to. Clearly, there's some weird interaction between
Mail.app and Dovecot.
Next, I tried removing the 'prefix' value from the "namespace
private" section, and restarted Dovecot. Now the Mail.app u/i is
different, but all the folders have their contents back! The u/i now
shows:
Inbox Account1 Account2 FolderA Outbox Drafts Sent Junk SmartFolder1 SmartFolder2 Account1 Folder1 Folder2
IOW, all of account1's folders live under a separate expandable
section below the top level Inbox expandable (that section has a
little world icon instead of the little inbox icon). Account1's
inbox lives in a different section from its folders, but it has no
subfolders.
Looking back at Thunderbird, I notice that all the subscribed folders
are now at the same level as the Inbox, just under the account name.
I.e.
Account1 Inbox Trash Folder1 Folder2 ...
I suppose I can live with the Mail.app behavior sans the prefix
setting in the namespace section, but it's not ideal. I'd really
like to know why Mail.app has a problem with this! Why are the
folders there but the contents empty? Is there any way to increase
the logging that Dovecot does to understand what the Mail.app client
is sending and why Dovecot is sending back that error?
Any help would be greatly appreciated!
- -Barry
P.S. I wasn't able to use courier2dovecot.sh from the wiki (I think
others had problems with running it on Linux as well, probably due to
the different rename(1) syntax). The courier2dovecot.py file was no
longer available, so I wrote my own. I can make that available to
folks if there's any interest.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZC8sXEjvBPtnXfVAQK90gQAjFhEH+vIPh7pnY4MuOTU8ChWfJ57ppIQ g0HvHidiD5nOfd8pfpsfacdD1nC40cRlpnJkR6vcahvqQsLzSUzUMwVlUqP2IDSE jGvZGpGSBpjTHV/ktWbyJhPo9+ehVxiq+qEfbDgfw9iqBtulOXe4M25iUKO8tsuA n2bCHHoUXuk= =hxad -----END PGP SIGNATURE-----
Barry,
default_mail_env = mbox:%h/mail/:INBOX=/var/spool/mail/%u
This is what I used to get Mail.app to work with dovecot. Just
modify the paths to match your system. Keep your mail prefix empty
in the Account settings.
James
On Dec 26, 2006, at 1:09 AM, Barry Warsaw wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm trying to convert a courier-imap installation over to using
Dovecot, but I'm having some problems with Mail.app on OS X. FTR,
we use both Mail.app and Thunderbird. Note that in the Mail.app
preferences, I have a blank IMAP Path Prefix. I'm using Dovecot
1.0_rc15 on Gentoo, and Mail.app from OS X 10.4.8, Thunderbird
1.5.0.9.With the old courier setup, in Mail.app I would see a top level
Inbox folder, with an inbox icon'd folder underneath that
representing the IMAP account. That IMAP account subfolder would
be the inbox of that account. Under that, I'd see all the
subfolders for that account. Something like:Inbox Account1 Folder1 Folder2 ... Account2 FolderA Outbox Drafts Sent Junk SmartFolder1 SmartFolder2
Note that a straight copy from the courier Maildir leaves me with
directories like ~/Maildir/.Folder1 and ~/Maildir/.Folder2 -- IOW,
they do not have .INBOX. prefix. I tried adding a "namespace
private" section, with separator, prefix, and inbox values as
specified in the docs.This gives me the same layout in the Mail.app u/i as with Courier,
but there's a big problem: none of the folders under Account1 have
any contents. The folders are there, and in the right location,
but they have zero messages (even though they certainly have
messages in the filesystem). Nothing in the Dovecot log file
indicates any problem. But if I hover over say Folder1 in the
Mail.app u/i, I see a popup message like:Mail was unable to open this mailbox on the server
"imap.example.com". The server error encountered was: Unknown namespace
Moving over to Thunderbird though, I see exactly what I want to
see. Top level expandable is the account, with Inbox under that,
which expands to all my folders. Of course Thunderbird supports
subscriptions, which Mail.app does not, so I only see the folders
I've subscribed to. Clearly, there's some weird interaction
between Mail.app and Dovecot.Next, I tried removing the 'prefix' value from the "namespace
private" section, and restarted Dovecot. Now the Mail.app u/i is
different, but all the folders have their contents back! The u/i
now shows:Inbox Account1 Account2 FolderA Outbox Drafts Sent Junk SmartFolder1 SmartFolder2 Account1 Folder1 Folder2
IOW, all of account1's folders live under a separate expandable
section below the top level Inbox expandable (that section has a
little world icon instead of the little inbox icon). Account1's
inbox lives in a different section from its folders, but it has no
subfolders.Looking back at Thunderbird, I notice that all the subscribed
folders are now at the same level as the Inbox, just under the
account name. I.e.Account1 Inbox Trash Folder1 Folder2 ...
I suppose I can live with the Mail.app behavior sans the prefix
setting in the namespace section, but it's not ideal. I'd really
like to know why Mail.app has a problem with this! Why are the
folders there but the contents empty? Is there any way to increase
the logging that Dovecot does to understand what the Mail.app
client is sending and why Dovecot is sending back that error?Any help would be greatly appreciated!
- -Barry
P.S. I wasn't able to use courier2dovecot.sh from the wiki (I think
others had problems with running it on Linux as well, probably due
to the different rename(1) syntax). The courier2dovecot.py file
was no longer available, so I wrote my own. I can make that
available to folks if there's any interest. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)iQCVAwUBRZC8sXEjvBPtnXfVAQK90gQAjFhEH+vIPh7pnY4MuOTU8ChWfJ57ppIQ g0HvHidiD5nOfd8pfpsfacdD1nC40cRlpnJkR6vcahvqQsLzSUzUMwVlUqP2IDSE jGvZGpGSBpjTHV/ktWbyJhPo9+ehVxiq+qEfbDgfw9iqBtulOXe4M25iUKO8tsuA n2bCHHoUXuk= =hxad -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Dec 26, 2006, at 1:15 AM, James Andrews wrote:
default_mail_env = mbox:%h/mail/:INBOX=/var/spool/mail/%u
This is what I used to get Mail.app to work with dovecot. Just
modify the paths to match your system. Keep your mail prefix empty
in the Account settings.
Hi James, thanks for the quick reply.
I'm using maildir and my understanding (from reading dovecot.conf) is
that default_mail_env is replaced by mail_location. My mail_location
setting is:
mail_location = maildir:~/Maildir
I think I don't need to specify INBOX when using maildir, right?
Again, thanks,
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZC/HHEjvBPtnXfVAQK5SAP+OWBVUAeRrFtokYTSzWgr3VE2gn4r0WTk Yys30HhaQipPB733gQiQgvSIO5kuhQ83AG3BaJOMS8yuS3ivJka6gAFFjCZk7UqC E8HOQ+78aRVeWU7nK8t+VGmtdIcWHc9JeD9PDCgwAoNnELIEB21pTe1U+M8IOBne OErgpIeB98I= =7S9C -----END PGP SIGNATURE-----
Hi Barry,
I'm not 100% sure really. I am new to dovecot as well. I am using
the up2date rpm for RHLE3, as I just got this server running and
didn't have a lot of time to run with the latest, so the version I
use is a little older, but from what I understand mail_location uses
the same syntax as default_mail_env. When I tried not defining
INBOX, it didn't work the way I wanted it too. I don't know if the
newer version is better at handling that or not.
James
On Dec 26, 2006, at 1:20 AM, Barry Warsaw wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Dec 26, 2006, at 1:15 AM, James Andrews wrote:
default_mail_env = mbox:%h/mail/:INBOX=/var/spool/mail/%u
This is what I used to get Mail.app to work with dovecot. Just
modify the paths to match your system. Keep your mail prefix
empty in the Account settings.Hi James, thanks for the quick reply.
I'm using maildir and my understanding (from reading dovecot.conf)
is that default_mail_env is replaced by mail_location. My
mail_location setting is:mail_location = maildir:~/Maildir
I think I don't need to specify INBOX when using maildir, right?
Again, thanks,
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZC/HHEjvBPtnXfVAQK5SAP+OWBVUAeRrFtokYTSzWgr3VE2gn4r0WTk Yys30HhaQipPB733gQiQgvSIO5kuhQ83AG3BaJOMS8yuS3ivJka6gAFFjCZk7UqC E8HOQ+78aRVeWU7nK8t+VGmtdIcWHc9JeD9PDCgwAoNnELIEB21pTe1U+M8IOBne OErgpIeB98I= =7S9C -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Dec 26, 2006, at 1:09 AM, Barry Warsaw wrote:
I suppose I can live with the Mail.app behavior sans the prefix
setting in the namespace section, but it's not ideal. I'd really
like to know why Mail.app has a problem with this! Why are the
folders there but the contents empty? Is there any way to increase
the logging that Dovecot does to understand what the Mail.app
client is sending and why Dovecot is sending back that error?
I did a little packet snooping and I think I might have discovered
what's going on. Apparently, Mail.app uses mailbox names like INBOX/
Foo and INBOX/Bar while Thunderbird uses mailbox names like INBOX.Foo
and INBOX.Bar. IOW, adding these two namespace sections seems to
support both clients:
# For Mail.app namespace private { separator = / prefix = INBOX/ inbox = yes } # For Thunderbird namespace private { separator = . prefix = INBOX. inbox = yes }
I need to play with this some more to be sure. Can anybody
corroborate this? If true, the information should probably be added
to the Dovecot wiki.
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZECC3EjvBPtnXfVAQILIAP+KbOSJHr4yEJEgCO3H/VtkTlbhNof/Tbq qy8zKqoPW8rv5GqZnkhFFzfm4Uebbivp+JmQIAbqgI9El8LK7vNnDP9dQ21WN3oC 9e8T3NyMyZSDFQ+JhYC+YkY/jbpR0sOkdJdEV3x74fLp7/eksRBk3lQZhkpSBwCG dgPozrykB9k= =g9OU -----END PGP SIGNATURE-----
I use Mail.app with dovecot (if you look in the archive you can see
some of the problems i had when setting it up). Although I prefer to
not have the courier-style presentation of all folders existing under
the inbox. If you use OS X server with OS X clients you get a
presentation of your accounts that looks like this:
Inbox Outbox Drafts Sent Junk SmartFolder1 SmartFolder2 Account1 Folder1 Folder2 ... Account2 FolderA
and for each of the "special" mailboxes (inbox, drafts, sent, junk)
there is a disclosure triangle with each separate account in case you
want to see only the inbox of a single account at a time:
Inbox
Account1
Account2
Drafts
Account1
Account2
Sent
Account1
Account2
Junk
Account1
Account2
But just fyi, i use only the default namespace:
namespace private {
separator = .
prefix =
inbox = yes
hidden = no
}
and although i believe the mail_location to be irrelevant to this
discussion:
mail_location = maildir:/usr/local/email/%d/%u
.tim
On Dec 26, 2006, at 3:05 AM, Barry Warsaw wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Dec 26, 2006, at 1:09 AM, Barry Warsaw wrote:
I suppose I can live with the Mail.app behavior sans the prefix
setting in the namespace section, but it's not ideal. I'd really
like to know why Mail.app has a problem with this! Why are the
folders there but the contents empty? Is there any way to
increase the logging that Dovecot does to understand what the
Mail.app client is sending and why Dovecot is sending back that
error?I did a little packet snooping and I think I might have discovered
what's going on. Apparently, Mail.app uses mailbox names like
INBOX/Foo and INBOX/Bar while Thunderbird uses mailbox names like
INBOX.Foo and INBOX.Bar. IOW, adding these two namespace sections
seems to support both clients:# For Mail.app namespace private { separator = / prefix = INBOX/ inbox = yes } # For Thunderbird namespace private { separator = . prefix = INBOX. inbox = yes }
I need to play with this some more to be sure. Can anybody
corroborate this? If true, the information should probably be
added to the Dovecot wiki.
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZECC3EjvBPtnXfVAQILIAP+KbOSJHr4yEJEgCO3H/VtkTlbhNof/Tbq qy8zKqoPW8rv5GqZnkhFFzfm4Uebbivp+JmQIAbqgI9El8LK7vNnDP9dQ21WN3oC 9e8T3NyMyZSDFQ+JhYC+YkY/jbpR0sOkdJdEV3x74fLp7/eksRBk3lQZhkpSBwCG dgPozrykB9k= =g9OU -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Jan 2, 2007, at 12:06 PM, Timothy Martin wrote:
I use Mail.app with dovecot (if you look in the archive you can see
some of the problems i had when setting it up). Although I prefer
to not have the courier-style presentation of all folders existing
under the inbox. If you use OS X server with OS X clients you get a
presentation of your accounts that looks like this:Inbox Outbox Drafts Sent Junk SmartFolder1 SmartFolder2 Account1 Folder1 Folder2 ... Account2 FolderA
Okay, that jives with what I see w/o the additional namespace. I
haven't noticed any problem with both namespace sections, so I'm
going to keep them (preserves what my Mail.app users used to see). I
wonder what Mail.app is doing behind the scenes. ;)
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZqWgHEjvBPtnXfVAQJsfQQAuFKSjUnnql7Agyizit1KDCFyUwIzXavw MkPH2A7R5dOdT9oQC15+Fq9fuUFxJad7GtfB6GMCoOWO9rEmhkiWIUdB0Zw3+42N Di7pUbBrN4KZbtnxWW36nUooaAhEbqVzMIyx0FjLeVMqiZlRRLF3ULQhOugK9zaE Drd8wPbO4/M= =qm8u -----END PGP SIGNATURE-----
On 2.1.2007, at 19.29, Barry Warsaw wrote:
Okay, that jives with what I see w/o the additional namespace. I
haven't noticed any problem with both namespace sections, so I'm
going to keep them (preserves what my Mail.app users used to see).
I wonder what Mail.app is doing behind the scenes. ;)
Ugh. Sounds like a bad idea to me to keep two of them. At least I
don't guarantee that they'll keep working in new versions..
Either one of the namespace configurations alone should work with all
the clients. If the client tries to use a wrong separator, it's
probably because it's caching an old value. Probably recreating the
account in the configuration would work.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Jan 3, 2007, at 8:46 AM, Timo Sirainen wrote:
On 2.1.2007, at 19.29, Barry Warsaw wrote:
Okay, that jives with what I see w/o the additional namespace. I
haven't noticed any problem with both namespace sections, so I'm
going to keep them (preserves what my Mail.app users used to
see). I wonder what Mail.app is doing behind the scenes. ;)Ugh. Sounds like a bad idea to me to keep two of them. At least I
don't guarantee that they'll keep working in new versions..Either one of the namespace configurations alone should work with
all the clients. If the client tries to use a wrong separator, it's
probably because it's caching an old value. Probably recreating the
account in the configuration would work.
Okay, point taken! I know that the INBOX. namespace definitely
doesn't work the way I wanted it with Mail.app. I'll try removing it
and leaving the INBOX/ namespace and seeing if Thunderbird can handle
that. I have to wait until my most important customer (i.e. my
wife :) won't need her email for a bit.
Thanks,
- -Barry
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRZu5tXEjvBPtnXfVAQIIQQP/Yhn5+puJjNrQNJL5VwfmpfJTk6+6TEvx dNNUk2DplamcZhXfN2GqyW3IOtDoOAnejm1NpJMJ186sF+PkStN0WaPI6kjEgWz5 71LH0SsWAy62bKwn3ayrwzfi9kq2fkddZcH3m7GBgQyT4ZSCJzvi9yMV5FF9dcex 9iu2MXj2VUc= =WFQE -----END PGP SIGNATURE-----
participants (4)
-
Barry Warsaw
-
James Andrews
-
Timo Sirainen
-
Timothy Martin