Skip to content

Commit

Permalink
SpamAssassin: Removed update SpamAssassin rules and keys. Will be don…
Browse files Browse the repository at this point in the history
…e by the default SpamAssassin cronjob.
  • Loading branch information
reneschuster committed Feb 26, 2016
1 parent 31d0efe commit 0acb724
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
1 change: 1 addition & 0 deletions incubator/SpamAssassin/CHANGELOG
@@ -1,6 +1,7 @@
SpamAssassin - ChangeLog
========================

Removed: Update SpamAssassin rules and keys. Will be done by the default SpamAssassin cronjob.
Added: 3rd party SpamAssassin rules from Heinlein Support
Added: Option to define networks which won't be scanned for SPAM
Added: Option to scan outgoing mails of SMTP authenticated senders
Expand Down
48 changes: 0 additions & 48 deletions incubator/SpamAssassin/backend/SpamAssassin.pm
Expand Up @@ -86,9 +86,6 @@ sub change
my $rs = $self->_getSaDbPassword();
return $rs if $rs;

$rs = $self->_updateSpamassassinRules();
return $rs if $rs;

$rs = $self->_spamassassinRulesHeinleinSupport('add');
return $rs if $rs;

Expand Down Expand Up @@ -374,51 +371,6 @@ sub _init
$self;
}

=item _updateSpamassassinRules()
Update the SpamAssassin filter rules and keys
Return int 0 on success, other on failure
=cut

sub _updateSpamassassinRules
{
my $self = shift;

$self->{'config'}->{'spamassassinOptions'} =~ m/helper-home-dir=(\S*)/;
my $helperHomeDir = $1;

$self->{'config'}->{'spamassassinOptions'} =~ m/username=(\S*)/;
my $saUser = $1;

my $rs = execute(
"/bin/su $saUser -c '/usr/bin/sa-update --gpghomedir $helperHomeDir/sa-update-keys'", \my $stdout, \my $stderr
);
debug($stdout) if $stdout;
error($stderr) if $stderr && $rs >= 4;
return $rs if $rs >= 4;

if($self->{'config'}->{'heinlein-support_sa-rules'} eq 'yes') {
$rs = execute(
"/bin/su $saUser -c '/usr/bin/sa-update --nogpg --channel spamassassin.heinlein-support.de'", \$stdout, \$stderr
);
debug($stdout) if $stdout;
error($stderr) if $stderr && $rs >= 4;
return $rs if $rs >= 4;
}

$rs = execute("su $saUser -c '/usr/bin/sa-compile --quiet'", \$stdout, \$stderr);
debug($stdout) if $stdout;
error($stderr) if $stderr && $rs;
return $rs if $rs;

$rs = execute("chmod -R go-w,go+rX $helperHomeDir/compiled", \$stdout, \$stderr);
debug($stdout) if $stdout;
error($stderr) if $stderr && $rs;
$rs;
}

=item _discoverPyzor()
Create Pyzor home folder and discover the servers
Expand Down

0 comments on commit 0acb724

Please sign in to comment.