docker-mailserver/target/scripts/helpers/sasl.sh
2022-03-02 22:54:14 +00:00

23 lines
422 B
Bash

#! /bin/bash
function _sasl_passwd_create
{
if [[ -n ${SASL_PASSWD} ]]
then
# create SASL password
echo "${SASL_PASSWD}" > /etc/postfix/sasl_passwd
_sasl_set_passwd_permissions
else
rm -f /etc/postfix/sasl_passwd
fi
}
function _sasl_set_passwd_permissions
{
if [[ -f /etc/postfix/sasl_passwd ]]
then
chown root:root /etc/postfix/sasl_passwd
chmod 0600 /etc/postfix/sasl_passwd
fi
}