I was going to add support for "configuration groups", but got a bit
stuck at how the logic is supposed to work. I think there could be
different settings based on IP/port it's listening in, or based on given
username.
I can't really describe how it would work, and I'm not entirely sure
myself either :) Does this make sense:
# (default settings here)
# if auth groups are defined here, they are included in all groups below
group 1.server.org {
  protocols = imap imaps pop3 pop3s
  ssl_cert_file = /etc/ssl/certs/server1.pem
  login_dir = /var/run/dovecot/login/server1
  login {
    # common for imap/pop3
    listen = 1.server.org
  }
  auth server1 {
    mechanisms = plain
    userdb = ldap /etc/ldap-server1.conf
    passdb = ldap /etc/ldap-server1.conf
  }
  group admins {
    mail_full_filesystem_access = yes
    auth admins {
      mechanisms = plain
      userdb = passwd-file /etc/admins.passwd
      passdb = passwd-file /etc/admins.passwd
    }
  }
}
# (any setting changes here would affect only new groups below, otherwise
# the config file parsing would get difficult..)
group anonymous {
  protocols = imap
  ssl_disable = yes
  login_dir = /var/run/dovecot/login/anonymous
  login {
    listen = anonymous.server.org
    process_per_connection = no
    processes_count = 1
  }
  auth anonymous {
    mechanisms = plain anonymous
    userdb = passwd-file /etc/anon.passwd
    passdb = passwd-file /etc/anon.passwd
  }
}
I like the idea, but I don't realy under stand the example. what I'd like to see a default session in the config file and server specific part(s) in the config file. eg a different base dir for each server. or different userdb and passwd db for each server. since I can run different sub-server for each domain with different ldap search base and base_dir. it'd be very useful for me!:-))) Timo Sirainen wrote:> I was going to add support for "configuration groups", but got a bit > stuck at how the logic is supposed to work. I think there could be > different settings based on IP/port it's listening in, or based on given > username. > > I can't really describe how it would work, and I'm not entirely sure > myself either :) Does this make sense: > > # (default settings here) > # if auth groups are defined here, they are included in all groups below > > group 1.server.org { > protocols = imap imaps pop3 pop3s > ssl_cert_file = /etc/ssl/certs/server1.pem > login_dir = /var/run/dovecot/login/server1 > login { > # common for imap/pop3 > listen = 1.server.org > } > auth server1 { > mechanisms = plain > userdb = ldap /etc/ldap-server1.conf > passdb = ldap /etc/ldap-server1.conf > } > > group admins { > mail_full_filesystem_access = yes > auth admins { > mechanisms = plain > userdb = passwd-file /etc/admins.passwd > passdb = passwd-file /etc/admins.passwd > } > } > } > > # (any setting changes here would affect only new groups below, otherwise > # the config file parsing would get difficult..) > > group anonymous { > protocols = imap > ssl_disable = yes > login_dir = /var/run/dovecot/login/anonymous > login { > listen = anonymous.server.org > process_per_connection = no > processes_count = 1 > } > auth anonymous { > mechanisms = plain anonymous > userdb = passwd-file /etc/anon.passwd > passdb = passwd-file /etc/anon.passwd > } > } > > >-- Levente "Si vis pacem para bellum!"
Timo Sirainen <tss at iki.fi> writes:> I was going to add support for "configuration groups", but got a bit > stuck at how the logic is supposed to work. I think there could be > different settings based on IP/port it's listening in, or based on given > username. > > I can't really describe how it would work, and I'm not entirely sure > myself either :) Does this make sense:One thing that I like about Courier components is its "sysconftool" approach that allows to add or remove parameters/examples/defaults to the configuration file as the software changes. If the concept supported rewriting the configuration file, without losing user customizations, but adding new parameters and their documentation, that'd be really helpful. -- Matthias Andree
On Mon, 2003-06-30 at 23:28, Farkas Levente wrote:> I like the idea, but I don't realy under stand the example. > what I'd like to see a default session in the config file and server > specific part(s) in the config file. eg a different base dir for each > server. or different userdb and passwd db for each server. since I can > run different sub-server for each domain with different ldap search base > and base_dir. it'd be very useful for me!:-)))Well, that was kind of how the "group 1.server.org" was supposed to work. So that you could add 2.server.org etc. Like: protocols = imap imaps group server-a { login_dir = /var/run/dovecot/login/a login { listen = a.server.org } auth a { mechanisms = plain userdb = ldap /etc/ldap-a.conf passdb = ldap /etc/ldap-a.conf } } group server-b { login_dir = /var/run/dovecot/login/b login { listen = b.server.org } auth b { mechanisms = plain userdb = ldap /etc/ldap-b.conf passdb = ldap /etc/ldap-b.conf } } ..etc..