Symptoms
There are occasions where spamd fails to start with the following error:
# systemctl status spamd
...
server.cpanel.tld systemd[1]: Starting Apache SpamAssassin™ deferral daemon...
server.cpanel.tld spamd[20813]: config: no rules were found! Do you need to run 'sa-update'?
However, attempting to run the recommended sa-update command to resolve this results in the following error:
# /usr/local/cpanel/3rdparty/bin/sa-update
error: no mirror data available for channel updates.spamassassin.org
channel 'updates.spamassassin.org': MIRRORED.BY file contents were missing, channel failed
Cause
SpamAssassin is unable to start due to rules being missing; meanwhile, the update-sa command is unable to complete its tasks to repair the SpamAssassin ruleset as a critical file named "MIRROR.BY" is missing. This file is typically automatically downloaded by update-sa if missing, however, it is possible to become rate-limited by SpamAssassin's update mirrors causing this file to be unavailable from the mirrors during the previous update.
Resolution
update-sa needs this file to be able to generate the missing ruleset, and thus will need to be manually downloaded in order to resolve this.
- Access the server via SSH or via the Terminal in WHM.
Navigate to the SpamAssassin versioned folder using the following command:
# cd /var/lib/spamassassin/$(rpm -q --queryformat "%{VERSION}" `rpm -qa | grep -Ei "cpanel-.*-Mail-SpamAssassin"`;)/updates_spamassassin_org
Move aside any current
MIRRORED.BYfile, if any:# mv -v MIRRORED.BY{,.cpbak}
Download the updated
MIRRORED.BYfile to this location:# wget https://spamassassin.apache.org/updates/MIRRORED.BY
Note: If you receive an error when attempting to perform the above, it indicates that you are rate-limited by SpamAssassin servers. The file will need to be downloaded using a different device, and then manually copied to this server.
Run a SpamAssassin update:
# /usr/local/cpanel/3rdparty/bin/sa-update -vvv
Finally, restart the SpamAssassin service:
# /scripts/restartsrv_spamd
Comments
0 comments
Article is closed for comments.