install_postfix_advanced.sh: add support for lookup tables 'virtual_alias_domains' and 'virtual_alias_maps'.
This commit is contained in:
parent
5261828376
commit
e93a4783a2
@ -2019,6 +2019,7 @@ virtual_mailbox_domains =
|
||||
## - manipulations see the ADDRESS_REWRITING_README document.
|
||||
## -
|
||||
virtual_alias_maps =
|
||||
btree:/etc/postfix/virtual_alias_maps
|
||||
EOF
|
||||
|
||||
if $IS_SYMPA_LIST_SERVER ; then
|
||||
@ -2038,6 +2039,7 @@ cat <<EOF >> /etc/postfix/main.cf
|
||||
## - See also the virtual alias domain class in the ADDRESS_CLASS_README file
|
||||
## -
|
||||
virtual_alias_domains =
|
||||
btree:/etc/postfix/virtual_alias_domains
|
||||
|
||||
|
||||
#======= Rate Limiting ============
|
||||
@ -2823,6 +2825,51 @@ else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
|
||||
echononl " Create file \"virtual_alias_domains\""
|
||||
if [[ ! -f /etc/postfix/virtual_alias_domains ]]; then
|
||||
cat <<EOF > /etc/postfix/virtual_alias_domains
|
||||
# - File: /etc/postfix/virtual_alias_domains
|
||||
# -
|
||||
# - Note:
|
||||
# - a mapping file always has two columns. In such a 'one-dimensional' mapping (list of domains)
|
||||
# - Postfix does not care about your second column. It does not even have to be 'OK', it can be
|
||||
# - anything.
|
||||
# -
|
||||
# - Example:
|
||||
# - <domain> OK
|
||||
|
||||
EOF
|
||||
fi
|
||||
postmap btree:/etc/postfix/virtual_alias_domains
|
||||
if [[ $? -eq 0 ]] ; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
echononl " Create file \"virtual_alias_maps\""
|
||||
if [[ ! -f /etc/postfix/virtual_alias_maps ]]; then
|
||||
cat <<EOF > /etc/postfix/virtual_alias_maps
|
||||
# - File: /etc/postfix/virtual_alias_maps
|
||||
# -
|
||||
# - Redirect mail for one address to one or more addresses.
|
||||
# -
|
||||
# - Example:
|
||||
# - # incomming address 'no-reply@cloud-01.oopen.de' to local 'do-not-reply' address
|
||||
# - no-reply@cloud-01.oopen.de do-not-reply
|
||||
# -
|
||||
|
||||
EOF
|
||||
fi
|
||||
postmap btree:/etc/postfix/virtual_alias_maps
|
||||
if [[ $? -eq 0 ]] ; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
|
||||
echononl " Create file \"transport\""
|
||||
if [[ ! -f /etc/postfix/transport ]]; then
|
||||
cat <<EOF > /etc/postfix/transport
|
||||
|
Loading…
Reference in New Issue
Block a user