Mark Bergsma has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/79342


Change subject: Route list outbound mail to a separate SMTP transport
......................................................................

Route list outbound mail to a separate SMTP transport

This allows separate SMTP settings/parameters to be used,
and avoids problems due to message batching mixed with normal mail
at the remote_smtp transport

Change-Id: I7cebaa9a30a8859d4244ba5b815afb5cdeb3d08c
---
M manifests/mail.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
2 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/79342/1

diff --git a/manifests/mail.pp b/manifests/mail.pp
index 41f5108..05f9914 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -131,6 +131,8 @@
        #               Enable/disable SpamAssassin spam checking
        #       - $outbound_ips:
        #               IP addresses to use for sending outbound e-mail
+       #   - $list_outbound_ips:
+       #       IP addresses to use for sending outbound e-mail from Mailman
        #       - $hold_domains:
        #               List of domains to hold on the queue without processing
        class roled(
@@ -146,6 +148,7 @@
                $rt_relay="false",
                $enable_spamassassin="false",
                $outbound_ips=[ $ipaddress ],
+               $list_outbound_ips=[],
                $hold_domains=[] ) {
 
                class { "exim::config": install_type => "heavy", queuerunner => 
"combined" }
diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb 
b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
index a940c7f..bff891f 100644
--- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
+++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
@@ -339,7 +339,17 @@
        transport = bulk_smtp
        ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; 10/8 ; 172.16/12 ; 
192.168/16
        no_verify
-<% end %>
+
+<% end -%>
+<% if enable_mailman == "true" then -%>
+list_outbound:
+       driver = dnslookup
+       condition = ${if match_ip{$sender_host_address}{@[]}}
+       senders = *@lists.wikimedia.org
+       transport = list_smtp
+       no_verify
+
+<% end -%>
 <% if enable_mail_relay != "false" then -%>
 # Send donate.wikimedia.org mail to Fundraising CiviCRM server
 donate:
@@ -654,7 +664,12 @@
 <% if (enable_otrs_server == "false" ) -%>
        interface = <; <%= outbound_ips.join(" ; ") %>
 <% end -%>
-<% if (enable_mailman == "true" ) -%>
+<% if enable_mailman == "true" ) -%>
+
+list_smtp:
+       driver = smtp
+       hosts_avoid_tls = <; 0.0.0.0/0 ; 0::0/0
+       interface = <; <%= list_outbound_ips.join(" ; ") %>
        helo_data = lists.wikimedia.org
 <% end -%>
 

-- 
To view, visit https://gerrit.wikimedia.org/r/79342
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cebaa9a30a8859d4244ba5b815afb5cdeb3d08c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to