Skip to content

Commit

Permalink
SpamAssassin: Enable SpamAssassin service on systems with systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
reneschuster committed Mar 29, 2016
1 parent 73eaeea commit 71b6625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions incubator/SpamAssassin/CHANGELOG
Expand Up @@ -3,6 +3,7 @@ SpamAssassin - ChangeLog


Added: 3rd party SpamAssassin rules from Heinlein Support
Added: Enable SpamAssassin service on systems with systemd
Added: Option to define networks which won't be scanned for SPAM
Added: Option to scan outgoing mails of SMTP authenticated senders
Changed: Option to reject all SPAM mails or only above a defined score level
Expand Down
3 changes: 3 additions & 0 deletions incubator/SpamAssassin/backend/SpamAssassin.pm
Expand Up @@ -102,6 +102,9 @@ sub change
$rs = $self->_checkSpamassassinPlugins();
return $rs if $rs;

unless(iMSCP::Service->getInstance()->isEnabled( 'spamassassin' )) {
iMSCP::Service->getInstance()->enable('spamassassin');
}
iMSCP::Service->getInstance()->restart('spamassassin');

$rs = $self->_spamassMilterDefaultConfig('configure');
Expand Down

2 comments on commit 71b6625

@nuxwin
Copy link
Member

@nuxwin nuxwin commented on 71b6625 Mar 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reneschuster

You should catch error here with eval. See my example in our internal forum.

@reneschuster
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'll review

Please sign in to comment.