mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-10 01:15:00 +02:00
change if style (#3361)
This commit is contained in:
parent
0e592aa911
commit
cf74127f78
58 changed files with 297 additions and 594 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue