Skip to main content

Command to test message score with spamassassin

Comments

3 comments

  • cPanelLauren
    Can you explain exactly what you want to test for outgoing spam? This functions a bit differently than SpamAssassin for inbound mail. I also don't understand what the significance of this is: grep -R score /var/lib/spamassassin/* | less ........ ........ /var/lib/spamassassin/3.004001/updates_spamassassin_org/20_pdfinfo.cf:score GMD_PDF_ENCRYPTED 0.60 /var/lib/spamassassin/3.004001/updates_spamassassin_org/20_pdfinfo.cf:score GMD_PDF_EMPTY_BODY 0.25 /var/lib/spamassassin/3.004001/updates_spamassassin_org/20_pdfinfo.cf:#score GMD_PDF_STOX_M1 3.25 /var/lib/spamassassin/3.004001/updates_spamassassin_org/20_pdfinfo.cf:#score GMD_PDF_STOX_M2 2.95
    All this is getting is the score weight for rules in the SpamAssassin configuration.
    0
  • MedMax
    Hi, What we need is to get some thing like this for such email: "this is a test message to check the rules used by spamassassin to flag a message as spam or not" pts rule description ---- ---------------------- -------------------------------------------------- 1.0 MISSING_HEADERS Missing To: header -0.0 NO_RELAYS Informational: message was not relayed via SMTP 1.0 MISSING_FROM Missing From: header -0.0 NO_RECEIVED Informational: message has no Received headers 0.5 MISSING_MID Missing Message-Id: header 1.8 MISSING_SUBJECT Missing Subject: header 1.4 MISSING_DATE Missing Date: header 2.3 EMPTY_MESSAGE Message appears to have no textual parts and no Subject: text 0.0 NO_HEADERS_MESSAGE Message appears to be missing most RFC-822 headers ###################################################### At this point SA flagged this sample msg as 8.0 score If ever we choose in exim configuration to use SA score to reject OUTGOING messages of let's say 4 SA score, we no longer have any detail on the mail syslogs of the subject/body....etc details. This is very important, as on shared servers, we have to provide a proof to our clients that there account has been spamming: They could not understand logs, ip, but spam subjects (at least) + SA rules + etc Such details are very important to any hoster, because we could then, set the right score depending on our specifications. For the second question, it's fixed. We found the exact version we use just with this command: /usr/local/cpanel/3rdparty/bin/spamassassin --version We have, of course, this config on exim log_selector = +all
    0
  • cPanelLauren
    What you're looking for isn't available with this feature at this time. Right now the header addition is just as follows: X-OutGoing-Spam-Status: No, score=2.1
    You're looking for the scoring breakdown, which I agree would be useful This specific header as far as I understand it is added here: /usr/local/cpanel/etc/exim/acls/ACL_OUTGOING_NOTSMTP_CHECKALL_BLOCK/outgoing_spam_scan: add_header = X-OutGoing-Spam-Status: No, score=$spam_score /usr/local/cpanel/etc/exim/acls/ACL_OUTGOING_NOTSMTP_CHECKALL_BLOCK/outgoing_spam_scan_over_int: add_header = X-OutGoing-Spam-Status: No, score=$spam_score /usr/local/cpanel/etc/exim/acls/ACL_OUTGOING_SMTP_CHECKALL_BLOCK/outgoing_spam_scan: add_header = X-OutGoing-Spam-Status: No, score=$spam_score /usr/local/cpanel/etc/exim/acls/ACL_OUTGOING_SMTP_CHECKALL_BLOCK/outgoing_spam_scan_over_int: add_header = X-OutGoing-Spam-Status: No, score=$spam_score
    But I can't guarantee that adding further customizations here wouldn't be overwritten if you chose to do so. I'd really like to encourage you to open a feature request for this, if you do choose to you can do so using the link in my signature. Once it's open please update this thread with the link so that others may vote for it as well. Thanks!
    0

Please sign in to leave a comment.