(Note: I am using dovecot 1.0.10
on Ubuntu 8.04.4 LTS
. Yes, I know I need to upgrade before next year :)
(Note: The SMTP/IMAP server in question only servers a few users. Certainly what I propose below, even it it works, would be a logistical nightmare with any significant number of users).
I have noticed (and have confirmed via google) that the iOS mail app is terrible in its handling of IMAP subscriptions, namespaces, etc. For example, my iPhone and iPad will see EVERYTHING (all mailboxes, folders, etc.), whereas clients like Thunderbird, alpine, etc. only see what I tell them to see. This makes it an incredible pain to move mail between mailboxes because I have to scroll through a gazillion things. The mail_location
in dovecot.conf
is:
mail_location = mbox:%h/Mail/:INBOX=/var/mail/%u
To get around this, I've been considering doing the following for user foo
:
- Create a dovecot
userdb
with afoo-ios
virtual user in it, whose UID is identical to that of the real (in/etc/passwd
)foo
user and with a homedir of/home/foo-ios
. ln -s /var/mail/foo /var/mail/foo-ios
mkdir -p /home/foo-ios/Mail
cd /home/foo-ios/Mail
ln -s /home/foo/Mail/mailbox-i-want-visible mailbox-i-want-visible
- Make symlinks for the rest of limited set of mailboxes/folders I want visible to the iOS mail app.
chown -R foo:foo /home/foo-ios
- Change iOS mail app settings to log in as user
foo-ios
instead of userfoo
.
Will this work or will there be some index/file corruption hell because there will be two sets of indexes (one set living in /home/foo/Mail/.imap
and other set living in /home/foo-ios/Mail/.imap
) indexing the same underlying mbox files?
And I'd be more than happy to hear of a better way to do this with dovecot! (Or to hear that dovecot 2.x works better with iOS devices).
0 Answers