home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
shackos2.zip
/
blamspam.doc
< prev
next >
Wrap
Text File
|
1997-05-21
|
9KB
|
179 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BlamSpam Version 1.0
InnoVal Systems Solutions, Inc.
May 5, 1997
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
BlamSpam is a Spam Filter (or Twit Filter) for use with Hacksaw. It
will blow away the spam messages, right on your POP3 server, before
your regular email program has to deal with them. By default, it goes
to the POP3 account specified in the HACKSAW.INI file, every 15
minutes, compares all the mail against the entries in the BlamSpam.Cfg
file, finds any and all matches, and deletes the matching messages
from the POP3 server.
If executed with a /F:d:\dirname\filename.ext parameter, the matching
messages will be stored in that file before they're deleted from the
POP3 server, so that you can doublecheck them yourself, later. If
d:\dirname\filename.ext is an existing file, the new messages will be
appended to the end of it rather than overwriting it.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The BLAMSPAM.CFG File
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A sample BlamSpam.Cfg file is included, which contains entries for
many internet addresses that are known to send spam messages.
Blank lines, and lines which begin with /* are ignored.
There are two other types of lines in a BlamSpam.Cfg file:
The only required lines in this file are the lines which tell the
program which messages to delete. Each of these lines contains a
single search string, which can be the author's email address, a word
or phrase in the subject line, or even a string of text from the body
of the message. Choose a string which will appear in the messages you
want deleted but which will not ever, under any circumstances, appear
in the applicable part(s) of any other messages.
If you don't tell it otherwise, the program will find these strings in
any message header line (which, by definition, means any line before
the first blank line of the message) but not in any of the message
body text (past the first blank line, which is the divider between the
headers and the body of the message). If you need to make the program
search the message body text as well as (or instead of) the header
lines, or if you need to make it search only certain ones of the
header lines instead of all of them, you can do that, too, using a
HEADERLINES parameter.
To make the program apply a HEADERLINES parameter to one single line
of the BlamSpam.Cfg file, you can put it on that same line of the
file, after a <TAB> character. For example:
spamco.com<TAB>From:
This example would kill all the messages with "spamco.com" in the
From: header, but no messages with that string in the Subject: header
or anywhere else in the message.
In order for that to work, you must create the BlamSpam.Cfg file with
a text editor which actually places <TAB> characters into the file,
rather than converting them to a certain number of spaces the way so
many text editors do! OS/2's E.EXE and Windows's NOTEPAD.EXE, for
example, are both safe for this purpose.
In order to make a HEADERLINES parameter apply to all subsequent lines
of the BlamSpam.Cfg file instead of only the one line, you insert a
line such as this one:
<headerlines>=From:
before the first of the lines to which you want it to apply. That is
the third possible type of line in a BlamSpam.Cfg file. It will
change the HEADERLINES parameter for all BlamSpam.Cfg lines below it,
until the next <headerlines>= line in the file (if any). Except, of
course, for any lines which have their own HEADERLINES parameters
(that is, a <TAB> character and another string, following the search
string). A HEADERLINES parameter on a search string line overrides
whatever global HEADERLINES parameter default is in effect in that
part of the BlamSpam.Cfg file.
The reason the default behavior of BlamSpam is to look for matches in
all the header lines and none of the message body text, is because the
default HEADERLINES value is NOBODY. NOBODY means not to search the
body text, just the header lines.
Another valid value for HEADERLINES is ENTIRE. This means that the
entire message will be searched: The header lines and the message
body text.
The other possible values for HEADERLINES are MSGTEXT which means just
the message body text and no header lines; or any valid internet
message header tag such as TO, FROM, SUBJECT, X-MAILER, REPLY-TO,
RECEIVED, etc. These must be spelled the same way as they are spelled
in the headers of the messages, though they're case insensitive and
the colon is optional. That is, the program will treat "FROM:" and
"From:" and "FrOm" and "from" identically.
Except for NOBODY and ENTIRE, all other possible HEADERLINES values
can be combined, using spaces or commas. For example, you can say
"FROM,REPLY-TO" or "REPLY-TO FROM" to have the program search only
both of those header lines in each of the messages.
Remember, when using the ENTIRE or MSGTEXT value for the HEADERLINES
parameter, keep the search string as short as possible. If the string
is more than one word long, it can occur with a carriage return in the
middle of it instead of a space, in which case the program will not
recognize it as a match! If the string is only one word long, then
the only way it can be missed is if it's hyphenated and split across
two lines of the message.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Example BLAMSPAM.CFG File
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
spamco@isp.com
Spamco<TAB>Sender: Reply-To:
Spamco, Inc.<TAB>subject,msgtext
<headerlines>=msgtext
Spamco Product Name
111.222.333.444<TAB>Received
foul language<TAB>entire
4letterword
spamco2@elsewhere.com<TAB>NoBody
Since NOBODY is the default HEADERLINES parameter value, the program
will search only the header lines, and not the message body text, for
spamco@isp.com. It will search for Spamco in only the Sender: and
Reply-to: header lines. It will search only the Subject: header line
and all of the message body text for Spamco, Inc. The next line,
<headerlines>=msgtext, causes the default HEADERLINES parameter to be
changed from NOBODY to MSGTEXT for all future entries which don't have
their own HEADERLINES parameter on them. So the phrase "Spamco
Product Name" will be searched for only in the message body text, not
in any header lines. The same will be true for the word 4letterword.
The IP address 111.222.333.444 will be searched in only the Received:
lines, and the phrase "foul language" will be searched for in all
header lines and the message body text as well. Finally,
spamco2@elsewhere.com will be searched for in all the header lines but
not the message body text. The only reason the NOBODY parameter is
needed there is because the global default had been changed from
NOBODY to MSGTEXT by the earlier <headerlines>= line of the file.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Further Customization
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1. For use with multiple POP3 accounts:
Specify HOST(), USERID(), and PASSWORD() arguments, on BlamSpam's
command line just as you would on Hacksaw's. If you use a BlamSpam
/F:filename.ext parameter, it must come before these other arguments
on BlamSpam's command line. The program will exit as soon as it's
done, instead of waiting 15 minutes and starting over. So you will
want to run it from a batch file or REXX program which runs a BlamSpam
command for one account, a BlamSpam command for the next account,
etc., and then waits 15 minutes (or however long you like) and starts
over, since BlamSpam won't do that itself when those other arguments
are used.
2. To change the frequency with which the program checks the mail:
Just edit the INTERVAL=900 line of the program file, to change the
number of seconds to whatever you prefer.
Or if you want the program to just do its thing once and exit rather
than sleeping for a certain length of time and starting over, then
feed it HOST(), USERID(), and PASSWORD() arguments and that's what it
will do.
3. PORT() argument:
If you need to use Hacksaw's PORT() argument, you'll need to specify
it on BlamSpam's command line as well. If you use a BlamSpam
/F:filename.ext parameter, it must come before the PORT() argument on
BlamSpam's command line.