spamassassin is not configured yet

When attempting "apt update && apt upgrade" I am faced with the following error:

Hit:1 http://software.virtualmin.com/vm/6/apt virtualmin-stretch InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease                                                                
Hit:3 http://software.virtualmin.com/vm/6/apt virtualmin-universal InRelease                                        
Hit:4 http://deb.debian.org/debian stretch-updates InRelease                                            
Hit:5 http://deb.debian.org/debian-security stretch/updates InRelease                                    
Hit:6 http://deb.debian.org/debian stretch Release                      
Hit:8 http://ftp.debian.org/debian stretch-backports InRelease          
Reading package lists... Done
Building dependency tree      
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up spamassassin (3.4.2-1~deb9u1) ...
dpkg: error processing package spamassassin (--configure):
subprocess installed post-installation script returned error exit status 1
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
Errors were encountered while processing:
spamassassin
sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried sa-update, sa-compile, restarting spamassassin, rebooting, purging spamassassin and reinstalling... but I can't seem to get by this. Any help would be appreciated. Thx!

Status: 
Closed (fixed)

Comments

env DPKG_MAINTSCRIPT_PACKAGE=spamassassin DPKG_MAINTSCRIPT_NAME=postinst sh -ex /var/lib/dpkg/info/spamassassin.postinst configure ; echo $? returns the following:

+ set -e
+ [ configure = triggered ]
+ [ configure = configure ]
+ getent passwd debian-spamd
+ stat -c %U /var/lib/spamassassin
+ OWNER=debian-spamd
+ stat -c %G /var/lib/spamassassin
+ GROUP=debian-spamd
+ dpkg-statoverride --list /var/lib/spamassassin/3.004002 /var/lib/spamassassin/compiled /var/lib/spamassassin/sa-update-keys
+ [ debian-spamd:debian-spamd != debian-spamd:debian-spamd ]
+ test -d /var/lib/spamassassin/sa-update-keys
+ command -v gpg
+ su - debian-spamd -c sa-update          --gpghomedir /var/lib/spamassassin/sa-update-keys          --import /usr/share/spamassassin/GPG.KEY
1

Appears to be some issue with the GPG keys not updating?

Thanks for the quick reply -- here's the output of "grep spamd /etc/passwd"

debian-spamd:x:117:121::/var/lib/spamassassin:/bin/false

I think you might be right... I recently "locked down all shell access"... so I've changed the shell to /bin/bash, corrected the directory ownership over in /var/lib/spamassassin and all is well.

You can close this ticket. Thanks again!

Excellent, I'm glad you sorted it out!

I'll go ahead and mark this as closed, but feel free to let us know if you have any additional questions.