SMTP_GENERIC_MAP

This commit is contained in:
Michael Grote 2023-11-03 11:28:21 +01:00
parent ab7db6a3b2
commit bedcf8ab7d
2 changed files with 11 additions and 0 deletions

View file

@ -43,3 +43,7 @@
# Optional: This will let you decide which ip-protocol should be used.
#INET_PROTOCOL=[ipv4|ipv6|all]
# Optional: This will let you decide which mapping should be used:
# https://www.postfix.org/ADDRESS_REWRITING_README.html#generic
#SMTP_GENERIC_MAP="/.*/ info@mgrote.net"

7
run.sh
View file

@ -67,6 +67,13 @@ if [ ! -z "${SMTP_HEADER_TAG}" ]; then
echo "Setting configuration option SMTP_HEADER_TAG with value: ${SMTP_HEADER_TAG}"
fi
#Set smtp_generic_map
if [ ! -z "${SMTP_GENERIC_MAP}" ]; then
echo "smtp_generic_maps = pcre:/etc/postfix/generic" >> /etc/postfix/main.cf
echo "${SMTP_GENERIC_MAP}" > /etc/postfix/generic
echo "Setting configuration option SMTP_GENERIC_MAP with value: ${SMTP_GENERIC_MAP}"
fi
#Enable logging of subject line
if [ "${LOG_SUBJECT}" == "yes" ]; then
postconf -e "header_checks = regexp:/etc/postfix/header_checks"