1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-04 23:21:23 +02:00
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
}