• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Spamassassin does not work

Kulturmensch

Regular Pleskian
The problem with spamassassin started with Package Update Manager notification:l
E:Sub-process /usr/bin/dpkg returned an error code (1)
2021-04-04 04:25:36 ERROR: installArchives() failed
2021-04-04 04:25:36 ERROR: Exited with returncode 1.
I found out, that spamassassin caused this problems and tried to de-install "Plesk E-Mail Security and spamassassin".
Now I get the following plesk-installation log.

Status: It is not possible to install Plesk-E-Mail Security any longer and the deinstallation attempt of Spamassissin using Plesk update leads to the following log:

Any idea how to solve this problem?


[2021-04-04 12:25:12.921729] Installation started in background
[2021-04-04 12:25:12.921799]
Getting bootstrapper packages to installation list:
[2021-04-04 12:25:12.921838] Following bootstrapper packages will be installed: (empty)
[2021-04-04 12:25:12.921855] ----------------
[2021-04-04 12:25:12.921867] Getting packages to installation list:
[2021-04-04 12:25:12.921896] Following packages will be installed: dummy_obsoleter_psa-spamassassin_amd64-0.0.amd64
[2021-04-04 12:25:12.921912] ----------------
[2021-04-04 12:25:12.921960] Auflösung der Paketabhängigkeiten wird geprüft.
[2021-04-04 12:25:14.814535] add to install list sa-compile-3.4.2-0ubuntu0.18.04.5
[2021-04-04 12:25:14.814620] Check package set before installation
[2021-04-04 12:25:14.814904] The following packages from not selected components will be installed because they are required by other components' packages you selected for installation:
[2021-04-04 12:25:14.838164] Pakete werden installiert
[2021-04-04 12:25:14.842137] Bootstrapper has finished action (exec time: 0 sec.): parent_name='PLESK_18_0_34', sequence='prep', stage='execute', sequence_order='-2', operation='install', exec_cmd='touch /var/lock/plesk-report-update.flag; :'', m_arch='', output: ~empty
[2021-04-04 12:25:14.847043] Bootstrapper has finished action (exec time: 0 sec.): parent_name='PLESK_18_0_34', 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
[2021-04-04 12:25:14.847438] WARNING: Failure of previous installation was detected! Bootstrapper post-actions will be executed for all components at the end of the current installation.
[2021-04-04 12:25:14.907835] Reading package lists...
Building dependency tree...
Reading state information...
sa-compile is already the newest version (3.4.2-0ubuntu0.18.04.5).
The following packages will be REMOVED:
psa-spamassassin*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up sa-compile (3.4.2-0ubuntu0.18.04.5) ...
Running sa-compile (may take a long time)
Apr 4 12:25:17.082 [16036] info: config: invalid head test HS_HEADER_248: (To|From|Cc|Reply-To) =~ /^.*Investor Alert/
Apr 4 12:25:17.082 [16036] info: config: invalid head test HS_HEADER_249: (To|From|Cc|Reply-To) =~ /^.*friend\@(public\.com|localhost\.net)/
Apr 4 12:25:17.082 [16036] info: config: invalid head test HS_HEADER_250: (To|From|Cc|Reply-To) =~ /^.*[ <]d+\@(onramp|prodigy|uu)\.net/
Apr 4 12:25:17.083 [16036] info: config: invalid head test HS_HEADER_251: (To|From|Cc|Reply-To) =~ /^.*\@funstuff2000\.net/
Apr 4 12:25:17.083 [16036] info: config: invalid head test HS_HEADER_252: (To|From|Cc|Reply-To) =~ /^.*(infowatch\.net|nakedmaild?\.com)/
Apr 4 12:25:17.083 [16036] info: config: invalid head test HS_HEADER_253: (To|From|Cc|Reply-To) =~ /^.*customer\@aol/
Apr 4 12:25:17.084 [16036] info: config: invalid head test HS_HEADER_257: (Received|Message-Id|X-(Mailer|Sender)) =~ /^.* (E-Broadcaster|Emailer Platinum|eMarksman|Extractor|e-Merge|from stealth[^.]|Global Messenger|GroupMaster|Mailcast|MailKing|Match10|MassE-Mail|massmail.pl|News Breaker|Powermailer|Quick Shot|Ready Aim Fire|WindoZ|WorldMerge|Yourdora|SEKOFOXM|Blat v3)/
Apr 4 12:25:17.085 [16036] info: config: invalid head test HS_HEADER_261: (To|From|Cc|Reply-To) =~ /^.*\@sexyfun\.net/
sa-compile: not compiling; 'spamassassin --lint' check failed!
dpkg: error processing package sa-compile (--configure):
installed sa-compile package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)
Bootstrapper has finished action (exec time: 0 sec.): parent_name='PLESK_18_0_34', 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; :'', m_arch='', output: ~empty
[2021-04-04 12:25:54.402567] Überprüfung der Komponenten und Produkte wird gestartet...
[2021-04-04 12:25:54.402630] FileFetcher: get file (~empty)/report-update
[2021-04-04 12:25:54.402742] Datei wird heruntergeladen report-update: 0%
[2021-04-04 12:25:54.507589] Datei wird heruntergeladen report-update: 100% fertig.
[2021-04-04 12:25:54.511168] FileFetcher: get file (~empty)/pool/PSA_18.0.34_5691/examiners/py_launcher.sh
[2021-04-04 12:25:54.511237] Datei wird heruntergeladen pool/PSA_18.0.34_5691/examiners/py_launcher.sh: 0%
[2021-04-04 12:25:54.523741] Datei wird heruntergeladen pool/PSA_18.0.34_5691/examiners/py_launcher.sh: 100% fertig.
[2021-04-04 12:25:54.943708] Examination executed ["/root/parallels/pool/PSA_18.0.34_5691/examiners/py_launcher.sh" "/root/parallels/report-update" --op update --rc 1 --start-flag /var/lock/plesk-report-update.flag --to=18.0.34.2 --from=18.0.34] with code 0
Output:
~empty
Error:
~empty
[2021-04-04 12:25:54.944097] Execute command /opt/psa/admin/bin/send-error-report install --version 18.0.34
[2021-04-04 12:25:54.945450] Warning: Failed to attach to cgroup /sys/fs/cgroup/systemd/user/root/tasks, installer might be unexpectedly killed later by the system
[2021-04-04 12:25:54.947838] Error: Ein Fehler ist aufgetreten bei dem Versuch, Pakete zu installieren.
Achtung! Ihre Software ist vielleicht nicht betriebsbereit.
Rufen Sie Plesk Help Center auf, um eine Lösung für dieses Problem zu finden.
 
