Community Forums
Connect with us on LinkedIn

View Poll Results: Request exim.conf be changed to include $TESTSSCORES to X-Spam-Status

Voters
8. You may not vote on this poll
  • definitely not.

    0 0%
  • absolutely yes.

    7 87.50%
  • don't care

    0 0%
  • What is he talking about?

    1 12.50%
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Feb 2006
    Location
    NJ, USA
    Posts
    39

    Default spam gets through, exim.conf overrides add header poorly

    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
    Last edited by DGermancp; 06-14-2010 at 06:20 PM. Reason: wrong template word

  2. #2
    Member
    Join Date
    Jun 2005
    Posts
    77

    Default

    I tried manually adding tests=$testsscores to X-Spam-Status for HAM

    like so:
    add_header = X-Spam-Status: Yes, score=$spam_score, tests=$testsscores

    but this is an undefined variable and stops mail from routing.

Similar Threads & Tags
Similar threads

  1. Exim, Spamassassin and X-Spam-Status Header
    By andren in forum E-mail Discussions
    Replies: 4
    Last Post: 04-07-2011, 10:18 PM
  2. Exim.conf Spam Header Rewriter Error?
    By lkraven in forum E-mail Discussions
    Replies: 3
    Last Post: 06-29-2007, 08:49 AM
  3. How to reduce SPAM through exim.conf ?
    By eurorocco in forum cPanel and WHM Discussions
    Replies: 36
    Last Post: 04-07-2005, 04:07 PM
  4. Exim Filter Doesn't Read Spam Assassin Header
    By TomA in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-15-2003, 09:41 PM
  5. How to add X-AntiAbuse header?
    By XPerties in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-26-2003, 05:20 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube