Jgreen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/81534
Change subject: enable train_spamassassin script on iodine
......................................................................
enable train_spamassassin script on iodine
Change-Id: I2f1bc50e2a467b7c49e5e97563ca0d1bc244efe6
---
M files/otrs/train_spamassassin
M manifests/role/otrs.pp
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/34/81534/1
diff --git a/files/otrs/train_spamassassin b/files/otrs/train_spamassassin
index 62b90f8..01d248e 100755
--- a/files/otrs/train_spamassassin
+++ b/files/otrs/train_spamassassin
@@ -66,9 +66,10 @@
my $line = scalar <$fh>; # this is the output itself
from the current filehandle
chomp $line;
if ($ffh == fileno(R)) { # output on stdout
- print "$line\n";
+ printlog($line);
} elsif ($ffh == fileno (E)) { # output on stderr
- print "error: $line\n";
+ printlog("error: $line");
+ print "$line\n";
}
}
}
diff --git a/manifests/role/otrs.pp b/manifests/role/otrs.pp
index 90ea9ff..be25281 100644
--- a/manifests/role/otrs.pp
+++ b/manifests/role/otrs.pp
@@ -79,4 +79,12 @@
enable_external_mail => 'true',
smart_route_list => [ 'mchenry.wikimedia.org', 'lists.wikimedia.org' ],
}
+
+ cron { 'otrs_train_spamassassin':
+ user => root,
+ minute => 5,
+ command => '/usr/local/bin/train_spamassassin',
+ ensure => present;
+ }
+
}
--
To view, visit https://gerrit.wikimedia.org/r/81534
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f1bc50e2a467b7c49e5e97563ca0d1bc244efe6
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