mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-06-28 19:50:16 +02:00
chore(housekeeping): Normalize how config files filter out unwanted lines (#2619)
* chore(`aliases.sh`): Filepath to local var `DATABASE_VIRTUAL` * chore(`accounts.sh`): Filepath to local var `DATABASE_ACCOUNTS` * chore(`accounts.sh`): Filepath to local var `DATABASE_VIRTUAL` * chore(`accounts.sh`): Filepath to local var `DATABASE_DOVECOT_MASTERS` * chore(`bin/open-dkim`): Filepaths to local vars (accounts,virtual,vhost) * chore(`relay.sh`): Filepath to local var `DATABASE_SASL_PASSWD` * chore: Rename method Prior PR feedback suggested a better helper method name. * chore: Normalize filtering config lines as input for iterating * chore: Remove `_is_comment` helper method No longer serving a purpose with more appropriate filter method for pre-processing the entire config file.
This commit is contained in:
parent
fa8bfdc22a
commit
54904aa02c
9 changed files with 51 additions and 60 deletions
|
@ -92,16 +92,11 @@ function _relayhost_sasl
|
|||
echo "${SASL_PASSWD}" >> /etc/postfix/sasl_passwd
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/docker-mailserver/postfix-sasl-password.cf ]]
|
||||
local DATABASE_SASL_PASSWD='/tmp/docker-mailserver/postfix-sasl-password.cf'
|
||||
if [[ -f ${DATABASE_SASL_PASSWD} ]]
|
||||
then
|
||||
# Add domain-specific auth from config file:
|
||||
while read -r LINE
|
||||
do
|
||||
if ! _is_comment "${LINE}"
|
||||
then
|
||||
echo "${LINE}" >> /etc/postfix/sasl_passwd
|
||||
fi
|
||||
done < /tmp/docker-mailserver/postfix-sasl-password.cf
|
||||
_get_valid_lines_from_file "${DATABASE_SASL_PASSWD}" >> /etc/postfix/sasl_passwd
|
||||
|
||||
# Only relevant when providing this user config (unless users append elsewhere too)
|
||||
postconf 'smtp_sender_dependent_authentication = yes'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue