T
Thufir
Guest
I've been trying to write a few custom spamassassin rules, and everything went great up to the point that an email is actually scanned and marked.
I added one as a test, based on an existing email. When I run a test against the email using spamassassin -t <email file name> it shows a high score.
Content analysis details: (17.5 points, 7.0 required)
My custom rule added 20 points which is why the score of 17+. Yes I know it's high, I'm only doing this as a test. It will be set normally once I know this rule actually will work and be used.
However, when I run the same email, this time with rule checking (spamassassin --lint -D <email file name>) it shows a much lower score.
[18251] dbg: check: is spam? score=4.205 required=7
The debug information does not show that the rule matched anything at all....which makes no sense based on the other test results using -t.
This is also true when I send a new email from an outside email that should match the rule .. it shows even LOWER than the --lint results:
X-Spam-Status: No, score=2.1 required=6.0 tests=BAYES_99,HTML_IMAGE_RATIO_02, HTML_MESSAGE, HTML_TITLE_SUBJ_DIFF, MIME_HTML_ONLY, RAZOR2_CF_RANGE_51_100, RAZOR2_CF_RANGE_E8_51_100, RAZOR2_CHECK, RCVD_IN_DNSWL_HI, SPF_PASS, URIBL_RHS_DOB autolearn=no version=3.2.5
The custom rule file is in a new file in /etc/mail/spamassassin. I've also tried putting it directly into local.cf
If I purposely make a 'mistake' in the custom rules file, I do see the warning/error show using --lint. So I know the file's being loaded. It just doesn't seem to actually run the rule and have an effect.
I've tried a few varied tests using different rules and emails, and it all ends up working the same way on each try.
Would any Plesk settings affect this, or am I just missing something?
If any other information would be needed to help get this working, just let me know.
**EDIT***
For additional information, here's the versions of packages I'm using:
- Redhat Enterprise 5.7
- Spamassassin 3.2.5
I added one as a test, based on an existing email. When I run a test against the email using spamassassin -t <email file name> it shows a high score.
Content analysis details: (17.5 points, 7.0 required)
My custom rule added 20 points which is why the score of 17+. Yes I know it's high, I'm only doing this as a test. It will be set normally once I know this rule actually will work and be used.
However, when I run the same email, this time with rule checking (spamassassin --lint -D <email file name>) it shows a much lower score.
[18251] dbg: check: is spam? score=4.205 required=7
The debug information does not show that the rule matched anything at all....which makes no sense based on the other test results using -t.
This is also true when I send a new email from an outside email that should match the rule .. it shows even LOWER than the --lint results:
X-Spam-Status: No, score=2.1 required=6.0 tests=BAYES_99,HTML_IMAGE_RATIO_02, HTML_MESSAGE, HTML_TITLE_SUBJ_DIFF, MIME_HTML_ONLY, RAZOR2_CF_RANGE_51_100, RAZOR2_CF_RANGE_E8_51_100, RAZOR2_CHECK, RCVD_IN_DNSWL_HI, SPF_PASS, URIBL_RHS_DOB autolearn=no version=3.2.5
The custom rule file is in a new file in /etc/mail/spamassassin. I've also tried putting it directly into local.cf
If I purposely make a 'mistake' in the custom rules file, I do see the warning/error show using --lint. So I know the file's being loaded. It just doesn't seem to actually run the rule and have an effect.
I've tried a few varied tests using different rules and emails, and it all ends up working the same way on each try.
Would any Plesk settings affect this, or am I just missing something?
If any other information would be needed to help get this working, just let me know.
**EDIT***
For additional information, here's the versions of packages I'm using:
- Redhat Enterprise 5.7
- Spamassassin 3.2.5
Last edited by a moderator: