You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash
set -eux # -x for verbose logging to juju debug-log
MAIL_NAME=${MAIL_NAME:-localhost} MAIL_DOMAINNAME=${MAIL_DOMAINNAME:-"localdomain"} MAIL_SATTELITE_RELAYHOST=${MAIL_SATTELITE_RELAYHOST:-}
## ## Mail facilities (install working 'mail' command) ##
( debconf-set-selections <<< "postfix postfix/mailname string ${MAIL_NAME}.${MAIL_DOMAINNAME}" && debconf-set-selections <<< "postfix postfix/main_mailer_type select 'Local only'" &&
apt-get install -y postfix mailutils &&
postconf inet_interfaces=loopback-only &&
[ -z "$MAIL_SATTELITE_RELAYHOST" ] && postconf relayhost="$MAIL_SATTELITE_RELAYHOST" postfix reload )
## ## Test: ## # echo "test" | mail vaab@kal.fr
|