install_postfix_*: add support for 'smtp_generic_maps'.

This commit is contained in:
Christoph 2024-05-07 12:23:58 +02:00
parent 5365eb8e18
commit 397c6304e8

View File

@ -688,9 +688,21 @@ alias_database =
## - ## -
## - Note: \$sender_canonical_maps is processed before \$canonical_maps. ## - Note: \$sender_canonical_maps is processed before \$canonical_maps.
## - ## -
sender_canonical_maps = btree:/etc/postfix/sender_canonical sender_canonical_maps =
btree:/etc/postfix/sender_canonical
## - smtp_generic_maps (default: empty)
## -
## - Optional lookup tables that perform address rewriting in the Postfix
## - SMTP client, typically to transform a locally valid address into a
## - globally valid address when sending mail across the Internet. This is
## - needed when the local machine does not have its own Internet domain name,
## -but uses something like localdomain.local instead.
## -
smtp_generic_maps =
btree:/etc/postfix/generic
## - The maximal time a message is queued before it is sent back as ## - The maximal time a message is queued before it is sent back as
## - undeliverable. Defaults to 5d (5 days) ## - undeliverable. Defaults to 5d (5 days)
## - Specify 0 when mail delivery should be tried only once. ## - Specify 0 when mail delivery should be tried only once.
@ -1218,6 +1230,19 @@ else
echo_failed echo_failed
fi fi
echononl " Create file \"generic\""
if [[ ! -f /etc/postfix/generic ]]; then
cat <<EOF > /etc/postfix/generic
@localhost @$(hostname -f)
EOF
fi
postmap btree:/etc/postfix/generic
if [[ $? -eq 0 ]] ; then
echo_ok
else
echo_failed
fi
## - restart postfix ## - restart postfix
## - ## -