Where to add SpamAssassin Rules?
What is the proper process for adding new scoring into cPanels' implementation of SpamAssassin. Its not clear which configuration files are actually used.
If I look in /etc/mail/spamassassin/CPANEL.cf I see this:
This is exactly what I want to add, but for the .date top-level domain. But I'm not sure which file to add it to .. /etc/mail/spamassassin/local.cf does not seem to be the same format as the CPANEL.cf - and I see some items in there that say they are auto-generated by cPanel which makes me believe there is another location.
header CPANEL_XYZ From =~ /\@.*?\.xyz/i
describe CPANEL_XYZ .XYZ domain mostly used by spammers
score CPANEL_XYZ 2.1
This is exactly what I want to add, but for the .date top-level domain. But I'm not sure which file to add it to .. /etc/mail/spamassassin/local.cf does not seem to be the same format as the CPANEL.cf - and I see some items in there that say they are auto-generated by cPanel which makes me believe there is another location.
# Emails from the .date TLD are automatically suspicious
header CUSTTLD_DATE From =~ /\@.*?\.date/i
describe CUSTTLD_DATE .DATE top-level domain mostly used by spammers
score CUSTTLD_DATE 2.1
-
I ran /usr/local/cpanel/3rdparty/bin/spamassassin -D < spammsg.txt In the debug messages I see two things which tell me that local.cf *IS* the correct place to add custom rules, and spamassassin is picking it up. First, it shows: config: read file /etc/mail/spamassassin/local.cf Which verifies its local.cf file is correct.... And in the Content analysis details it now shows my custom rule: 2.1 CUSTTLD_DATE .date domain mostly used by spammers So - yay .. I've successfully added a header rule. 0 -
Hi @DWardCA You can make customizations to the spamassassin global configuration by modifying /etc/mail/spamassassin/local.cf As you just found! Thanks for updating, you beat me to it! 0
Please sign in to leave a comment.
Comments
2 comments