Error while updating / installing SpamAssassin Plugin

  • Hello,


    I updated the SpamAssassin Plugin today and ran into 2 errors:

    Code
    1. Setting up spamassassin (3.4.1-3) ...dpkg: error processing package spamassassin (--configure): subprocess installed post-installation script returned error exit status 1Errors were encountered while processing: spamassassin

    and

    Code
    1. Setting up sa-compile (3.4.1-3) ...
    2. Configuration file '/etc/spamassassin/sa-compile.pre', does not exist on system.
    3. Installing new config file as you requested.
    4. Running sa-compile (may take a long time)
    5. dpkg: error processing package sa-compile (--configure):
    6. subprocess installed post-installation script returned error exit status 1
    7. Errors were encountered while processing:
    8. sa-compile


    As it turned out the error was coming up due to insufficient login shell for user debian-spamd. I found the final hint here
    Adding -s /bin/sh to the postinstall files in /var/lib/dpkg/info (sa-compile.postinst -> line 10 and spamassassin.postinst -> line 35) fixed the issue for me.
    Perhaps this information helps someone running into the same issue.


    Regards Jörg

    (Ubuntu 16.04, i-MSCP 1.5.1, php-Fpm, Plugins: ClamAV, CronJobs, InstantSSH, LetsEncrypt, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, PolicydSPF, Postscreen, RecaptchaPMA, RoundcubePlugins, ServerDefaultPage, SpamAssassin, YubiKeyAuth)

  • @UncleJ


    That is due to the older versions of the SpamAssassin plugin in which the debian-spamd shell was changed from /bin/sh to /bin/false. By default, the spamassassin package create the user with /bin/sh as shell. Of course, I've reverted that in the latest version but this is done too late. Indeed, the problem occurs when upgrading from an older SpamAssasasin plugin version (when sa-compile package was not already installed). Well, I'll fix the issue in next version by changing the shell of the user prior running APT if it already exists.


    Thank for your report.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @UncleJ


    A fix has been added in our development branch. See:

    This fix will be part of next version.


    Thank you for your report.
    Thread closed.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206