[Dovecot] How to serve a subset of IMAP folders for hand held devices.
Hello
I am currently running dovecot 1.2.15 on my home server. I have over 200 folders in personal email account, and I have found that my smart-phone does not work well trying to display that many folders.
I solved the problem by creating a second instance of dovecot running on a non standard port, and configured it to serve only a subset my email folders, so that way the email client on my smartphone works well and I can read the emails I am interested in on the move.
The process of configuring two instances of dovecot on the same machine serving different views of the same mailbox was faily complex, so I think it would be worth documenting the process in an FAQ or suchlike for other users.
I thought a good place to write up my method would be in the HowTo section of the Dovecot Wiki. Is that a good idea? Can I request an account to edit the Wiki, or should I send a draft text to an editor? Are there any Dovecot experts here who can review my methods and suggest improvements?
-- David Pottage
:2011-12-28T10:26:David Pottage:
I am currently running dovecot 1.2.15 on my home server. I have over 200 folders in personal email account, and I have found that my smart-phone does not work well trying to display that many folders.
I solved the problem by creating a second instance of dovecot running on a non standard port, and configured it to serve only a subset my email folders, so that way the email client on my smartphone works well and I can read the emails I am interested in on the move.
Here's a simple improvement. Create a new email user and symlink just those folders you want to see into it.
That way you don't need 2 instances just two different users and you use one on mobile the other elsewhere ;)
Using virtual folders could be helpful as well. I have a New mails one which shows me all new emails in all folders which helps in a lot of places.
-- Andraž 'ruskie' Levstik Source Mage GNU/Linux Games/Xorg grimoire guru Re-Alpine Coordinator http://sourceforge.net/projects/re-alpine/ Geek/Hacker/Tinker
Knowledge is important, knowledge you know is priceless. Share the knowledge, build a better future for everyone.
On 28/12/11 10:39, Andraž 'ruskie' Levstik wrote:
:2011-12-28T10:26:David Pottage:
I solved the problem by creating a second instance of dovecot running on a non standard port, and configured it to serve only a subset my email folders, so that way the email client on my smartphone works well and I can read the emails I am interested in on the move. Here's a simple improvement. Create a new email user and symlink just those folders you want to see into it. I considered that option but decided against it for two reasons.
Firstly I wanted to retain the option to switch to the full version of my mail folders if I needed to access something urgently. My smart-phone based email client allows me to change the port number of an existing email account, but will not allow me to change the user-name without creating a whole new account and re-downloading everything.
Secondly creating a second account makes the authentication on the server a lot more complex. Either I need two OS level accounts on the sever, and find ways to keep them in sync, or I need to create a custom authentication method on dovecot or PAM so that when it receives a user-name matching some pattern, it will check the password against a different account.
In short, I think a second server with a separate configuration is more scalable. I don't think it consumes much more resource compared with one server.
Using virtual folders could be helpful as well. I have a New mails one which shows me all new emails in all folders which helps in a lot of places. Could you provide a link to documentation about virtual folders.
-- David Pottage
On 12/28/2011 4:05 PM, David Pottage wrote:
Firstly I wanted to retain the option to switch to the full version of my mail folders if I needed to access something urgently. My smart-phone based email client allows me to change the port number of an existing email account, but will not allow me to change the user-name without creating a whole new account and re-downloading everything.
Secondly creating a second account makes the authentication on the server a lot more complex. Either I need two OS level accounts on the sever, and find ways to keep them in sync, or I need to create a custom authentication method on dovecot or PAM so that when it receives a user-name matching some pattern, it will check the password against a different account.
In short, I think a second server with a separate configuration is more scalable. I don't think it consumes much more resource compared with one server.
It's a smart phone. Have you considering simply running a webmail server?
-- Stan
On 28/12/11 22:12, Stan Hoeppner wrote:
It's a smart phone. Have you considering simply running a webmail server? I considered it for about 10 seconds.
Webmail is much less efficent than IMAP both for the server and the client. I run SquirrelMail on (on Apache) my server, and it consumes far more CPU and RAM than Dovecot. It is also much slower in most operations compared with IMAP. Though I have not measured it, I suspect the bandwidth consumption is much higher because of HTML mark-up and images.
In any case, webmail would not solve the problem of too many folders being displayed. I would get just as long a list, with a hard to use scrollbar, but rendered as html instead of in a menu.
-- David Pottage
Quoting David Pottage david@electric-spoon.com:
On 28/12/11 10:39, Andraž 'ruskie' Levstik wrote:
:2011-12-28T10:26:David Pottage:
I solved the problem by creating a second instance of dovecot running on a non standard port, and configured it to serve only a subset my email folders, so that way the email client on my smartphone works well and I can read the emails I am interested in on the move. Here's a simple improvement. Create a new email user and symlink just those folders you want to see into it. I considered that option but decided against it for two reasons.
Firstly I wanted to retain the option to switch to the full version of my mail folders if I needed to access something urgently. My smart-phone based email client allows me to change the port number of an existing email account, but will not allow me to change the user-name without creating a whole new account and re-downloading everything.
I read back through the thread, and I don't see why you're not using
IMAP subscriptions - did I overlook it?
Rick
On 28/12/11 22:21, Rick Romero wrote:
Quoting David Pottage david@electric-spoon.com:
Firstly I wanted to retain the option to switch to the full version of my mail folders if I needed to access something urgently. My smart-phone based email client allows me to change the port number of an existing email account, but will not allow me to change the user-name without creating a whole new account and re-downloading everything.
I read back through the thread, and I don't see why you're not using IMAP subscriptions - did I overlook it?
If you mean subscriptions on the smartphone client, I was not using them because the first IMAP client I was using (native email on a Palm Pre) did not support them.
I have since switched to an Android phone and started using K9, but I still find it helpful to filter the list of folders that that K9 sees as I don't want a huge list with an unmanageable scrollbar, and many of the folders are archive folders that will never contain anything current, so it makes no sense to make them accessible except through a desktop client.
I am not saying my solution is the only possible solution but I do think it is worth recording in the Wiki as others may find my approach useful.
-- David Pottage
On 12/29/2011 2:02 PM, David Pottage wrote:
On 28/12/11 22:21, Rick Romero wrote:
Quoting David Pottagedavid@electric-spoon.com:
Firstly I wanted to retain the option to switch to the full version of my mail folders if I needed to access something urgently. My smart-phone based email client allows me to change the port number of an existing email account, but will not allow me to change the user-name without creating a whole new account and re-downloading everything.
I read back through the thread, and I don't see why you're not using IMAP subscriptions - did I overlook it?
If you mean subscriptions on the smartphone client, I was not using them because the first IMAP client I was using (native email on a Palm Pre) did not support them.
I have since switched to an Android phone and started using K9, but I still find it helpful to filter the list of folders that that K9 sees as I don't want a huge list with an unmanageable scrollbar, and many of the folders are archive folders that will never contain anything current, so it makes no sense to make them accessible except through a desktop client.
I am not saying my solution is the only possible solution but I do think it is worth recording in the Wiki as others may find my approach useful.
My wife has an Android phone running K-9 and she is able to not display most of the hundreds of folders that she has. I haven't seen any drawbacks to that technique on her phone. Well maybe if she got rid of about a 1000 emails out of her INBOX it would help :-).
--
Knute Johnson knute2011@knutejohnson.com
On 12/29/2011 2:02 PM, David Pottage wrote:
On 28/12/11 22:21, Rick Romero wrote:
Quoting David Pottagedavid@electric-spoon.com:
Firstly I wanted to retain the option to switch to the full version of my mail folders if I needed to access something urgently. My smart-phone based email client allows me to change the port number of an existing email account, but will not allow me to change the user-name without creating a whole new account and re-downloading everything.
I read back through the thread, and I don't see why you're not using IMAP subscriptions - did I overlook it?
If you mean subscriptions on the smartphone client, I was not using them because the first IMAP client I was using (native email on a Palm Pre) did not support them.
I have since switched to an Android phone and started using K9, but I still find it helpful to filter the list of folders that that K9 sees as I don't want a huge list with an unmanageable scrollbar, and many of the folders are archive folders that will never contain anything current, so it makes no sense to make them accessible except through a desktop client.
I am not saying my solution is the only possible solution but I do think it is worth recording in the Wiki as others may find my approach useful.
My wife has an Android phone running K-9 and she is able to not display most of the hundreds of folders that she has. I haven't seen any drawbacks to that technique on her phone. Well maybe if she got rid of about a 1000 emails out of her INBOX it would help .
--
Knute Johnson
On 2011-12-28 5:05 PM, David Pottage david@electric-spoon.com wrote:
Secondly creating a second account makes the authentication on the server a lot more complex. Either I need two OS level accounts on the sever, and find ways to keep them in sync, or I need to create a custom authentication method on dovecot or PAM so that when it receives a user-name matching some pattern, it will check the password against a different account.
It would be cool if the concept of 'Master User' could be expanded on to provide access to only certain other accounts, as opposed to full domains (or maybe it does alreaqdy and I just don't understand it well enough yet).
For example, we have Sales Assistants in our offices, where each assistant may assist up to 3 or 4 different Sales reps. It would be nice to be able to give the Assistant read-only access to the Sales Reps emails without having to set up shared folders for each one...
--
Best regards,
Charles
On 29.12.2011, at 14.07, Charles Marcus wrote:
It would be cool if the concept of 'Master User' could be expanded on to provide access to only certain other accounts, as opposed to full domains (or maybe it does alreaqdy and I just don't understand it well enough yet).
For example, we have Sales Assistants in our offices, where each assistant may assist up to 3 or 4 different Sales reps. It would be nice to be able to give the Assistant read-only access to the Sales Reps emails without having to set up shared folders for each one...
It's kind of possible, but perhaps not super easy.. Basically you can use %{login_user}, %{login_username} and %{login_domain} variables to figure out if the master user login should be accepted. With SQL you could use these to create a table that has allowed masteruser -> login_username mappings.
participants (8)
-
Andraž 'ruskie' Levstik
-
Charles Marcus
-
David Pottage
-
Knute Johnson
-
Knute Johnson
-
Rick Romero
-
Stan Hoeppner
-
Timo Sirainen