Mark Bergsma has submitted this change and it was merged. Change subject: Create a special alias router for RT ......................................................................
Create a special alias router for RT Moves the existing 'mailalias' Puppet type aliases to a simple static file. As in this case there's no existing file to manage, it's simpler. Change-Id: I99292b51dd8448c068f4adbee3773176e06d3063 --- A modules/requesttracker/files/rt.aliases M modules/requesttracker/manifests/aliases.pp M templates/exim/exim4.conf.SMTP_IMAP_MM.erb 3 files changed, 31 insertions(+), 39 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/modules/requesttracker/files/rt.aliases b/modules/requesttracker/files/rt.aliases new file mode 100644 index 0000000..7f07db7 --- /dev/null +++ b/modules/requesttracker/files/rt.aliases @@ -0,0 +1,13 @@ +RT aliases + +ops-requests: [email protected] +phabricator: [email protected] +foo: [email protected] +ulsfo: [email protected] +pmtpa: [email protected] +todo: [email protected] +eqiad: [email protected] +esams: [email protected] +network: [email protected] +codfw: [email protected] +core-ops: [email protected] \ No newline at end of file diff --git a/modules/requesttracker/manifests/aliases.pp b/modules/requesttracker/manifests/aliases.pp index 22b1815..dcada8b 100644 --- a/modules/requesttracker/manifests/aliases.pp +++ b/modules/requesttracker/manifests/aliases.pp @@ -1,42 +1,8 @@ class requesttracker::aliases { - - mailalias { 'ops-request': - recipient => '[email protected]', - } - - mailalias { 'codfw': - recipient => '[email protected]', - } - - mailalias { 'core-ops': - recipient => '[email protected]', - } - - mailalias { 'eqiad': - recipient => '[email protected]', - } - - mailalias { 'esams': - recipient => '[email protected]', - } - - mailalias { 'network': - recipient => '[email protected]', - } - - mailalias { 'pmtpa': - recipient => '[email protected]', - } - - mailalias { 'todo': - recipient => '[email protected]', - } - - mailalias { 'ulsfo': - recipient => '[email protected]', - } - - mailalias { 'phabricator': - recipient => '[email protected]', + file { '/etc/exim4/aliases/rt': + owner => root, + group => root, + mode => 0444, + source => 'modules/requesttracker/rt.aliases', } } diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb index 7a9e3f9..4e51886 100644 --- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb +++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb @@ -363,6 +363,19 @@ <% if @rt_relay == true then -%> # Mail destined for RT +# Special alias file for the RT domain +rt_aliases: + driver = redirect + domains = +rt_domains + require_files = CONFDIR/aliases/rt + data = ${lookup{$local_part}lsearch*{CONFDIR/aliases/rt}} + qualify_preserve_domain + allow_fail + allow_defer + forbid_file + forbid_pipe + include_directory = CONFDIR + # This router checks whether the local part consists of solely digits, # and assumes this is the ticket number of an existing ticket if this is # the case. It rewrites the address to the general queue, and puts the -- To view, visit https://gerrit.wikimedia.org/r/180641 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99292b51dd8448c068f4adbee3773176e06d3063 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma <[email protected]> Gerrit-Reviewer: Mark Bergsma <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
