From 4729ba406b54fa805d501c9dfeb82d4c03af9e25 Mon Sep 17 00:00:00 2001
From: Kristian Klausen <kristian@klausen.dk>
Date: Wed, 5 May 2021 00:12:24 +0200
Subject: [PATCH] postfix: Remove special "fast-path" smtpd

With the switch to Rspamd from SpamAssassin it isn't faster anymore,
because Rspamd is configured as a global milter where SA was configured
as a smtpd_proxy_filter/content_filter for smtp/submission.
---
 roles/matrix/templates/homeserver.yaml.j2 |  2 +-
 roles/postfix/templates/master.cf.j2      | 19 -------------------
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/roles/matrix/templates/homeserver.yaml.j2 b/roles/matrix/templates/homeserver.yaml.j2
index db812ce34..ba1603700 100644
--- a/roles/matrix/templates/homeserver.yaml.j2
+++ b/roles/matrix/templates/homeserver.yaml.j2
@@ -2364,7 +2364,7 @@ email:
 
   # The port on the mail server for outgoing SMTP. Defaults to 25.
   #
-  smtp_port: 10027
+  smtp_port: 25
 
   # Username/password for authentication to the SMTP server. By default, no
   # authentication is attempted.
diff --git a/roles/postfix/templates/master.cf.j2 b/roles/postfix/templates/master.cf.j2
index e1821065f..f594e8e81 100644
--- a/roles/postfix/templates/master.cf.j2
+++ b/roles/postfix/templates/master.cf.j2
@@ -115,25 +115,6 @@ scache    unix  -       -       n       -       1       scache
         -o smtpd_tls_security_level=none
 {% endif %}
 
-# a port listening on localhost only to allow local services (eg, webapps etc)
-# to relay mail without waiting for filtering checks etc that are applied to
-# port 25 connections. specifically, flyspray seems to send emails sequentially
-# so any delays in delivery cause noticable delays for users on the web ui.
-127.0.0.1:10027 inet n  -       n       -        -      smtpd
-        -o syslog_name=postfix/dkim-injector
-        -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
-        -o smtpd_tls_auth_only=no
-        -o smtpd_reject_footer=
-        -o smtpd_tls_security_level=none
-
 {% if postfix_patchwork_enabled %}
 patchwork   unix  -       n       n       -       -       pipe
   flags=DFRX user={{postfix_patchwork_user}} argv={{postfix_patchwork_mail_handler}}
-- 
GitLab