Postfix installation: add 'sender_canonical_maps' to postfix conf file 'main.cf'.
This commit is contained in:
parent
0d8f4a7c84
commit
8b8dbd75fc
@ -631,6 +631,19 @@ alias_maps =
|
||||
alias_database =
|
||||
hash:/etc/aliases
|
||||
|
||||
## - Optional address mapping lookup tables for envelope and header sender
|
||||
## - addresses. The table format and lookups are documented in canonical(5).
|
||||
## -
|
||||
## - Example: you want to rewrite the SENDER address "user@ugly.domain"
|
||||
## - to "user@pretty.domain", while still being able to send mail to the
|
||||
## - RECIPIENT address "user@ugly.domain".
|
||||
## -
|
||||
## - Note: \$sender_canonical_maps is processed before \$canonical_maps.
|
||||
## -
|
||||
sender_canonical_maps = btree:/etc/postfix/sender_canonical
|
||||
|
||||
|
||||
|
||||
## - Optional lookup tables with mappings from recipient address
|
||||
## - to (message delivery transport, next-hop destination).
|
||||
## - See transport(5) for details.
|
||||
@ -1270,6 +1283,19 @@ else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
echononl " Create file \"sender_canonical\""
|
||||
if [[ ! -f /etc/postfix/sender_canonical ]]; then
|
||||
cat <<EOF > /etc/postfix/sender_canonical
|
||||
@localhost @$(hostname -f)
|
||||
EOF
|
||||
fi
|
||||
postmap btree:/etc/postfix/sender_canonical
|
||||
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
|
||||
|
@ -568,6 +568,17 @@ alias_maps =
|
||||
alias_database =
|
||||
hash:/etc/aliases
|
||||
|
||||
## - Optional address mapping lookup tables for envelope and header sender
|
||||
## - addresses. The table format and lookups are documented in canonical(5).
|
||||
## -
|
||||
## - Example: you want to rewrite the SENDER address "user@ugly.domain"
|
||||
## - to "user@pretty.domain", while still being able to send mail to the
|
||||
## - RECIPIENT address "user@ugly.domain".
|
||||
## -
|
||||
## - Note: \$sender_canonical_maps is processed before \$canonical_maps.
|
||||
## -
|
||||
sender_canonical_maps = btree:/etc/postfix/sender_canonical
|
||||
|
||||
|
||||
## - The maximal time a message is queued before it is sent back as
|
||||
## - undeliverable. Defaults to 5d (5 days)
|
||||
@ -949,6 +960,20 @@ else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
echononl " Create file \"sender_canonical\""
|
||||
if [[ ! -f /etc/postfix/sender_canonical ]]; then
|
||||
cat <<EOF > /etc/postfix/sender_canonical
|
||||
@localhost @$(hostname -f)
|
||||
EOF
|
||||
fi
|
||||
postmap btree:/etc/postfix/sender_canonical
|
||||
if [[ $? -eq 0 ]] ; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
|
||||
## - restart postfix
|
||||
## -
|
||||
echononl " Restart postfix"
|
||||
|
Loading…
Reference in New Issue
Block a user