YES! Spamassassin comes with several programs for generating spam
scores. It can also be configured to check with third-party spam
analysis tools like Razor2, blacklists, etc. It can also be trained to
identify spam based on whatever messages you tell it are spam.
Spamassassin completely rocks when it comes to identifying spam as long
as it's configured properly.

To do this, you could run the following command in CFEXECUTE:

/path/to/spamassassin < mailmessage.txt

and then save the results. The results themselves will look something
like this:

------------
# spamassassin < test.txt
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on
someserver.viviotech.net
X-Spam-Level: *****
X-Spam-Status: Yes, score=5.7 required=5.0
tests=EMPTY_MESSAGE,MISSING_HB_SEP,
        MISSING_HEADERS,MISSING_SUBJECT,NO_RECEIVED,NO_RELAYS,TO_CC_NONE
        autolearn=no version=3.1.0
X-Spam-Report:
        * -0.0 NO_RELAYS Informational: message was not relayed via SMTP
        *  2.5 MISSING_HB_SEP Missing blank line between message header
and body
        *  0.2 MISSING_HEADERS Missing To: header
        *  1.3 MISSING_SUBJECT Missing Subject: header
        *  1.5 EMPTY_MESSAGE Message appears to be empty with no
Subject: text
        * -0.0 NO_RECEIVED Informational: message has no Received headers
        *  0.1 TO_CC_NONE No To: or Cc: header
test
Subject: [SPAM]
X-Spam-Prev-Subject: (nonexistent)
------------

In this case, my "test.txt file just contained the word "test" in it, so
it got marked as spam. Neat huh?

You could parse those results to get the actual Spam score.

Hope this helps!

Warm regards,
Jordan Michaels
Vivio Technologies


Mike Chabot wrote:
> Can you do that? I have zero experience with SpamAssassin.
> 
> -Mike Chabot
> 
> On 11/8/06, Russ <[EMAIL PROTECTED]> wrote:
> 
>>I'm planning to do this sometime in the future... Why not just install
>>SpamAssassin and cfexecute it?
>>
>>Russ
>>
>>
>>>-----Original Message-----
>>>From: Mike Chabot [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, November 08, 2006 2:19 PM
>>>To: CF-Talk
>>>Subject: Generating a spam score
>>>
>>>I am looking to program a feature that can pass E-mail text through a
>>>rule-based spam filter, notably SpamAssassin, to generate a spam score
>>>before the E-mail is mailed to many people using ColdFusion MX 7. If the
>>>score is above a certain level, the person would have the ability to tweak
>>>the E-mail to try to lower the spam score before sending it out. Has
>>>anyone
>>>done anything like this or does anyone know of existing code or a Web
>>>service that would help with this?
>>>
>>>Thank you,
>>>Mike Chabot


-- 
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Blue Dragon Alliance Member
[EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259782
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to