From 46278ec89026d296001810c6a51710bd4c51e7c2 Mon Sep 17 00:00:00 2001 From: bigpigeon Date: Mon, 29 Aug 2016 03:07:16 +0800 Subject: [PATCH] add AWS_SES_PORT env (#278) --- target/start-mailserver.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 356266ac..fdbaab2a 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -249,8 +249,11 @@ fi # Support outgoing email relay via Amazon SES if [ ! -z "$AWS_SES_HOST" -a ! -z "$AWS_SES_USERPASS" ]; then - echo "Setting up outgoing email via AWS SES host $AWS_SES_HOST" - echo "[$AWS_SES_HOST]:25 $AWS_SES_USERPASS" >>/etc/postfix/sasl_passwd + if [ -z "$AWS_SES_PORT" ];then + AWS_SES_PORT=25 + fi + echo "Setting up outgoing email via AWS SES host $AWS_SES_HOST:$AWS_SES_PORT" + echo "[$AWS_SES_HOST]:$AWS_SES_PORT $AWS_SES_USERPASS" >>/etc/postfix/sasl_passwd postconf -e \ "relayhost = [$AWS_SES_HOST]:25" \ "smtp_sasl_auth_enable = yes" \