Commit 7e3008cd authored by Joanne Hugé's avatar Joanne Hugé

WIP

parent 5a1fdf64
...@@ -19,7 +19,7 @@ md5sum = 98083f7eb5dc0c7559f374c22a1b6896 ...@@ -19,7 +19,7 @@ md5sum = 98083f7eb5dc0c7559f374c22a1b6896
[template-default] [template-default]
_update_hash_filename_ = instance-default.cfg.in _update_hash_filename_ = instance-default.cfg.in
md5sum = 686ddd88d2ddb8286d742d405b6187a6 md5sum = bf3267598358d4f02a0c5a7f49ad9d02
[dovecot.jinja2.conf] [dovecot.jinja2.conf]
_update_hash_filename_ = dovecot.jinja2.conf _update_hash_filename_ = dovecot.jinja2.conf
......
...@@ -78,6 +78,20 @@ output = ${directory:etc}/dovecot-passwd ...@@ -78,6 +78,20 @@ output = ${directory:etc}/dovecot-passwd
[userinfo] [userinfo]
recipe = slapos.cookbook:userinfo recipe = slapos.cookbook:userinfo
[ethernet-ip]
recipe = slapos.recipe.build
init =
import netifaces
for i in netifaces.interfaces():
if not (i.startswith("slaptun") or i.startswith("re6stnet") or i == "lo"):
a = netifaces.ifaddresses(i)
if netifaces.AF_INET in a:
try:
options['ipv4'] = a[netifaces.AF_INET][0]['addr']
except:
options['ipv4'] = "0.0.0.0"
[postfix-conf] [postfix-conf]
<= config-base <= config-base
url = {{ postfix_main_template }} url = {{ postfix_main_template }}
...@@ -96,6 +110,8 @@ extra-context = ...@@ -96,6 +110,8 @@ extra-context =
key vhosts_directory directory:vhosts key vhosts_directory directory:vhosts
key mail_owner userinfo:pw-name key mail_owner userinfo:pw-name
key setgid_group userinfo:gr-name key setgid_group userinfo:gr-name
key ip_network ethernet-ip:ipv4
key ip_address slap-configuration:tun-ipv4-network
raw postfix_location {{ postfix_location }} raw postfix_location {{ postfix_location }}
[postfix-alias] [postfix-alias]
......
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