From 543bfa14aef97dd8177929dda876ef8b0aa0368e Mon Sep 17 00:00:00 2001
From: Kristian Klausen <kristian@klausen.dk>
Date: Wed, 5 May 2021 00:29:10 +0200
Subject: [PATCH] postfix: Remove unneeded smtpd service that was used by
 SpamAssassin

Fix #321
---
 roles/postfix/templates/main.cf.j2   |  7 -------
 roles/postfix/templates/master.cf.j2 | 20 --------------------
 2 files changed, 27 deletions(-)

diff --git a/roles/postfix/templates/main.cf.j2 b/roles/postfix/templates/main.cf.j2
index 4d6a6c119..4427c3aae 100644
--- a/roles/postfix/templates/main.cf.j2
+++ b/roles/postfix/templates/main.cf.j2
@@ -121,13 +121,6 @@ smtpd_recipient_restrictions =
 # some rate limiting rules only work after data so check it again
 smtpd_end_of_data_restrictions =
   $policy_check
-
-# needed to put our users on HOLD
-# this is used in master.cf as an argument to smtpd_recipient_restrictions
-post_queue_smtpd_recipient_restrictions =
-  check_sender_access ${indexed}/access_sender-post-filter,
-  permit_mynetworks,
-  reject
 {% endif %}
 
 address_verify_map = ${default_database_type}:/var/lib/postfix/verify_cache
diff --git a/roles/postfix/templates/master.cf.j2 b/roles/postfix/templates/master.cf.j2
index f594e8e81..8a71cb624 100644
--- a/roles/postfix/templates/master.cf.j2
+++ b/roles/postfix/templates/master.cf.j2
@@ -95,26 +95,6 @@ lmtp      unix  -       -       n       -       -       lmtp
 anvil     unix  -       -       n       -       1       anvil
 scache    unix  -       -       n       -       1       scache
 
-{% if postfix_smtpd_public %}
-# After-filter SMTP server. Receive mail from the content filter
-# on localhost port 10026.
-#
-127.0.0.1:10026 inet n  -       n       -        -      smtpd
-        -o syslog_name=postfix/after-sa-smtp
-        -o smtpd_authorized_xforward_hosts=127.0.0.0/8
-        -o smtpd_client_restrictions=
-        -o smtpd_helo_restrictions=
-        -o smtpd_sender_restrictions=
-        -o smtpd_recipient_restrictions=$post_queue_smtpd_recipient_restrictions
-        -o smtpd_data_restrictions=
-        -o smtpd_end_of_data_restrictions=
-        -o mynetworks=127.0.0.0/8
-        -o receive_override_options=no_unknown_recipient_checks,no_milters
-        -o smtpd_tls_auth_only=no
-        -o smtpd_reject_footer=
-        -o smtpd_tls_security_level=none
-{% endif %}
-
 {% if postfix_patchwork_enabled %}
 patchwork   unix  -       n       n       -       -       pipe
   flags=DFRX user={{postfix_patchwork_user}} argv={{postfix_patchwork_mail_handler}}
-- 
GitLab