postfwd: install config from files/postfwd, idempotent /etc/default/postfwd handling

- Ship postfwd.cf and list files in files/postfwd; used by install_postfwd.sh
  and install_postfix_advanced.sh (lists only if missing, cf with backup).
- Add update_postfwd_defaults.sh.
- install_amavis.sh: disable smtpd_end_of_data_restrictions on localhost:10025.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 10:53:21 +01:00
co-authored by Claude Opus 5.5
parent 450b04134d
commit 39909a5b30
18 changed files with 1264 additions and 849 deletions
+10
View File
@@ -5205,9 +5205,15 @@ fi
## - -o smtpd_sender_restrictions=
## - -o smtpd_recipient_restrictions=permit_mynetworks,reject
## - -o smtpd_data_restrictions=
## - -o smtpd_end_of_data_restrictions=
## - -o mynetworks=127.0.0.0/8,[::1]/128
## - -o receive_override_options=no_unknown_recipient_checks
## -
## - - 'smtpd_end_of_data_restrictions=' disables the postfwd policy check
## - (main.cf) for mail reinjected by amavis. Otherwise every message
## - could be counted twice by the postfwd rate limits (XFORWARD restores
## - the original client address on reinjection).
## -
## - - take care not to have 'content_filter' set im main.cf
postfix_master_cf="/etc/postfix/master.cf"
echo ""
@@ -5281,6 +5287,7 @@ localhost:10025 inet n - y - - smtpd
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
-o smtpd_end_of_data_restrictions=
-o mynetworks=127.0.0.0/8,[::1]/128
-o receive_override_options=no_unknown_recipient_checks
EOF
@@ -5336,6 +5343,7 @@ localhost:10025 inet n - y - - smtpd
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
-o smtpd_end_of_data_restrictions=
-o mynetworks=127.0.0.0/8,[::1]/128
-o receive_override_options=no_unknown_recipient_checks
EOF
@@ -5384,6 +5392,7 @@ localhost:10025 inet n - y - - smtpd
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
-o smtpd_end_of_data_restrictions=
-o mynetworks=127.0.0.0/8,[::1]/128
-o receive_override_options=no_unknown_recipient_checks
EOF
@@ -5416,6 +5425,7 @@ localhost:10025 inet n - y - - smtpd
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
-o smtpd_end_of_data_restrictions=
-o mynetworks=127.0.0.0/8,[::1]/128
-o receive_override_options=no_unknown_recipient_checks
EOF