mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
23 lines
422 B
Bash
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
|
||
|
}
|