[En-Nut-Discussion] GOODLUCK
Mikael Ejberg Pedersen
mikael at ejberg.dk
Wed Feb 5 21:45:45 CET 2003
On Wed, 05 Feb 2003 20:41:39 +0100, you wrote:
>Nice application you have.
>Are you considering to release the code, or at least make
>it a product? Seems to be a valuable tool these days.
The idea started as a mailchecker only. With some sort of LCD, I would
be able to check for new mails without having to turn on my PC.
Then one day I got really annoyed by a big bunch of spam, and then it
seemed like a natural extension for the mailchecker.
A real product it'll never be (not by me anyway). I'm way to busy
doing lots of other crazy stuff. And a real code-release.... naaah. It
too ugly, and if I know myself right, then I'll never finish it up.
But for anyone that wants it, grap it in its current state and see if
you can use it for something:
http://www.ejberg.dk/temp/mailchk.zip
A few notes:
The software most certainly will NOT work for you in its current
state. It expects a 240x128 pixels LCD, based on the Toshiba T6963C
controller to be present (memorymapped). At least remove the
lcdt6963.* and comment out all references to them.
In mailchk.c: Have a look right at the top. Define your mailserver,
username and password there. Down in the NutMain you should alter the
Route and DNS configuration.
Then I have made a small change in NUTDIR/pro/resolv.c to make
NutDnsGetHostByName work with my DNS server. I have put the modified
file in the zip as resolv.c.modified. Depending on your DNS, you may
or may not need this modification.
And here is the interesting part: The spamfilter.
Have a look in spam.c. There are several arrays of textstrings. Each
string begins with a number, positive or negative. After that is the
search string. For each mailheader (From, To, Subject etc.) there is
an array of strings. If the text in a line (except the number) is
present in the corresponding mailheader, then the number is added to a
total score (which is starting at 0). After checking all the
textstrings, we have a total score for that mail. If it is negative,
then it is considered to be spam, and therefore deleted.
In addition to this static filtering, the mail is also checked up
against the blacklist at spamcop.net. A hit there will also award the
mail with some (negative) score. And that is how the spam from this
list was detected and deleted :-)
Best regards,
Mikael
--
Mikael Ejberg Pedersen
More information about the En-Nut-Discussion
mailing list