mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Fix issue with concatenating $dmarc_milter and $dkim_milter in main.cf (#3380)
* Fix issue with concatenating $dmarc_milter and $dkim_milter in main.cf Upon each start the `smtpd_milters` and `non_smtpd_milters` would be extended with the following: ``` smtpd_milters = $dmarc_milter $dkim_milter non_smtpd_milters = $dkim_milter ``` In my case they became long enough that mail delivery stopped. I think this was because of the extra headers that are added by these steps. (which in turn would cause the mail to be dropped) * fix sed to work when the variables are there and when they are not. --------- Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
2b400a9269
commit
68c6f247a6
|
@ -17,8 +17,8 @@ function _setup_opendkim() {
|
|||
postconf 'dkim_milter = inet:localhost:8891'
|
||||
# shellcheck disable=SC2016
|
||||
sed -i -E \
|
||||
-e 's|^(smtpd_milters =.*)|\1 \$dkim_milter|g' \
|
||||
-e 's|^(non_smtpd_milters =.*)|\1 \$dkim_milter|g' \
|
||||
-e '/\$dkim_milter/! s|^(smtpd_milters =.*)|\1 \$dkim_milter|g' \
|
||||
-e '/\$dkim_milter/! s|^(non_smtpd_milters =.*)|\1 \$dkim_milter|g' \
|
||||
/etc/postfix/main.cf
|
||||
|
||||
# check if any keys are available
|
||||
|
@ -64,7 +64,7 @@ function _setup_opendmarc() {
|
|||
postconf 'dmarc_milter = inet:localhost:8893'
|
||||
# Make sure to append the OpenDMARC milter _after_ the OpenDKIM milter!
|
||||
# shellcheck disable=SC2016
|
||||
sed -i -E 's|^(smtpd_milters =.*)|\1 \$dmarc_milter|g' /etc/postfix/main.cf
|
||||
sed -i -E '/\$dmarc_milter/! s|^(smtpd_milters =.*)|\1 \$dmarc_milter|g' /etc/postfix/main.cf
|
||||
|
||||
sed -i \
|
||||
-e "s|^AuthservID.*$|AuthservID ${HOSTNAME}|g" \
|
||||
|
|
Loading…
Reference in a new issue