Jgreen has uploaded a new change for review.

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


Change subject: finish parameterizing spamassassin, change exim::roled to 
depend on it without defining it
......................................................................

finish parameterizing spamassassin, change exim::roled to depend on it without 
defining it

Change-Id: Ic16a3df782ff97113004d188c6917f6e93e44964
---
M manifests/mail.pp
M manifests/role/otrs.pp
M manifests/site.pp
3 files changed, 15 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/77721/1

diff --git a/manifests/mail.pp b/manifests/mail.pp
index 5202594..8e47485 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -208,16 +208,16 @@
                        include mail_relay
                }
                if ( $enable_spamassassin == "true" ) {
-                       include spamassassin
+                       Class[spamassassin] -> Class[exim::roled]
                }
        }
 }
 
 # SpamAssassin http://spamassassin.apache.org/
 class spamassassin(
-               $required_score = '4.0',
-               $use_bayes = 0,
-               $bayes_auto_learn = 0
+               $required_score = '5.0',
+               $use_bayes = 1,
+               $bayes_auto_learn = 1
        ) {
        include network::constants
 
diff --git a/manifests/role/otrs.pp b/manifests/role/otrs.pp
index a7f1974..a38812e 100644
--- a/manifests/role/otrs.pp
+++ b/manifests/role/otrs.pp
@@ -8,6 +8,11 @@
         home => '/opt/otrs-home',
         groups => 'www-data'
     }
+    class { 'spamassassin':
+        required_score => '5.0',
+        use_bayes => '1',
+        bayes_auto_learn => '1',
+    }
     class { 'exim::roled':
         enable_otrs_server => 'true',
         enable_imap_delivery => 'true',
@@ -41,28 +46,3 @@
     apache_module { 'ssl': name => 'ssl' }
     apache_site { 'ticket': name => 'ticket.wikimedia.org' }
 }
-
-
-#class role::otrs::mailserver {
-#    include network::constants
-#
-#    class { 'spamassassin':
-#        required_score => '5.0',
-#        use_bayes => 1,
-#        bayes_auto_learn => 1
-#    }
-#
-#    File {
-#        owner => root,
-#        group => root,
-#        mode => '0444',
-#    }
-#    file {
-#        '/etc/exim4/exim4.conf':
-#            ensure => present,
-#            content => template('exim/exim4.otrs.erb');
-#        '/etc/exim4/system_filter':
-#            ensure => present,
-#            source => 'puppet:///files/exim/system_filter.otrs';
-#    }
-#}
diff --git a/manifests/site.pp b/manifests/site.pp
index d6834d1..6cfaa67 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2415,9 +2415,14 @@
         nrpe,
         mailman,
         dns::recursor,
-        spamassassin,
         backup::client
 
+       class { 'spamassassin':
+        required_score => '4.0',
+        use_bayes => '0',
+        bayes_auto_learn => '0',
+    }
+
     class { exim::roled:
         outbound_ips => [ "208.80.154.4", "2620:0:861:1::2" ],
         local_domains => [ "+system_domains", "+mailman_domains" ],

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

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

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

Reply via email to