From 3859c5c14d10766f4fdeaade12c4903ee871ca5e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 22 Jul 2026 08:17:05 +0100 Subject: [PATCH] Prevent some auto response mails reaching OTRS --- cookbooks/exim/templates/default/exim4.conf.erb | 3 +++ roles/mail.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/cookbooks/exim/templates/default/exim4.conf.erb b/cookbooks/exim/templates/default/exim4.conf.erb index f36b4519b..3e6b899ac 100644 --- a/cookbooks/exim/templates/default/exim4.conf.erb +++ b/cookbooks/exim/templates/default/exim4.conf.erb @@ -668,6 +668,9 @@ noreply: local_part_suffix = +* local_part_suffix_optional <% end -%> +<% if details[:condition] -%> + condition = <%= details[:condition] %> +<% end -%> <% if details[:host] -%> <% if details[:host].kind_of?(Array) -%> route_data = <%= details[:host].join(":") %> byname diff --git a/roles/mail.rb b/roles/mail.rb index 52c993568..c9cf8ec1d 100644 --- a/roles/mail.rb +++ b/roles/mail.rb @@ -47,6 +47,7 @@ default_attributes( :otrs => { :comment => "otrs.openstreetmap.org", :domains => ["otrs.openstreetmap.org"], + :condition => "${if or {{def:h_auto-submitted:}{def:h_x-autorespond:}} {no}{yes}}", :host => "naga.dub.openstreetmap.org" }, :join => { -- 2.47.3