From 5f7f2cd3a61aafb1afc81b74b3ef03afe3a64221 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 19 Dec 2013 16:03:45 -0500 Subject: Set mynetworks to include any mx server in the provider to allow them to Helo as the domain (#4495) Change-Id: I6c8ac28faceb8b0c6129a606ede04837efd3d261 --- provider_base/services/mx.json | 1 + puppet/modules/site_postfix/manifests/mx.pp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/provider_base/services/mx.json b/provider_base/services/mx.json index 9d0ee532..d57c3168 100644 --- a/provider_base/services/mx.json +++ b/provider_base/services/mx.json @@ -6,6 +6,7 @@ "servers": "= haproxy_servers(nodes_like_me[:services => :couchdb], stunnel.couch_client)" }, "couchdb_leap_mx_user": "= global.services[:couchdb].couch.users[:leap_mx]", + "mx_nodes": "= nodes['services' => 'mx']['environment' => '!local'].field('ip_address')", "x509": { "use": true, "ca_cert": "= file :ca_cert, :missing => 'provider CA. Run `leap cert ca`'", diff --git a/puppet/modules/site_postfix/manifests/mx.pp b/puppet/modules/site_postfix/manifests/mx.pp index 441252f2..de89c26e 100644 --- a/puppet/modules/site_postfix/manifests/mx.pp +++ b/puppet/modules/site_postfix/manifests/mx.pp @@ -4,6 +4,7 @@ class site_postfix::mx { $domain = $domain_hash['full_suffix'] $host_domain = $domain_hash['full'] $cert_name = hiera('name') + $mynetworks = join(hiera('mx_nodes'), ' ') $root_mail_recipient = hiera ('contacts') $postfix_smtp_listen = 'all' @@ -14,6 +15,8 @@ class site_postfix::mx { include site_config::x509::client_ca::key postfix::config { + 'mynetworks': + value => "127.0.0.0/8 [::1]/128 [fe80::]/64 ${mynetworks}"; 'mydestination': value => "\$myorigin, localhost, localhost.\$mydomain, ${domain}"; 'myhostname': -- cgit v1.2.3