Has anyone looked into providing support in dovecot for Kmail folders? I would like to make my Kmail folders (on my main desktop system) available to my other systems (including over a VPN when I am travelling). Kmail is my main mail program and I have a lot of mail in a lot of folders, so I don't want to set up a separate IMAP service and move all the mail and folders. Kmail's use of maildir seems to folow the basic maildir approach except that sub-folders are handled differently. If you create a folder (say it is called ABC) in Kmail and start putting mail in it, Kmail creates a directory on the disk called ABC (not .ABC) and creates the cur, new and tmp folders within it to contain the email. If you then create a subfolder of ABC (say it is called DEF, contained within the ABC folder), Kmail creates a directory on the disk called .ABC.directory and creates the DEF directory within that. In other words, maildir directories are given the same name as the mail folder (with no leading dot) but sub-folders are contained in disk directories called .<folder-name>.directory. I have taken a quick look at the dovecot code and am fairly sure this could be handled by a variant on the existing maildir code (e.g. by changes to maildir_fill_readdir and other routines). Has anyone tried this? Graham
On Thursday 26 Jan 2006 17:35, Graham Cobb wrote:> > If you create a folder (say it is called ABC) in Kmail and start > putting mail in it, Kmail creates a directory on the disk called ABC > (not .ABC) and creates the cur, new and tmp folders within it to > contain the email. > > If you then create a subfolder of ABC (say it is called DEF, > contained within the ABC folder), Kmail creates a directory on the > disk called .ABC.directory and creates the DEF directory within that. >Are you sure about that? If I create an imap folder it asks me whether I intend it to contain other folders OR messages. Anne
Graham Cobb wrote:> Has anyone looked into providing support in dovecot for Kmail folders? I > would like to make my Kmail folders (on my main desktop system) available > to > my other systems (including over a VPN when I am travelling). Kmail is my > main mail program and I have a lot of mail in a lot of folders, so I don't > want to set up a separate IMAP service and move all the mail and folders. > > Kmail's use of maildir seems to folow the basic maildir approach except > that sub-folders are handled differently. > > If you create a folder (say it is called ABC) in Kmail and start putting > mail in it, Kmail creates a directory on the disk called ABC (not .ABC) > and creates the cur, new and tmp folders within it to contain the email. > > If you then create a subfolder of ABC (say it is called DEF, contained > within the ABC folder), Kmail creates a directory on the disk called > .ABC.directory and creates the DEF directory within that. > > In other words, maildir directories are given the same name as the mail > folder (with no leading dot) but sub-folders are contained in disk > directories called .<folder-name>.directory. > > I have taken a quick look at the dovecot code and am fairly sure this > could be handled by a variant on the existing maildir code (e.g. by > changes to > maildir_fill_readdir and other routines). Has anyone tried this? > > GrahamI confirm exactly as you describe: This is from rpm -q kdepim kdepim-3.5.0-1
On Thu, 2006-01-26 at 17:35 +0000, Graham Cobb wrote:> In other words, maildir directories are given the same name as the mail folder > (with no leading dot) but sub-folders are contained in disk directories > called .<folder-name>.directory. > > I have taken a quick look at the dovecot code and am fairly sure this could be > handled by a variant on the existing maildir code (e.g. by changes to > maildir_fill_readdir and other routines).Sounds pretty weird format, but yes, should be pretty simple to change Dovecot to handle that. But at least currently I don't want to accept any such patch to main Dovecot distribution. I think it should be enough to change maildir_fill_readdir() for listing, and for opening/deleting/renaming just fix all the code in maildir-storage.c which contains MAILDIR_FS_SEP_S.> Has anyone tried this?I doubt it :) And does kmail work worse via IMAP, or why aren't you just renaming the folders to Maildir++ format and make all mail access through Dovecot? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://dovecot.org/pipermail/dovecot/attachments/20060126/cd6a8304/attachment.pgp
On Thursday 26 Jan 2006 20:03, Timo Sirainen wrote:> And does kmail work worse via IMAP, or why aren't you just renaming the > folders to Maildir++ format and make all mail access through Dovecot?Although I don't want to make all my access through IMAP (mainly for performance and reliability reasons) I realised that there is a much easier solution than implementing Kmail's format in dovecot. I just create softlinks from the dovecot directory to the Kmail directories to make them look like Maildir++. This allows dovecot to export them to other clients. I have created a shell script which goes through a Kmail folder store and creates all the softlinks. It handles both maildir and mbox format folders (as dovecot cannot handle both formats in one namespace the script puts the maildir folders in the main dovecot directory tree and the mbox folders in a .../mbox subtree). The script is available at http://www.cobb.uk.net/imap-export. It is designed to be invoked as something like: imap-export ~/Mail ~/dovecot and it assumes the dovecot configuration includes something like: namespace private { separator = / prefix location = maildir:~/dovecot inbox = no hidden = no } namespace private { separator = / prefix = mbox/ location = mbox:~/dovecot/mbox inbox = no hidden = no }
Thursday 26 January 2006 18:35 skrev Graham Cobb:> Kmail's use of maildir seems to folow the basic maildir approach except > that sub-folders are handled differently. > > If you create a folder (say it is called ABC) in Kmail and start putting > mail in it, Kmail creates a directory on the disk called ABC (not .ABC) and > creates the cur, new and tmp folders within it to contain the email. > > If you then create a subfolder of ABC (say it is called DEF, contained > within the ABC folder), Kmail creates a directory on the disk called > .ABC.directory and creates the DEF directory within that. > > In other words, maildir directories are given the same name as the mail > folder (with no leading dot) but sub-folders are contained in disk > directories called .<folder-name>.directory.Then we have Evolution, which also uses maildirs but with yet another subfolder naming format (subfolders are created right beside the cur, new and tmp directories). In both cases, the folder names are not UTF-7 encoded on disk, which is worth noticing. -- Magnus Holmgren -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20060330/33dc4028/attachment.bin>