Add option to overwrite the From address
This commit is contained in:
committed by
Juan Luis Baptiste
parent
c55bcb70ac
commit
99a2397715
7
run.sh
7
run.sh
@@ -68,6 +68,13 @@ if [ ! -z "${SMTP_NETWORKS}" ]; then
|
||||
fi
|
||||
add_config_value "mynetworks" "${nets}"
|
||||
|
||||
if [ ! -z "${OVERWRITE_FROM}" ]; then
|
||||
echo -e "/^From:.*$/ REPLACE From: $OVERWRITE_FROM" > /etc/postfix/smtp_header_checks
|
||||
postmap /etc/postfix/smtp_header_checks
|
||||
postconf -e 'smtp_header_checks = regexp:/etc/postfix/smtp_header_checks'
|
||||
echo "Setting configuration option OVERWRITE_FROM with value: ${OVERWRITE_FROM}"
|
||||
fi
|
||||
|
||||
#Start services
|
||||
|
||||
# If host mounting /var/spool/postfix, we need to delete old pid file before
|
||||
|
||||
Reference in New Issue
Block a user