[Dovecot] changing the separator
Hello,
is it possible the change the folder separator from "." to "/"? Users shall be able to have folders like "Junk/aol.com/*".
Regards Marten
Marten Lehmann wrote:
Hello,
is it possible the change the folder separator from "." to "/"? Users shall be able to have folders like "Junk/aol.com/*".
There was a thread about this a couple of months ago, and the last word from Timo was that this would ultimately be a configuration option, but you might want to remind him - he's been really busy lately with both dovecot and other things...:
********* Repost from thread titled "Maildir folder separator"
On 8/23/2006 Timo Sirainen (tss@iki.fi) wrote:
On Tue, 2006-08-22 at 18:11 -0700, Vince Valenti wrote: I vote for a configuration file option. I'm not sure how feasible it would be to change the default at this point since it would break everyone's existing installations.
The Maildir++ documentation at http://www.inter7.com/courierimap/README.maildirquota.html shows an example of a colon being the separator:
"Can folders have subfolders, defined in a recursive fashion? The answer is no. If you want to have a client with a hierarchy of folders, emulate it. Pick a hierarchy separator character, say ":". Then, folder foo/bar is subdirectory .foo:bar."
Oh. I was sure that it had said that '.' character was the required separator. Guess I just assumed that because of Courier. So, since the spec doesn't require it to be '.', I could add a configuration option for it. Not sure if I'll do it before v1.0..
In any case the separator that is sent to clients can be different than the real separator in disk. That way you could use some weird character in the disk, but show user/client a nice standard '/' separator.
*************************** End repost
--
Best regards,
Charles
On Fri, 2006-10-27 at 06:37 -0400, Charles Marcus wrote:
Marten Lehmann wrote:
Hello,
is it possible the change the folder separator from "." to "/"? Users shall be able to have folders like "Junk/aol.com/*".
There was a thread about this a couple of months ago, and the last word from Timo was that this would ultimately be a configuration option, but you might want to remind him - he's been really busy lately with both dovecot and other things...:
Too much trouble and too large change for v1.0. If someone really wants to change it it's pretty easy to change from maildir-storage.h and recompile.
Sorry for the intrusion, but I might be interested in this. I don't quite understand how it can be hard to set it to be a config option while it's fairly simple to change the sources. With the appropriate info, I would be happy to write a patch so you don't have to worry about doing it yourself and you can include in 1.0. If you agree, obviously.
Alan Mosca
On Fri, 2006-10-27 at 06:37 -0400, Charles Marcus wrote:
Marten Lehmann wrote:
Hello,
is it possible the change the folder separator from "." to "/"? Users shall be able to have folders like "Junk/aol.com/*".
There was a thread about this a couple of months ago, and the last word from Timo was that this would ultimately be a configuration option, but you might want to remind him - he's been really busy lately with both dovecot and other things...:
Too much trouble and too large change for v1.0. If someone really wants to change it it's pretty easy to change from maildir-storage.h and recompile.
-- Alan Mosca Aluminati Network Group
On Thu, 2006-11-02 at 20:45 +0000, Alan Mosca wrote:
Sorry for the intrusion, but I might be interested in this. I don't quite understand how it can be hard to set it to be a config option while it's fairly simple to change the sources. With the appropriate info, I would be happy to write a patch so you don't have to worry about doing it yourself and you can include in 1.0. If you agree, obviously.
Yes, it shouldn't be that difficult. I just started the change and ran into a bit of trouble and then got annoyed and stopped it.
Anyway, lib-storage/index/maildir/maildir-storage.h has MAILDIR_FS_SEP and _SEP_S. Remove those and add MAILDIR_DEFAULT_FS_SEP '.' which is used. If getenv("MAILDIR_FS_SEP") returns non-NULL it's used as the separator. Add char fs_sep to struct maildir_storage, and fix everything to use it. There are several t_strconcat() calls which use _FS_SEP_S, so it's easiest to just change them to t_strdup_printf("%s%c%s", .., storage->fs_sep) instead. Add the setting to master/master-settings.[ch] and pass it to imap in mail-process.c. I think that's it.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ok thanks, I'll start working on a patch tonight.
Timo Sirainen wrote:
On Thu, 2006-11-02 at 20:45 +0000, Alan Mosca wrote:
Sorry for the intrusion, but I might be interested in this. I don't quite understand how it can be hard to set it to be a config option while it's fairly simple to change the sources. With the appropriate info, I would be happy to write a patch so you don't have to worry about doing it yourself and you can include in 1.0. If you agree, obviously.
Yes, it shouldn't be that difficult. I just started the change and ran into a bit of trouble and then got annoyed and stopped it.
Anyway, lib-storage/index/maildir/maildir-storage.h has MAILDIR_FS_SEP and _SEP_S. Remove those and add MAILDIR_DEFAULT_FS_SEP '.' which is used. If getenv("MAILDIR_FS_SEP") returns non-NULL it's used as the separator. Add char fs_sep to struct maildir_storage, and fix everything to use it. There are several t_strconcat() calls which use _FS_SEP_S, so it's easiest to just change them to t_strdup_printf("%s%c%s", .., storage->fs_sep) instead. Add the setting to master/master-settings.[ch] and pass it to imap in mail-process.c. I think that's it.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFS1liS7JzjfmqvrMRAsjTAJ9mpKsjhQV8oLBcAkj59yH0d9sdQwCdF89K enrFlx8y4XUp6D4UTC2982I= =8UDS -----END PGP SIGNATURE-----
is it possible the change the folder separator from "." to "/"? Users shall be able to have folders like "Junk/aol.com/*".
There was a thread about this a couple of months ago, and the last word from Timo was that this would ultimately be a configuration option, <snip>
Too much trouble and too large change for v1.0. <snip>
Sorry for the intrusion, but I might be interested in this. <snip>
Yes, it shouldn't be that difficult. I just started the change and ran into a bit of trouble and then got annoyed and stopped it. <snip>
Ok thanks, I'll start working on a patch tonight.
I too am interested in this - did you ever make any progress on your patch?
Thanks!
--
Best regards,
Charles
I've made some progress in a sense that I've tried with no success at all, which is more due to my scarce knowledge of dovecot's code more than anything else, so I started just looking at the code and trying to understand before carrying on. TBH in the last couple of weeks I have not been doing much for personal reasons, but I plan on starting to work again on it around easter time. Sorry if it's taking so long, but the way the maildir part was written seems like it would need some good thinking before something that actually works comes out. I'm trying my best! ;)
Charles Marcus wrote:
> is it possible the change the folder separator from "." to "/"? > Users > shall be able to have folders like "Junk/aol.com/*".
There was a thread about this a couple of months ago, and the last word from Timo was that this would ultimately be a configuration option, <snip>
Too much trouble and too large change for v1.0. <snip>
Sorry for the intrusion, but I might be interested in this. <snip>
Yes, it shouldn't be that difficult. I just started the change and ran into a bit of trouble and then got annoyed and stopped it. <snip>
Ok thanks, I'll start working on a patch tonight.
I too am interested in this - did you ever make any progress on your patch?
Thanks!
-- Alan Mosca Systems Administrator Aluminati Network Group
participants (5)
-
Alan Mosca
-
Alan Mosca [Aluminati]
-
Charles Marcus
-
Marten Lehmann
-
Timo Sirainen