Have you created any custom SpamAssassin rules? It appears that malformed SpamAssassin configuration file is disturbing the process.
 
Have you created any custom SpamAssassin rules? It appears that malformed SpamAssassin configuration file is disturbing the process.
No, I didn't. I have installed the free version of Plesk E-Mail security including amavis for half a year without problems and 3 days ago I got the dpkg returned an error code 1 message every day up to now.
here comes the configuration:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
###########################################################################

# Add *****SPAM***** to the Subject header of spam e-mails
#
# rewrite_header Subject *****SPAM*****


# Save spam messages as a message/rfc822 MIME attachment instead of
# modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1


# Set which networks or hosts are considered 'trusted' by your mail
# server (i.e. not spammers)
#
# trusted_networks 212.17.35.


# Set file-locking method (flock is not safe over NFS, but is faster)
#
lock_method flock


# Set the threshold at which a message is considered spam (default: 5.0)
#


# Use Bayesian classifier (default: 1)
#
#use_bayes 1


# Bayesian classifier auto-learning (default: 1)
#
#bayes_auto_learn 1


# Set headers which may provide inappropriate cues to the Bayesian
# classifier
#
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status


# Whether to decode non- UTF-8 and non-ASCII textual parts and recode
# them to UTF-8 before the text is given over to rules processing.
#
normalize_charset 1

# Some shortcircuiting, if the plugin is enabled
#
ifplugin Mail::SpamAssassin::plugin::Shortcircuit
#
# default: strongly-whitelisted mails are *really* whitelisted now, if the
# shortcircuiting plugin is active, causing early exit to save CPU load.
# Uncomment to turn this on
#
shortcircuit USER_IN_WHITELIST on
shortcircuit USER_IN_DEF_WHITELIST on
shortcircuit USER_IN_ALL_SPAM_TO on
shortcircuit SUBJECT_IN_WHITELIST on

# the opposite; blacklisted mails can also save CPU
#
shortcircuit USER_IN_BLACKLIST on
shortcircuit USER_IN_BLACKLIST_TO on
shortcircuit SUBJECT_IN_BLACKLIST on

# if you have taken the time to correctly specify your "trusted_networks",
# this is another good way to save CPU
#
# shortcircuit ALL_TRUSTED on

# and a well-trained bayes DB can save running rules, too
#
shortcircuit BAYES_99 spam
shortcircuit BAYES_00 ham

endif # Mail::SpamAssassin::plugin::Shortcircuit







# Start of Plesk Email Security configuration
use_bayes 1
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam 0.1
bayes_auto_learn_threshold_spam 5.0
bayes_auto_expire 1
bayes_min_ham_num 10
bayes_min_spam_num 10
bayes_expiry_max_db_size 500000
bayes_sql_override_username amavis
bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn DBI:mysql:emailsecurity:127.0.0.1:3306
bayes_sql_username XXX
bayes_sql_password YYY
use_auto_whitelist 1
auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn DBI:mysql:emailsecurity:localhost
user_awl_sql_username XXX
user_awl_sql_password YYY
score DNS_FROM_AHBL_RHSBL 0
# End of Plesk Email Security configuration
rewrite_header subject *****SPAM*****_SCORE_
required_score 5.0
whitelist_from
 
Last edited:
The key segment of the error message is the "'spamassassin --lint' check failed!" line. If you run this on your system (# spamassassin --lint), it will throw errors. Normally, it should not throw errors.

There are probably .cf files in /etc/mail/spamassassin that should not be there. Normally, there should only be one .cf file, local.cf, and that should only have a very short content with very few basic configurations. Can you identify other .cf files in /etc/mail/spamassassin or an include in the local.cf that points to other .cf files?
 
Back
Top