From 8d7838ad26c34cd744f7a2c844189b4fcb936e09 Mon Sep 17 00:00:00 2001 From: phil Date: Fri, 24 Mar 2023 14:56:17 +0100 Subject: [PATCH] Add snippet to discard certain mails --- templates/postfix/conf.d/transport_global_exceptions.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/postfix/conf.d/transport_global_exceptions.j2 b/templates/postfix/conf.d/transport_global_exceptions.j2 index 1942f69..c3052f0 100644 --- a/templates/postfix/conf.d/transport_global_exceptions.j2 +++ b/templates/postfix/conf.d/transport_global_exceptions.j2 @@ -2,6 +2,11 @@ # Use this file for mail addresses that should be treated specially. +# Discard mails +# You need to create an alias to this address +/^noreply(\+.*)?@discard\.local$/ discard: + + {% if postfix_transport_global_exceptions is defined %} {% for address in postfix_transport_global_exceptions %} {% if address.comment is defined %}