• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved SpamAssassin can't be activate

AndreiW

New Pleskian
I tried to activate spamassassin using plesk installer.
Ubuntu 16 / Plesk 17.8

remove/install manually, or remove, purge, apt clean etc - same error
Setting up spamassassin (3.4.2-0ubuntu0.16.04.1) ...
-su: 50: Syntax error: "(" unexpected
dpkg: error processing package spamassassin (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of sa-compile:
sa-compile depends on spamassassin; however:
Package spamassassin is not configured yet.

Code:
[2018-11-11 22:11:52.774753] Installation started in background
[2018-11-11 22:11:52.774794]
Getting bootstrapper packages to installation list:
[2018-11-11 22:11:52.774825] skip package 'pp17.8.11-bootstrapper-17.8.11-ubuntu16.04.build1708180920.15.amd64' from component spamassassin - same or newer version of this package is already installed (in system pp17.8.11-bootstrapper-17.8.11-ubuntu16.04.build1708180920.15.amd64)
[2018-11-11 22:11:52.774858] skip package 'sw-engine-cli-2.24-2.24.9-ubuntu.16.04.180409.1642.amd64' from component spamassassin - same or newer version of this package is already installed (in system sw-engine-cli-2.24-2.24.9-ubuntu.16.04.180409.1642.amd64)
[2018-11-11 22:11:52.774889] skip package 'pp17.8.11-bootstrapper-17.8.11-ubuntu16.04.build1708180920.15.amd64' from component panel - same or newer version of this package is already installed (in system pp17.8.11-bootstrapper-17.8.11-ubuntu16.04.build1708180920.15.amd64)
[2018-11-11 22:11:52.774923] skip package 'sw-engine-cli-2.24-2.24.9-ubuntu.16.04.180409.1642.amd64' from component panel - same or newer version of this package is already installed (in system sw-engine-cli-2.24-2.24.9-ubuntu.16.04.180409.1642.amd64)
[2018-11-11 22:11:52.774950] Following bootstrapper packages will be installed: (empty)
[2018-11-11 22:11:52.774961] ----------------
[2018-11-11 22:11:52.774969] Getting packages to installation list:
[2018-11-11 22:11:52.775004] Following packages will be installed: psa-spamassassin-17.8.11-ubuntu16.04.build1708180301.19.amd64
[2018-11-11 22:11:52.775018] ----------------
[2018-11-11 22:11:52.775042] Checking whether the package dependencies are resolved.
[2018-11-11 22:11:52.775061] autoinstaller: read output of DEBIAN_FRONTEND=noninteractive LANG=C apt-get --assume-yes --show-upgraded --purge --no-reinstall -o APT::Get::List-Cleanup=true -o Dpkg::options::=--force-confdef -o Dpkg::options::=--force-confold -o APT::Get::AllowUnauthenticated=false -o Acquire::Retries=3 -t 'xenial*' --just-print install psa-spamassassin=17.8.11-ubuntu16.04.build1708180301.19
[2018-11-11 22:11:53.258990] add to install list spamassassin-3.4.2-0ubuntu0.16.04.1
[2018-11-11 22:11:53.263135] add to install list sa-compile-3.4.2-0ubuntu0.16.04.1
[2018-11-11 22:11:53.267305] add to install list psa-spamassassin-17.8.11-ubuntu16.04.build1708180301.19
[2018-11-11 22:11:53.278887] (regen obsoletes cache)
[2018-11-11 22:11:53.278952] Check package set before installation
[2018-11-11 22:11:53.279154] The following packages from not selected components will be installed because they are required by other components' packages you selected for installation:
[2018-11-11 22:11:53.381288] Installing packages
[2018-11-11 22:11:53.387419] Bootstrapper has finished action (exec time: 0 sec.): parent_name='PLESK_17_8_11', sequence='prep', stage='execute', sequence_order='-1', operation='install', exec_cmd='touch /tmp/pp-bootstrapper-mode.flag; touch /var/lock/parallels-panel-maintenance-mode.flag; rm -f /var/lock/parallels-panel-upgrade-failure.flag; :'', m_arch='', output: ~empty
[2018-11-11 22:11:53.398839] Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
 razor pyzor libmail-dkim-perl libencode-detect-perl
The following NEW packages will be installed:
 psa-spamassassin sa-compile spamassassin
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 1193 kB of archives.
After this operation, 4432 kB of additional disk space will be used.
Get:1 http://mirror.hetzner.de/ubuntu/packages xenial-updates/main amd64 spamassassin all 3.4.2-0ubuntu0.16.04.1 [1095 kB]
Get:2 http://autoinstall.plesk.com/ubuntu/PSA_17.8.11 xenial/all amd64 psa-spamassassin amd64 17.8.11-ubuntu16.04.build1708180301.19 [85.2 kB]
Get:3 http://mirror.hetzner.de/ubuntu/packages xenial-updates/main amd64 sa-compile all 3.4.2-0ubuntu0.16.04.1 [13.3 kB]
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Fetched 1193 kB in 0s (9427 kB/s)
Selecting previously unselected package spamassassin.
(Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 135326 files and directories currently installed.)
Preparing to unpack .../spamassassin_3.4.2-0ubuntu0.16.04.1_all.deb ...
Unpacking spamassassin (3.4.2-0ubuntu0.16.04.1) ...
Selecting previously unselected package sa-compile.
Preparing to unpack .../sa-compile_3.4.2-0ubuntu0.16.04.1_all.deb ...
Unpacking sa-compile (3.4.2-0ubuntu0.16.04.1) ...
Selecting previously unselected package psa-spamassassin.
Preparing to unpack .../psa-spamassassin_17.8.11-ubuntu16.04.build1708180301.19_amd64.deb ...
Unpacking psa-spamassassin (17.8.11-ubuntu16.04.build1708180301.19) ...
Processing triggers for systemd (229-4ubuntu21.6) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Setting up spamassassin (3.4.2-0ubuntu0.16.04.1) ...
-su: 50: Syntax error: "(" unexpected
dpkg: error processing package spamassassin (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of sa-compile:
 sa-compile depends on spamassassin; however:
 Package spamassassin is not configured yet.

dpkg: error processing package sa-compile (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of psa-spamassassin:
 psa-spamassassin depends on spamassassin (>= 3.0.2); however:
 Package spamassassin is not configured yet.

dpkg: error processing package psa-spamassassin (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 spamassassin
 sa-compile
 psa-spamassassin
E: Sub-process /usr/bin/dpkg returned an error code (1)
Bootstrapper has finished action (exec time: 0 sec.): parent_name='PLESK_17_8_11', sequence='pkgs', stage='rollback', sequence_order='1', operation='install', exec_cmd='rm -f /tmp/pp-bootstrapper-mode.flag; rm -f /var/lock/parallels-panel-maintenance-mode.flag; touch /var/lock/parallels-panel-upgrade-failure.flag; /etc/init.d/psa restart; :'', m_arch='', output: ~empty
[2018-11-11 22:12:01.978501] Error: An error occurred on attempt to install packages.
Attention! Your software might be inoperable.
Please contact product technical support.
 
same to me. This is the German error Message:

Code:
dpkg: Fehler beim Bearbeiten des Paketes spamassassin (--configure):
 Unterprozess installiertes post-installation-Skript wurde unterbrochen
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von sa-compile:
 sa-compile hängt ab von spamassassin; aber:
  Paket spamassassin ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes sa-compile (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
 spamassassin
 sa-compile
 
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
sa-compile
Suggested packages:
razor pyzor libmail-dkim-perl libencode-detect-perl
The following NEW packages will be installed:
sa-compile spamassassin
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/1,108 kB of archives.
After this operation, 4,129 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Selecting previously unselected package spamassassin.
(Reading database ... 138525 files and directories currently installed.)
Preparing to unpack .../spamassassin_3.4.2-0ubuntu0.16.04.1_all.deb ...
Unpacking spamassassin (3.4.2-0ubuntu0.16.04.1) ...
Selecting previously unselected package sa-compile.
Preparing to unpack .../sa-compile_3.4.2-0ubuntu0.16.04.1_all.deb ...
Unpacking sa-compile (3.4.2-0ubuntu0.16.04.1) ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) .
..
Setting up spamassassin (3.4.2-0ubuntu0.16.04.1) ...
-su: 50: Syntax error: "(" unexpected


dpkg: error processing package spamassassin (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of sa-compile:
sa-compile depends on spamassassin; however:
Package spamassassin is not configured yet.

dpkg: error processing package sa-compile (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
spamassassin
sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Last edited:
This issue may occur because `lo` interface is not configured with IPv6 loopback address. So, with command

# ip a

make sure that "::1/128" IPv6 address is assigned to lo interface.

Additionally in /etc/profile check that in this place no extra dot:
....
#### AMH ####
if [ `/usr/bin/lspci | /bin/grep VMware | /usr/bin/wc -l` -eq 0 ]
then
. /etc/init.d/msm_profile. <-------HERE IT WAS
#echo "hi"
fi
#### AMH ####

Contact Plesk Support Team if these suggestions not help.
 
Setting up spamassassin (3.4.2-0ubuntu0.16.04.1) ...
+ set -e
+ [ configure = triggered ]
+ [ configure = configure ]
+ getent passwd debian-spamd
+ mkdir -p /var/lib/spamassassin
+ stat -c %U /var/lib/spamassassin
+ OWNER=debian-spamd
+ stat -c %G /var/lib/spamassassin
+ GROUP=debian-spamd
+ dpkg-statoverride --list /var/lib/spamassassin/sa-update-keys
+ [ debian-spamd:debian-spamd != debian-spamd:debian-spamd ]
+ test -d /var/lib/spamassassin/sa-update-keys
+ su - debian-spamd -c sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys --import /usr/share/spamassassin/GPG.KEY
-su: 50: Syntax error: "(" unexpected
dpkg: error processing package spamassassin (--configure):
subprocess installed post-installation script returned error exit status 2
 
What is the output of command

# su - debian-spamd -c "sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys --import /usr/share/spamassassin/GPG.KEY"

?
 
# We want to do a small amount of macro processing during channel installs,
# based on the values as passed in via 'make'
my %MACRO_VALUES = (
'VERSION' => '3.004002',
'CONTACT_ADDRESS' => 'the administrator of that system',
'PREFIX' => '/usr',
'DEF_RULES_DIR' => '/usr/share/spamassassin',
'LOCAL_RULES_DIR' => '/etc/spamassassin',
'LOCAL_STATE_DIR' => '/var/lib/spamassassin',
'INSTALLSITELIB' => '/usr/share/perl5',
);

# Standard perl modules <-- Line 50 on /usr/bin/sa-update
use Errno qw(ENOENT EACCES);
use IO::File qw(O_RDONLY O_WRONLY O_RDWR O_CREAT O_EXCL);
 
su - (here) debian-spamd -c "sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys --import /usr/share/spamassassin/GPG.KEY"

If I removed the minus - works like it should

su debian-spamd -c "sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys --import /usr/share/spamassassin/GPG.KEY"

But this don't solve it, because that - is present in other files too.
 
I replaced the - and now I have a problem with folders ownership, root instead of debian-spamd
So must be something else
 
I have find a way to install it properly

After apt-get install fails, go to these two files and replace #!/bin/sh with #!/bin/bash
/var/lib/dpkg/info/spamassassin.postinst
/var/lib/dpkg/info/sa-compile.postinst
Then repeat apt-get install
 
Back
Top