Spamassassin Bug: GPG validation failed!

Old and annoying bug…ended up in reimporting the GPG-Key

/etc/cron.daily/spamassassin:
gpg: WARNING: unsafe ownership on homedir `/var/lib/spamassassin/sa-update-keys'
gpg: failed to create temporary file `/var/lib/spamassassin/sa-update-keys/.#lk0x97a7930.strasbourg.8237': Permission denied
gpg: keyblock resource `/var/lib/spamassassin/sa-update-keys/secring.gpg': general error
gpg: failed to create temporary file `/var/lib/spamassassin/sa-update-keys/.#lk0x97a7930.strasbourg.8237': Permission denied
gpg: keyblock resource `/var/lib/spamassassin/sa-update-keys/pubring.gpg': general error
gpg: no writable keyring found: eof
gpg: error reading `/usr/share/spamassassin/sa-update-pubkey.txt': general error
gpg: import from `/usr/share/spamassassin/sa-update-pubkey.txt' failed: general error
gpg: WARNING: unsafe ownership on homedir `/var/lib/spamassassin/sa-update-keys'
error: GPG validation failed!
The update downloaded successfully, but it was not signed with a trusted GPG
key.  Instead, it was signed with the following keys:

    24F434CE 

Perhaps you need to import the channel's GPG key?  For example:

    wget http://spamassassin.apache.org/updates/GPG.KEY
    sa-update --import GPG.KEY

channel: GPG validation failed, channel failed
sa-update failed for unknown reasons

Solution: ( isnt really pretty but it should do the job )

sa-update -v 
wget http://spamassassin.apache.org/updates/GPG.KEY
sa-update --import GPG.KEY
chown -R spamd:debian-spamd /var/lib/spamassassin/
chmod -R o-rwx /var/lib/spamassassin/sa-update-keys/
sa-update -D


I think you dont want to wait for 3600 seconds so we have to edit /etc/cron.daily/spamassassin at line 53

RANGE=3600

to

RANGE=10

Finally,

cd /etc/cron.daily
./spamassassin

It should work now without any problems…

Related:

~ Alex


7 thoughts on “Spamassassin Bug: GPG validation failed!

  1. Hi Alex,

    thanks for the instructions. Unfortunately I get the following error when importing the key:
    sa-update –import GPG.KEY
    gpg: Schl├╝sselblockhilfsmittel`/etc/spamassassin/sa-update-keys/secring.gpg’: Fehler beim ├ľffnen der Datei
    gpg: Schl├╝sselblockhilfsmittel`/etc/spamassassin/sa-update-keys/pubring.gpg’: Fehler beim ├ľffnen der Datei
    gpg: kein schreibbarer Schl├╝sselbund gefunden: eof
    gpg: Fehler beim Lesen von `GPG.KEY’: Allgemeiner Fehler
    gpg: import from `GPG.KEY’ failed: Allgemeiner Fehler

    I downloaded the key first via wget – worked flawlessly.

    Any idea?

    Cheers!

  2. Hi,
    Thanks for the post, after followed it I still got some errors I just change a little your procedure
    chown -R spamd:debian-spamd /var/lib/spamassassin/
    chmod -R o-rwx /var/lib/spamassassin/sa-update-keys/

    after I have no more errors.

    Bye

Leave a Reply

Your email address will not be published. Required fields are marked *