Commit e8afb6ff authored by Joanne Hugé's avatar Joanne Hugé

WIP

parent d9006186
......@@ -15,28 +15,31 @@
[template]
filename = instance.cfg.in
md5sum = 687e195329d644340e388af5c0372f58
md5sum = 9d1d98a0b67791e3fd40618c8f41764c
[template-default]
filename = instance-default.cfg.in
md5sum = 7285ff357250ced114620545a226532d
_update_hash_filename_ = instance-default.cfg.in
md5sum = 7aa7f16772318e6e33e504bb9e61a935
[template-postfix]
filename = instance-postfix.cfg.jinja2.in
_update_hash_filename_ = instance-postfix.cfg.jinja2.in
md5sum = cfea5b89b15081da3a836483e930621b
[template-postfix-master-cf]
filename = postfix_master.cf.jinja2.in
_update_hash_filename_ = postfix_master.cf.jinja2.in
md5sum = ef164517e3f7170d03499967d625c3bb
[template-postfix-main-cf]
filename = postfix_main.cf.jinja2.in
_update_hash_filename_ = postfix_main.cf.jinja2.in
md5sum = e9f03c66627beb4054d45123450162d2
[template-postfix-aliases]
filename = postfix_aliases.jinja2.in
_update_hash_filename_ = postfix_aliases.jinja2.in
md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[dovecot.jinja2.conf]
filename = dovecot.jinja2.conf
md5sum = 265e4d7a54ebb66811f1d8b042f8a51b
_update_hash_filename_ = dovecot.jinja2.conf
md5sum = c0e6264806c5a7244fd4d0dd3ca32f93
[dovecot-passwd.jinja2]
_update_hash_filename_ = dovecot-passwd.jinja2
md5sum = e93c6661a80135b763db27e47786107c
doveuser:{PLAIN}0WOu(yLok)u.w6&2
protocols = imap
listen = *, ::
base_dir = {{ directory['run'] }}
# https://wiki.dovecot.org/HowTo/Rootless
default_internal_user = doveuser
default_login_user = doveuser
default_internal_group = doveuser
service anvil {
chroot =
}
service imap-login {
chroot =
}
service pop3-login {
chroot =
}
service imap-login {
inet_listener imap {
port = 10143
}
inet_listener imaps {
port = 10993
}
}
log_path = {{ directory['log'] }}/dovecot.log
namespace inbox {
inbox = yes
location =
......@@ -23,12 +46,13 @@ namespace inbox {
}
prefix =
}
passdb {
driver = pam
}
ssl = no
passdb {
driver = passwd-file
args = {{ dovecot_passwd }}
}
userdb {
driver = passwd
}
[buildout]
parts =
directory
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
dovecot-conf
dovecot-service
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline= true
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
usr = $${buildout:directory}/usr
run = $${:etc}/run
service = $${:etc}/service
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
etc = ${:home}/etc
bin = ${:home}/bin
tmp = ${:home}/tmp
run = ${:var}/run
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
......@@ -24,10 +29,38 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[dovecot.conf]
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
url = {{ dovecot_conf_template }}
extra-context =
context =
section directory directory
key ipv6 slap-configuration:ipv6-random
# section slap_configuration slap-configuration
${:extra-context}
[dovecot-conf]
<= config-base
url = {{ dovecot_conf_template }}
output = ${directory:etc}/dovecot.conf
extra-context =
key dovecot_passwd dovecot-passwd:output
[dovecot-passwd]
<= config-base
url = {{ dovecot_passwd_template }}
output = ${directory:etc}/dovecot-passwd
[dovecot-wrapper]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{{ dovecot_binary }} -c ${dovecot-conf:output}
[dovecot-service]
recipe = slapos.cookbook:wrapper
command-line = ${dovecot-wrapper:output}
wrapper-path = ${directory:service}/dovecot
mode = 0775
pidfile = ${directory:run}/dovecot.pid
hash-files =
${dovecot-conf:output}
${dovecot-wrapper:output}
......@@ -10,41 +10,20 @@ offline = true
bin-directory = ${buildout:bin-directory}
buildout-bin-directory = ${buildout:bin-directory}
[dynamic-template-postfix-parameters]
<= default-dynamic-template-parameters
cyrus-sasl-location = ${cyrus-sasl:location}
openssl = ${openssl:location}
postfix-location = ${postfix:location}
dovecot-location = ${dovecot:location}
template-postfix-aliases = ${template-postfix-aliases:target}
template-postfix-main-cf = ${template-postfix-main-cf:target}
template-postfix-master-cf = ${template-postfix-master-cf:target}
xz-utils-location = ${xz-utils:location}
[dynamic-template-postfix]
recipe = slapos.recipe.template:jinja2
url = ${template-postfix:output}
filename = instance-postfix.cfg
output = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do
context =
import urllib urllib
section parameter_dict dynamic-template-postfix-parameters
key slapparameter_dict slap-configuration:configuration
key ipv6_set slap-configuration:ipv6
raw template_monitor ${monitor2-template:output}
raw template_default ${template-default:output}
[dynamic-template-default]
recipe = slapos.recipe.template:jinja2
url = ${template-default:output}
url = ${template-default:target}
filename = instance-default.cfg
output = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
raw template_monitor ${monitor2-template:output}
raw dovecot_conf_template ${dovecot.jinja2.conf:target}
raw dovecot_passwd_template ${dovecot-passwd.jinja2:target}
raw dovecot_binary ${dovecot:location}/sbin/dovecot
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
......
......@@ -17,19 +17,12 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
[template-postfix]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance-postfix.cfg.jinja2
[template-default]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance-default.cfg
[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-default]
<= download-base
[template-postfix-master-cf]
< = download-base
......@@ -40,5 +33,12 @@ url = ${:_profile_base_location_}/${:filename}
[template-postfix-aliases]
< = download-base
[copy-to-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}
filename = ${:_buildout_section_name_}
[dovecot.jinja2.conf]
< = download-base
< = copy-to-instance
[dovecot-passwd.jinja2]
< = 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