Skip to content

Commit

Permalink
Fix network allow and postfix maildrop
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Feb 19, 2024
1 parent e6aa1d7 commit 2fc8e51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ services:
- ./cron/rspamd-learn:/etc/cron.d/rspamd-learn:ro
- ${SASLAUTHD_SOCKET_FILE}:/var/run/saslauthd/mux
environment:
CONTAINER_NETWORK_V4: 10.222.222.0/28
TZ: UTC
OVERRIDE_HOSTNAME: ${OVERRIDE_HOSTNAME}
ENABLE_MTA_STS: "1"
Expand Down Expand Up @@ -364,6 +365,7 @@ networks:
ipam:
driver: default
config:
# See: __add_to_postfix_mynetworks in user-patches
- subnet: 10.222.222.0/28
ip_range: 10.222.222.0/28
gateway: 10.222.222.14
8 changes: 8 additions & 0 deletions user-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ printf '\nsmtpd_tls_received_header = yes\n' "localhost" >> /etc/postfix/main.cf
sed -i '/^smtp_helo_name =/d' /etc/postfix/main.cf
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
__add_to_postfix_mynetworks 'Container network' "${CONTAINER_NETWORK_V4}"

echo 'Add spam check config'

cat <<EOF > /etc/amavis/conf.d/05-domain_id
Expand Down Expand Up @@ -273,4 +278,7 @@ else
rm -fv /etc/dovecot/conf.d/10-replication.conf
fi

echo 'Chmod postfix maildrop'
chmod 777 /var/mail-state/spool-postfix/maildrop/

echo ">>>>>>>>>>>>>>>>>>>>>>>Finished applying patches<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"

0 comments on commit 2fc8e51

Please sign in to comment.