Commit 9fe7ed3d authored by Tom Niget's avatar Tom Niget

switch userdb and passdb to passwd file

parent cf3d6644
......@@ -15,22 +15,25 @@
[template]
filename = instance.cfg.in
md5sum = bccd8d99888c3d4997443cae911eca79
md5sum = 1ec9f6416da41e12b84ec057ab5c38a2
[template-default]
_update_hash_filename_ = instance-default.cfg.in
md5sum = 9d9c45b5c5a00ceb1e4e62388864dbfb
md5sum = 554e9db2fd65dd1fe3b7bc2804bdfb6d
[dovecot.jinja2.conf]
_update_hash_filename_ = dovecot.jinja2.conf
md5sum = 8ac35891bcb9d5d8d7cbb78034d45eb8
md5sum = 90a75496327cc0958eb3d1803644b615
[dovecot-sql.jinja2.conf.ext]
md5sum = ab15900d44b38fdad528c6a73936fd26
[dovecot-passwd.in]
md5sum = c6a0fd2b03ca3e98c335a5ffd1dac353
[postfix_main.jinja2.cf]
_update_hash_filename_ = postfix_main.jinja2.cf
md5sum = 29e7e65dd2926a5187dcd837fede1897
md5sum = a7f1a55ef21cf198824f36a8f52d163a
[postfix_master.jinja2.cf]
_update_hash_filename_ = postfix_master.jinja2.cf
md5sum = 7752a8b4af5c18dc404e0a862af89272
......
tom@mail.localhost:MotDePasseEmail::
bob@mail.localhost:MotDePasseEmail::
alice@mailsr.zdimension.fr:MotDePasseEmail::
......@@ -80,12 +80,23 @@ namespace inbox {
ssl = no
passdb {
driver = sql
args = {{ dovecot_sql }}
#passdb {
# driver = sql
# args = {{ dovecot_sql }}
#}
#userdb {
# driver = sql
# args = {{ dovecot_sql }}
#}
passdb {
driver = passwd-file
args = scheme=PLAIN username_format=%u {{ dovecot_passwd }}
}
userdb {
driver = sql
args = {{ dovecot_sql }}
driver = passwd-file
args = username_format=%u {{ dovecot_passwd }}
default_fields = uid={{ slap_configuration['user-name'] }} gid={{ slap_configuration['user-name'] }} home={{ directory['home-dovecot'] }}/%d/%n
}
\ No newline at end of file
......@@ -108,6 +108,7 @@ url = {{ dovecot_conf_template }}
output = ${directory:etc}/dovecot.conf
extra-context =
key dovecot_sql dovecot-sql:output
key dovecot_passwd dovecot-passwd:output
raw postfix_auth ${directory:var-spool-postfix-private}/auth
raw postfix_dovecot_lmtp ${directory:var-spool-postfix-private}/dovecot-lmtp
......@@ -122,6 +123,13 @@ extra-context =
raw postgresql_host ${postgresql:ipv4}
raw postgresql_port ${postgresql:port}
[dovecot-passwd]
<= config-base
url = {{ dovecot_passwd }}
output = ${directory:etc}/dovecot-passwd
extra-context =
[userinfo]
recipe = slapos.cookbook:userinfo
......@@ -155,6 +163,7 @@ update-command = ${:command}
url = {{ postfix_main_template }}
output = ${directory:etc-postfix}/main.cf
extra-context =
key dovecot_passwd dovecot-passwd:output
key vmailbox_file postfix-vmailbox:output
key virtual_file postfix-virtual:output
key bin_directory directory:bin
......@@ -168,6 +177,7 @@ extra-context =
key setgid_group userinfo:gr-name
key ip_address slap-configuration:ipv6-random
key mail_domain request-dns-entry:connection-domain
raw postfix_dovecot_lmtp ${directory:var-spool-postfix-private}/dovecot-lmtp
raw xz_utils_location {{ xz_utils_location }}
raw postfix_location {{ postfix_location }}
......
......@@ -34,6 +34,7 @@ filename = instance-default.cfg
extra-context =
raw dovecot_conf_template {{ dovecot_conf_template }}
raw dovecot_sql_template {{ dovecot_sql_template }}
raw dovecot_passwd {{ dovecot_passwd }}
raw dovecot_binary {{ dovecot_binary }}
raw postfix_main_template {{ postfix_main_template }}
raw postfix_master_template {{ postfix_master_template }}
......
......@@ -23,9 +23,9 @@ virtual_mailbox_base = {{ vhosts_directory }}
virtual_minimum_uid = 100
virtual_uid_maps = static:1001
virtual_gid_maps = static:1022
virtual_mailbox_maps = pgsql:{{ vmailbox_file }}
virtual_mailbox_maps = passwd:{{ dovecot_passwd }}
virtual_alias_maps = pgsql:{{ virtual_file }}
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_transport = lmtp:unix:{{ postfix_dovecot_lmtp }}
inet_interfaces = all
inet_protocols = all
......
......@@ -88,6 +88,7 @@ context =
key lamp_apache_httpd template-apache-httpd:target
raw dovecot_conf_template ${dovecot.jinja2.conf:target}
raw dovecot_sql_template ${dovecot-sql.jinja2.conf.ext:target}
raw dovecot_passwd ${dovecot-passwd.in:target}
raw dovecot_binary ${dovecot:location}/sbin/dovecot
raw postfix_main_template ${postfix_main.jinja2.cf:target}
raw postfix_master_template ${postfix_master.jinja2.cf:target}
......@@ -143,6 +144,8 @@ filename = ${:_buildout_section_name_}
< = copy-to-instance
[dovecot-sql.jinja2.conf.ext]
< = copy-to-instance
[dovecot-passwd.in]
< = copy-to-instance
[postfix_main.jinja2.cf]
< = copy-to-instance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment