You've already forked docker-mailserver
mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-07 23:03:10 +02:00
change if style (#3361)
This commit is contained in:
@ -12,11 +12,9 @@ function _handle_postfix_virtual_config
|
||||
|
||||
local DATABASE_VIRTUAL=/tmp/docker-mailserver/postfix-virtual.cf
|
||||
|
||||
if [[ -f ${DATABASE_VIRTUAL} ]]
|
||||
then
|
||||
if [[ -f ${DATABASE_VIRTUAL} ]]; then
|
||||
# fixing old virtual user file
|
||||
if grep -q ",$" "${DATABASE_VIRTUAL}"
|
||||
then
|
||||
if grep -q ",$" "${DATABASE_VIRTUAL}"; then
|
||||
sed -i -e "s|, |,|g" -e "s|,$||g" "${DATABASE_VIRTUAL}"
|
||||
fi
|
||||
|
||||
@ -30,14 +28,12 @@ function _handle_postfix_regexp_config
|
||||
{
|
||||
: >/etc/postfix/regexp
|
||||
|
||||
if [[ -f /tmp/docker-mailserver/postfix-regexp.cf ]]
|
||||
then
|
||||
if [[ -f /tmp/docker-mailserver/postfix-regexp.cf ]]; then
|
||||
_log 'trace' "Adding regexp alias file postfix-regexp.cf"
|
||||
|
||||
cp -f /tmp/docker-mailserver/postfix-regexp.cf /etc/postfix/regexp
|
||||
|
||||
if ! grep 'virtual_alias_maps.*pcre:/etc/postfix/regexp' /etc/postfix/main.cf
|
||||
then
|
||||
if ! grep 'virtual_alias_maps.*pcre:/etc/postfix/regexp' /etc/postfix/main.cf; then
|
||||
sed -i -E \
|
||||
's|virtual_alias_maps(.*)|virtual_alias_maps\1 pcre:/etc/postfix/regexp|g' \
|
||||
/etc/postfix/main.cf
|
||||
|
Reference in New Issue
Block a user