Home Page

SpamWeed Filter Extesions (SFX for short)

SpamWeed is a powerful and highly extensible spam filter / email classifier. The SFX is an interface where users can write their own filtering rules.

SFX Description

SFX uses the "Object Pascal" language. You need to know pascal in order to write your own SFX. If you are not a programmer, just rely on us to provide SFX module for you when necessary. SFX offers the following APIs:

function GetParam(key: string): string;

This API let you obtain required information inside your SFX code. Retrievable information are:

    KeyMeaning
    Charsetall character sets that are used in the email
    Identities possible spam identities appeard in the email. Spam identities include email address, domain names (urls) and phone numbers.
    FromNamename of the sender
    FromAddressaddress of the sender
    ToNamenames of the recipients
    ToAddressaddresses of the recipients
    ReceivedTimetime when the email is received
    SentTimetime when the email is sent
    Subjectsubject of the email
    Bodybody of the email (decoded)
    Attachmentslist of attached file names
    otherany tag appear in the email header is retrievable, e.g. "X-Mailer"

procedure SetResult(res: Integer);

This API let your SFX code to notify the filter its conclusion made on the processed email:

    Result CodeMeaning
    0SFX cannot determine the email is spam or not
    1SFX determine that the email is spam
    2SFX determine that the email is not spam

procedure SetCategory(cat: string);

This API set final destination of an email. It is only meaningful if your SFX code decide that the processed email is not spam.

Sample Code

Suppose, you run a business. Your business has a reseller who often send you email about orders and customer support requests. You can put the address "john@myreseller.com" to your allow list, but you would like to distinguish between order emails from this reseller and customer support requests from him so that you can deal with these different emails with different priority.

Based on previous communications, you noticed that all order emails from John contain the word "order" and "quantity" and support requests do not contain these 2 words. You want to classify order emails to folder "Orders" and other emails to folder "Supports".

    program sfx;
    var
      Res : Integer;
      Cat, Body : string;
    begin
      Res := 0;
      if LowerCase(GetParam('FromAddress')) = 'john@myreseller.com' then
      begin
        Res := 2;
        Body := LowerCase(GetParam('Body'));
        if (Pos('order', Body) > 0) and (Pos('quantity', Body) > 0) then
          Cat := 'Orders'
        else
          Cat := 'Supports';
      end;
      SetResult(Res);
      SetCategory(Cat);
    end.

Still have questions?

If you still have questions on this topic, please do not hesitate to contact us: support@spamweed.com

« back

Testimonial

I am very impressed with the ability of SpamWeed and have nothing but high praise for it and ofcourse the company behind it.

William Lee
WebStar Creations, UK


SpamWeed was filtering all the "shit" I am pleased to get form various US and other sites.

Drs. Herman A J Gijzemijter

more testimonials
Download  |  Buy Now  |  Services  |  Product Tour  |  Documents  |  Press  |  Affiliate
Copyright © 2006-2008 Shuttle Technologies Ltd., Privacy Policy  |  Spam Filter Site Map