for a while now I am trying to install Spamassassin properly as root user with ‘apt install spamassassin spamc’. The installation fails when it runs sa-compile producing following output:
Setting up sa-compile (3.4.4-1ubuntu1) ...
Running sa-compile (may take a long time)
Warning: Fake start-stop-daemon called, doing nothing.
chmod: cannot access '/var/lib/spamassassin/compiled': No such file or directory
dpkg: error processing package sa-compile (--configure):
installed sa-compile package post-installation script subprocess returned error exit status
After installation I can run sa-update and sa-compile manually and Spamassassin will start properly, but when installing spamass-milter or amavis the directory ‘compiled’ is removed and the same error occurs again. I tried changing the ownership of the directory to debian-spamd, also recreated the directory manually before running the installation. Even reinstalling Ubuntu 20.04 with the admin panel of my hoster (ip-projects) leads to exactly the same behavior. Building and installing Spamassassin from source works, but I got stuck on setting up the whole thing with spamass-milter (also built from source). This approach is also worse for maintainability.
At first (weeks ago) I tried to install iRedMail as all-in-one mail solution. The installation got stuck at exactly the same point. I think the ‘version’ of Ubuntu 20.04 my hoster provides has some unusual configuration.
I assume it has something todo with privileges but I really have no clue where to start. I would appreciate some help.
UPDATE:
As Yannis suggested I ran the given commands. At first I got the following error:
dpkg: unrecoverable fatal error, aborting:
unknown system user 'amavis' in statoverride file; the system user got removed
I edited the statoverride file and removed the entries for user ‘amavis’ and removed the folders the amavis user should operate on (don’t know why they were still there since I removed amavis yesterday with apt). Afterwards the command was successful.
dpkg-reconfigure -a gives me unknown option ‘a’. As well as the last command.
Afterwards I restarted the server and tried to reinstall Spamassassin but the error is the same.
When this seems an apt problem I ask myself why other packages like apache2, postfix or dovecot have installed flawlessly?
Regards
Mario
2
Answers
The problem could be solved! The source of the problem was a damaged start-stop-daemon. Replacing the daemon in sbin/ solved the issue. The broken daemon was a bug in the distributed Ubuntu 20.04 installation at my hosters servers. Since the issue was solved by the support team of my hoster I am not able to go in more details here.
Regards Mario
This seems like apt’s problem (not SpamAssasin’s). Please follow the general steps for solving this type of problems and let us know if they helped.