From 38c13fe385b5230c888a138be8f42052e92a616e Mon Sep 17 00:00:00 2001 From: Juan Luis Baptiste Date: Sun, 19 Apr 2015 17:30:41 -0500 Subject: [PATCH] First version --- run.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 run.sh diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..6aaecc8 --- /dev/null +++ b/run.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +[ -z "${SMTP_SERVER}" ] && echo "SMTP_SERVER is not set" && exit 1 +[ -z "${SMTP_USERNAME}" ] && echo "SMTP_USERNAME is not set" && exit 1 +[ -z "${SMTP_PASSWORD}" ] && echo "SMTP_PASSWORD is not set" && exit 1 + +echo "relayhost = [$SMTP_SERVER]:587" >> /etc/postfix/main.cf +echo "smtp_use_tls=yes" >> /etc/postfix/main.cf +echo "smtp_sasl_auth_enable = yes" >> /etc/postfix/main.cf +echo "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" >> /etc/postfix/main.cf +echo "smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf +echo "[$SMTP_SERVER]:587 $SMTP_USERNAME:$SMTP_PASSWORD" >> /etc/postfix/sasl_passwd +postmap /etc/postfix/sasl_passwd + +supervisord \ No newline at end of file