Alexandros Kosiaris has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/372848 )
Change subject: mail::mx: Ship bounce/warn message files
......................................................................
mail::mx: Ship bounce/warn message files
Populate bounce_message_file and warn_message_file in our main mail
exchangers in order to customize the bounces we send for delayed
delivery or failure of delivery. The idea is to just add a References
header the references the subject of the failed email. That should be
usable by OTRS to automatically merge bounces/DSNs in tickets. We avoid
changing anything else to not disturb the status quo
Bug: T173733
Change-Id: I2e1503a39291e0f008bb7dd39aefb525086dc433
---
A modules/role/files/exim/bounce_message_file
A modules/role/files/exim/warn_message_file
M modules/role/manifests/mail/mx.pp
M modules/role/templates/exim/exim4.conf.mx.erb
4 files changed, 30 insertions(+), 0 deletions(-)
Approvals:
Herron: Looks good to me, but someone else must approve
Alexandros Kosiaris: Verified; Looks good to me, approved
diff --git a/modules/role/files/exim/bounce_message_file
b/modules/role/files/exim/bounce_message_file
new file mode 100644
index 0000000..02a16fd
--- /dev/null
+++ b/modules/role/files/exim/bounce_message_file
@@ -0,0 +1,7 @@
+Subject: Mail delivery failed ${if eq{$sender_address}{$bounce_recipient} {:
returning message to sender}}
+References: $h_subject
+****
+****
+****
+****
+****
diff --git a/modules/role/files/exim/warn_message_file
b/modules/role/files/exim/warn_message_file
new file mode 100644
index 0000000..2ddd36b
--- /dev/null
+++ b/modules/role/files/exim/warn_message_file
@@ -0,0 +1,4 @@
+Subject: Warning: message $message_exim_id delayed $warn_message_delay
+References: $h_subject
+****
+****
diff --git a/modules/role/manifests/mail/mx.pp
b/modules/role/manifests/mail/mx.pp
index d860227..b8fdce9 100644
--- a/modules/role/manifests/mail/mx.pp
+++ b/modules/role/manifests/mail/mx.pp
@@ -41,6 +41,7 @@
filter => template('role/exim/system_filter.conf.erb'),
require => Class['spamassassin'],
}
+
include exim4::ganglia
file { '/etc/exim4/defer_domains':
@@ -68,6 +69,22 @@
source => 'puppet:///modules/role/exim/legacy_mailing_lists',
require => Class['exim4'],
}
+
+ file { '/etc/exim4/bounce_message_file':
+ ensure => present,
+ owner => 'root',
+ group => 'Debian-exim',
+ mode => '0444',
+ source => 'puppet:///modules/role/exim/bounce_message_file',
+ }
+ file { '/etc/exim4/warn_message_file':
+ ensure => present,
+ owner => 'root',
+ group => 'Debian-exim',
+ mode => '0444',
+ source => 'puppet:///modules/role/exim/warn_message_file',
+ }
+
exim4::dkim { 'wikimedia.org':
domain => 'wikimedia.org',
selector => 'wikimedia',
diff --git a/modules/role/templates/exim/exim4.conf.mx.erb
b/modules/role/templates/exim/exim4.conf.mx.erb
index c0957e5..5ef35c7 100644
--- a/modules/role/templates/exim/exim4.conf.mx.erb
+++ b/modules/role/templates/exim/exim4.conf.mx.erb
@@ -87,6 +87,8 @@
# Other
never_users = root : daemon : bin
ignore_bounce_errors_after = 0h
+bounce_message_file = /etc/exim4/bounce_message_file
+warn_message_file = /etc/exim4/warn_message_file
add_environment = <; PATH=/bin:/usr/bin
keep_environment =
--
To view, visit https://gerrit.wikimedia.org/r/372848
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e1503a39291e0f008bb7dd39aefb525086dc433
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Herron <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits