From 765f26a62024af31e6ebd2c60471377c35f27f91 Mon Sep 17 00:00:00 2001 From: kbeaugrand Date: Sat, 31 Dec 2016 19:25:47 +0100 Subject: [PATCH] Add vhost when using specific destinations --- target/start-mailserver.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 4655c9aa..6fca1969 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -540,6 +540,14 @@ function _setup_postfix_mydestination(){ notify 'task' 'Setting up Postfix My Destination' postconf -e "mydestination=$POSTFIX_MYDESTINATION" + + notify 'task' "Setting up Postfix vhost" + + IFS=', ' eval 'vhosts=($POSTFIX_MYDESTINATION)' + for i in "${vhosts[@]}" + do + echo $i >> /etc/postfix/vhost + done } function _setup_dkim() {