From 71c8f5eb86ca1531d66311597bb7edda05ab520b Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 11 Jul 2016 10:30:57 +0200 Subject: [PATCH] use image for multiple hosts --- rootfs/etc/confd/templates/master.cf.tmpl | 8 +++++--- rootfs/etc/confd/templates/sender-transport.tmpl | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rootfs/etc/confd/templates/master.cf.tmpl b/rootfs/etc/confd/templates/master.cf.tmpl index 8b1ff36..69006e3 100644 --- a/rootfs/etc/confd/templates/master.cf.tmpl +++ b/rootfs/etc/confd/templates/master.cf.tmpl @@ -1,6 +1,8 @@ -{{getenv "MYDOMAIN"}}-out unix - - - - - smtp - -o smtp_helo_name={{getenv "MYHOSTNAME"}} - -o syslog_name=postfix/smtp-{{getenv "MYHOSTNAME"}} +{{range $mailhost := split (getenv "MAILHOSTS") ","}} +{{$mailhost}}-out unix - - - - - smtp + -o smtp_helo_name={{$mailhost}} + -o syslog_name=postfix-{{$mailhost}} +{{end}} submission inet n - - - - smtpd -o syslog_name=postfix/submission diff --git a/rootfs/etc/confd/templates/sender-transport.tmpl b/rootfs/etc/confd/templates/sender-transport.tmpl index c430201..4bad0ae 100644 --- a/rootfs/etc/confd/templates/sender-transport.tmpl +++ b/rootfs/etc/confd/templates/sender-transport.tmpl @@ -1 +1,3 @@ -@{{getenv "MYDOMAIN"}} {{getenv "MYDOMAIN"}}-out +{{range $mailhost := split (getenv "MAILHOSTS") ","}} +@{{$mailhost}} {{$mailhost}}-out +{{end}}