spamassassin is a great and complex mail scanner.
It can be customized very easily by modifying the ~/.spamassassin/user_prefs file.
It is very rarely necessary to write your own rule.
You can easily alter the score that each test adds to the total to determine if the message is spam. Adding the line:
score ONLINE_PHARMACY 3.7
would cause the ONLINE_PHARMACY test to add 3.7 to the score instead of the default 0.0 .
or
adding the line:
score MISSING_DATE 3.7
would put a greater weight if the headers of an email did not contain the required date from the default of 0.0 .
It IS helpful to adjust :
report_contact Postmaster at example.com
report_hostname Exmple.com
Unfortunately, the /etc/exim.conf script seems to simulate some of these commands and does not honor the add_header commands from your prefs file.
This is an excerpt from the check_message: section
534: warn
535: condition = ${if eq {${acl_m0}}{1}{1}{0}}
536: spam = ${acl_m1}/defer_ok
537: log_message = "SpamAssassin as ${acl_m1} detected message as spam ($spam_score)"
538: add_header = X-Spam-Subject: ***SPAM*** $h_subject
539: add_header = X-Spam-Status: Yes, score=$spam_score
540: add_header = X-Spam-Score: $spam_score_int
541: add_header = X-Spam-Bar: $spam_bar
542: add_header = X-Spam-Report: $spam_report
543: add_header = X-Spam-Flag: YES
544: set acl_m2 = 1
546: warn
547: condition = ${if eq {$spam_score_int}{}{0}{${if <= {${spam_score_int}}{8000}{${if >= {${spam_score_int}}{50}{${perl{store_spam}{$sender_host_address}{$spam_score}}}{0}}}{0}}}}
549: warn
550: condition = ${if eq {${acl_m0}}{1}{${if eq {${acl_m2}}{1}{0}{1}}}{0}}
551: add_header = X-Spam-Status: No, score=$spam_score
552: add_header = X-Spam-Score: $spam_score_int
553: add_header = X-Spam-Bar: $spam_bar
554: add_header = X-Spam-Flag: NO
555: log_message = "SpamAssassin as ${acl_m1} detected message as NOT spam ($spam_score)"
notice line 542 includes:
X-Spam-Report: $spam_report
when the email is evaluated as spam. This details the tests and scores.
This line is missing after X-Spam-Bar line if the email is not considered spam (called ham)
What this means is that when you receive an email that was not detected as spam you have no way of determining what tests produces what scores. You cannot adjust any of the scores to prevent that spam in the future.
It has been said that adding this report to every email not considered spam would detrimentally increase the load on the email system because the $spam_report is rather wordy.
The alternate brief form which should be added to X-Spam-Status is tests=$testsscores.
Please vote to request this change be made.
Thank you.
Feel free to send me a private message with questions or comments.
I have rewritten the documentation (hopefully more clearly) here:
Real-World-Systems.com/docs/spamassassinConf
The home page for spamassassin is at
spamassassin.apache.org



LinkBack URL
About LinkBacks
Reply With Quote





