[SOLVED] Fixing missing SA rule descriptions

General eFa discussion
Post Reply
ovizii
Posts: 463
Joined: 11 May 2016 08:08

[SOLVED] Fixing missing SA rule descriptions

Post by ovizii »

Sometimes, I look at the score of emails via mailwatch and the description is missing. So I created a file /etc/mail/spamassassin/my.own.descritions.cf and added the missing descriptions:

Code: Select all

describe        LOTS_OF_MONEY                   a lot of money mentioned
describe        RCVD_IN_BRBL_LASTEXT            listed in the Barracuda Reputation Block List (BRBL)
describe	     FSL_BULK_SIG			 			 Bulk signature with no Unsubscribe
describe        KAM_VERY_BLACK_DBL              Email that hits both URIBL Black and Spamhaus DBL
And sometimes that helps showing a description in mailwatch, sometimes not.

I now discovered that inside my DB called: mailscanner there is a table called: sa_rules containing rules and descriptions. If I add my rules which miss descriptions in here and add a description, it immediately shows in mailwatch too.

Can someone explain how this is all related and why my first method via .cf file didn't work?

And what happens when I go to mailwatch => Tools/Links => Update SpamAssassin Rule Descriptions ?
Last edited by ovizii on 23 May 2016 06:48, edited 1 time in total.
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

Re: Fixing missing SA rule descriptions

Post by pdwalker »

Yes, I noticed this problem before. See here: viewtopic.php?f=13&t=1560&p=5938#p5938

It's also been fixed in the latest head branch of the mailwatch project.

When you "Update Spamassassin Rule Descriptions", the rule descriptions are collected from the spamassassin rulesets, and then inserted/updated into the table you found. This is then used by the mailwatch UI. See the post above for where it actually happens and how it works.

As for your my.own.descritions.cf, I assume the file was not included in your spamassassin configuration as there was no instructions to include it. I'm sure that if you put that information into local.cf instead, and then "Update Spamassassin Rule Descriptions" that your custom descriptions will turn up.

It did for me.
ovizii
Posts: 463
Joined: 11 May 2016 08:08

Re: Fixing missing SA rule descriptions

Post by ovizii »

Thanks, I applied your fix and will check how it goes.

The implied question was if the SA update will/might overwrite everything in that DB or only when there actually is a new description for an existing rule?

I'm quite new to this but I am pretty sure every .cf file inside /etc/mail/spamassassin is automatically loaded and I can also see with a sa --lint that its being read. Anyway, your fix AND me adding the last missing descriptions into that table will fix all of this :-)
Last edited by ovizii on 23 May 2016 07:04, edited 1 time in total.
User avatar
pdwalker
Posts: 1583
Joined: 18 Mar 2015 09:16

Re: [SOLVED] Fixing missing SA rule descriptions

Post by pdwalker »

Correct, old entries remain forever. Modifed entries are updated and new entries are inserted immediately.

I'm pretty sure the rules are automatically loaded, but I never bothered to find out. I know they can be updated safely, and that's all I cared about.
Post Reply