Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 12 Nov 2008, Daniel L. Miller wrote:
I don't if this has been discussed before - or already implemented - but it would be great if I could define one or more "aliases" for a folder. A particular example might be "Sent" where different (badly-written) clients might have hard-coded "Sent" folder locations like "Sent", "Sent Items", "Sent Mail", "Mail Delivered", etc. - and I'd love to get those consolidated.
It would also be nice to show a different set of folders based on the client - or if that's not possible (if the client doesn't identify itself as part of the login sequence) then somehow via login name - maybe by an extension? So where my usual login might be "user@domain.com", and that would continue to be supported as the default login, I could now have "user@domain.com+thunderbird", "user@domain.com+mobile", etc.?
Because the IMAP client does not identify itself, the server does not know, which alias to return to the client. I'm not convinced that the extension method you describe will be widely accepted. "Widely accepted"? Not sure what you meant - or I guess I didn't express myself well. In my own case, for a particular reason that seemed justified at the time, my mail user names are the complete mail address@domain (even though I'm really only doing one domain). My intent was that whatever the user name as defined in the database used by Dovecot - could then have appended or inserted or whatever some identifier flag that Dovecot would use in selecting the folders to share with the client. So I'm asking for a Dovecot-specific modification to be made to Dovecot - followed by implementation instructions for the clients. I wasn't aware of any particular limitations on mail usernames imposed by clients - but if there are, we should certainly that into account.
I definitely would like a solution for this problem as well.
But if the server would return all aliases, most recent clients will at least download all headers from all of them (not knowing about that they are all equal); if the server would return just one alias, the client would assume that its folder has been deleted and redownload the sent message as soon as the folder re-appears.
At a very simple level - so it's system wide, not per-user, would include a database similar to the following:
Default Extension: TBird TBird: -Sent-Items, -Composing, -Posted Mobile: Sent-Items=Sent, Composing=Drafts Mutt: Posted=Sent, Writing=Drafts PMail: Flown=Sent, Droppings=Trash
Now when a client connects, Dovecot parses the username. If no extension is present, Dovecot applies the filters defined as the default. Otherwise, based on the extension, perform the appropriate folder name conversion. The first line I showed goes beyond translation and would allow for specific folder "hiding" based on the client - perhaps if there was a dedicated-purpose folder for a particular client that there is no translation for in other clients (perhaps a special-function junk folder or something).
-- Daniel