Skip to content

Commit

Permalink
Fix patches
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Feb 19, 2024
1 parent c7c22c4 commit 84f4f16
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion user-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@ printf '\nsmtp_helo_name = %s\n' "${OVERRIDE_HOSTNAME}" >> /etc/postfix/main.cf

echo "Allow this network (${CONTAINER_NETWORK_V4})"

source /usr/local/bin/setup.d/networking.sh
source /usr/local/bin/helpers/utils.sh
# Copied from /usr/local/bin/setup.d/networking.sh
__add_to_postfix_mynetworks() {
local NETWORK_TYPE=$1
local NETWORK=$2

_log 'trace' "Adding ${NETWORK_TYPE} (${NETWORK}) to Postfix 'main.cf:mynetworks'"
_adjust_mtime_for_postfix_maincf
postconf "$(postconf | grep '^mynetworks =') ${NETWORK}"
[[ ${ENABLE_OPENDMARC} -eq 1 ]] && echo "${NETWORK}" >>/etc/opendmarc/ignore.hosts
[[ ${ENABLE_OPENDKIM} -eq 1 ]] && echo "${NETWORK}" >>/etc/opendkim/TrustedHosts
}

__add_to_postfix_mynetworks 'Container network' "${CONTAINER_NETWORK_V4}"

echo 'Add spam check config'
Expand Down

0 comments on commit 84f4f16

Please sign in to comment.