After tomorrow's 0.99.8 release I think it's time for a new config file format. It could be made backwards compatibile with the old format, but there would be new tree-like categories. I was thinking something like this: # global settings protocols = imap # "foo.server.org" is just descriptive name # settings inside server { .. } will override global ones. # groups (namespace, login settings, auth settings) aren't replaced # unless same name is used. server foo.server.org { imap_listen = 1.2.3.4 ssl_cert_file = /etc/ssl/certs/foo.cer # default namespace (no name) namespace { type = private mail = mbox:~/mail } # Have to quote so '#' won't be thought out as comment. # I think quoting should work everywhere actually.. namespace "#maildir" { type = private inbox = yes # this namespace contains INBOX mail = Maildir:~/Maildir } # override global auth default auth default { auth_mechanisms = plain digest-md5 auth_realms = foo.server.org auth_userdb = ldap /etc/dovecot-ldap.conf auth_passdb = ldap /etc/dovecot-ldap.conf } } server bar.server.org { imap_listen = 1.2.3.5 ssl_cert_file = /etc/ssl/certs/bar.cer namespace { type = private #mail = #autodetect } # shared mailboxes between users # eg. user/timo.sirainen/some-shared-folder namespace user { type = user mail = /home/%u/mail/shared } } server baz.server.org { imap_listen = 1.2.3.6 ssl_disable = yes # Only Courier-like INBOX namespace namespace INBOX { type = private } } # common namespace between all instances namespace shared { type = shared mail = mbox:/var/lists:INDEX=~/mail/.shared/ } auth default { auth_mechanisms = plain auth_userdb = passwd auth_passdb = pam }
On Tue, 2003-02-25 at 02:11, Timo Sirainen wrote:> server foo.server.org {Actually, not "server", but "group". This would allow things like: group imap { protocols = imap group foo.server.org { ... } group bar.server.org { ... } } group pop3 { protocols = pop3 ... }
On Tue, 2003-02-25 at 02:56, Brad Figg wrote:> Just my $.02 (and that's probably overcharging). Anytime I need > a config file I use XML and an open source parser.I hate XML config files. Not going to happen. Ever. :) I think they're difficult to read with standard text editor. Even more difficult to modify. And creating read-only parser for just about any config file format doesn't take hardly any time. External XML libraries would also annoy people.