Unable to start SpamAssassin: warn: Unknown option: 4

Created:

2016-12-12 03:45:05 UTC

Modified:

2017-08-08 13:45:27 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Unable to start SpamAssassin: warn: Unknown option: 4

Applicable to:

  • Plesk Onyx for Linux

Symptoms

Unable to start Spamassassin:

Stopping spamd:                                            [FAILED]
Starting spamd: Oct 18 14:44:39.584 [546332] warn: Unknown option: 4

The following error appears in /var/log/plesk/panel.log :

ERR [1] spammng failed: [22380] warn: Unknown option: 4
invoke-rc.d: initscript spamassassin, action "start" failed.
ERROR:spammng:Unable to start SpamAssassin service

The following error appears in syslog :

invoke-rc.d: initscript spamassassin, action "status" failed.

Cause

This is an internal issue with ID #PPPM-5080 , which is planned to be fixed in future product updates.

Workaround

  1. Create a backup of /usr/local/psa/lib/modules/python/spammng/spammng.py file:

    # cp /usr/local/psa/lib/modules/python/spammng/spammng.py{,.orig}
  2. Edit /usr/local/psa/lib/modules/python/spammng/spammng.py file by replacing '-4' option with '--ipv4':

before:

    if is_disabled_ipv6():
log.debug("IPv6 disabled. Use IPv4 only.")
args.update({'-4': None})

after:

    if is_disabled_ipv6():
log.debug("IPv6 disabled. Use IPv4 only.")
args.update({'--ipv4': None})
  1. Edit /etc/default/spamassassin for Ubuntu or /etc/sysconfig/spamassassin for Centos by removing -4 in the end of OPTIONS line so that it looks like:

    OPTIONS="--daemonize --helper-home-dir=/var/qmail --max-children=5 --nouser-config --username=popuser"
  2. Start SpamAssassin:

    /etc/init.d/spamassassin start
Have more questions? Submit a request
Please sign in to leave a comment.