Skip to content

Commit

Permalink
better logic
Browse files Browse the repository at this point in the history
  • Loading branch information
georglauterbach committed Feb 7, 2022
1 parent dbb9467 commit 0ae2da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions target/scripts/helpers/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
function _handle_postfix_virtual_config
{
: >/etc/postfix/virtual
: >/etc/postfix/regexp

if [[ -f /tmp/docker-mailserver/postfix-virtual.cf ]]
then
Expand Down Expand Up @@ -41,8 +42,6 @@ function _handle_postfix_regexp_config
then
_notify 'inf' "Adding regexp alias file postfix-regexp.cf"
cp -f /tmp/docker-mailserver/postfix-regexp.cf /etc/postfix/regexp
else
rm -rf /etc/postfix/regexp
fi
}

Expand Down
2 changes: 1 addition & 1 deletion target/scripts/startup/setup-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ function _setup_spoof_protection
postconf -e "smtpd_sender_login_maps = ldap:/etc/postfix/ldap-senders.cf"
fi
else
if [[ -f /etc/postfix/regexp ]]
if [[ -f /tmp/docker-mailserver/postfix-regexp.cf ]]
then
postconf -e "smtpd_sender_login_maps = unionmap:{ texthash:/etc/postfix/virtual, hash:/etc/aliases, pcre:/etc/postfix/maps/sender_login_maps.pcre, pcre:/etc/postfix/regexp }"
else
Expand Down

0 comments on commit 0ae2da2

Please sign in to comment.