Add environment variable to allow for customizing postsrsd's SRS_EXCLUDE_DOMAINS setting (#849, #842)

This commit is contained in:
Achim Christ 2018-02-18 20:53:13 +01:00 committed by Johan Smits
parent 5e09074d58
commit eb20722b80
2 changed files with 11 additions and 1 deletions

View file

@ -486,3 +486,9 @@ Note: This postgrey setting needs `ENABLE_POSTGREY=1`
- **empty** => No sasl_passwd will be created
- string => `/etc/postfix/sasl_passwd` will be created with the string as password
## SRS (Sender Rewriting Scheme)
##### SRS_EXCLUDE_DOMAINS
- **empty** => Envelope sender will be rewritten for all domains
- provide comma seperated list of domains to exclude from rewriting

View file

@ -1,8 +1,12 @@
#!/usr/bin/env bash
# postsrsd-wrapper.sh, version 0.1.0
# postsrsd-wrapper.sh, version 0.2.0
DOMAINNAME="$(hostname -d)"
sed -i -e "s/localdomain/$DOMAINNAME/g" /etc/default/postsrsd
if [ -n "$SRS_EXCLUDE_DOMAINS" ]; then
sed -i -e "s/^#\?SRS_EXCLUDE_DOMAINS=.*$/SRS_EXCLUDE_DOMAINS=$SRS_EXCLUDE_DOMAINS/g" /etc/default/postsrsd
fi
/etc/init.d/postsrsd start