Mailfilter


The hamster possesses an inserted Mailfilter, with which can be decided, which Mails with which characteristics to be loaded to be supposed or also not. The Mailfilter is written into a file named " Mailfilt.hst" in the hamster master directory. This file must be created manually, since it is according to standard missing.

The following instruction are implemented for the Mailfilter:

Instruction Description
[ * - identifier ]

[ Regel1 ]

[ Regel2 ]

If one divides the Mailfilter into several sections and fetching the Mails with " Fetchmail " takes place,
(fetchmail " pop3.serv.er " " pop3 " " $7 " " " " admin, more identifier ")
the Mailfilter can be used differentiated for different POP servers. An area, which begins only with [ * ], is always considered even if the Mails is gepullt only with " mail.pull ".
ignore() The Mail is ignored, i.e. she is not loaded and is not deleted also not from the POP server.
kill() The Mail is not loaded and is not deleted from the server. (except if under the Settings: ' [ X ] Leave mail on server... ' is marked, then one does not delete.)
load() The Mail is loaded (without syntax option behind it standard)
= load() If an instruction with one " = " is set in front, the following filter rules are ignored, if this instruction slams shut. Far down standing "kill " or " ignore " is not no more considered.
notify() A local user is informed about an effected ignore and kill. The local user can be entered into the parentheses after the instruction [ notify(admin) ]. The position of the instruction is not of importance. The header and the first 20 lines of the Mail with the information become whether " kill " or " ignore " applies locally skillfully to the respective user. The number of lines of the Bodies can be adjusted in hamster.ini.
Additional instruction:
add(local user) Adds a local recipient to the available recipient list.
del(local user) Deletes a local recipient of the recipient list.
set(local user) Replaces the recipient list completely again with the indicated local user.
postto(news.group) Postet the Mail into local newsgroup, which must be also created in the hamster.
ADD account Searches the recipient list for well-known local addresses and adds then the local account to the recipient list.

Instruction indicated above must get now still indicated, when they are to work. But the following options serve, by which the Mails can be judged.

Syntax Description
Byte: Size of the Mail in bytes.
e.g.: [ ignore() bytes: %>100000 ]
LINES: Length of the Mail in lines.
e.g.: [ kill() LINES: %>500 ]
From: From line of the header.
e.g.: [ = load() From: " billg@microsoft.com " ]
Message ID: Message ID of the Mail, if available.
References: References, if available.
To: To header of the Mail.
e.g.: [ load() to: " usehamsternet@onelist.com " ]
Any sender: Analyses sender specification like " From: ", " Apparently From: ", " senders: ", " Reply to: ", " x-senders: ", " Envelope From:" and " x-Envelope-From: " out.
Any Recipient: Analyses recipient specification like " to: ", " Apparently to: ", " CC: ", " BCC: ", " Envelope to: " and " x-Envelope-to: " out.
~Subject: Subject of the Mail. (" ~ " decodes beforehand after MIME)
* Received: Special Received line with May LS (" * " caused that all lines, which begin with " Received " are searched, there usually several are available.)

Combinations are likewise possible and meaningful.
[ load() Any senders: " boss@compa.ny " - @Subject:"You AR fired! " ]

Example of a Mailfilters: (here suggestions are still welcomely, so far I only the Mail of Juergen Denzler in-copied and continued to process, since I am still at trying and testing, - mg -)

Juergen Denzler tries even even an assertion of the mode of operation of the Mailfilters and compares it with the method of operation of the new filter. http://www.x501.de/hamster/mailfilter.htm

A prerequisite: 3-Mail account, ' limit ' in hamster.ini
removed fetchmail " more pop.serv.er " " pop3 " " $1 " " " " 1-user "
fetchmail " more pop.serv.er " " pop3 " " $2 " " " " 2-user "
fetchmail " more pop.serv.er " " pop3 " " $3 " " " " 1-user, regel1 "
# see down fetchmail " more pop.serv.er " to " pop3 " " $4 " " " " 1-user, regel2 " # account for new type character, lists reserved --
8< -- # MailFilt.hst [ * ] # no entry # if necessary can with load()
an ignored Mail # through enter - to load - entry delete to be gotten
[ * - regel1 ] = kill() From " acquaintance Spammer "      # without announcement ignore()
byte %>50000 # Mails more largely as 50000 bytes ignore() LINES %>500
# Mails longer than 500 lines notify(admin) # in the case of
ignore/kill the Admin [ regel1 does not inform ] # an entry # account
is only persons of my confidence admits # I takes all Mails [ to
regel2 ] # [ * - regel1 ] applies to postto(hamster.ml.onelist) to
also here: " usehamsternet@onelist.com " add(2 user) x-MailID:
Computing # new type character goes additionally at further user #
eof

My Mailfilter used looks in such a way at the moment:

I edit # the Mailfilter, by calling a Hamsterscript with the
following # contents: ' start WAIT " notepad.exe MailFilt.hst " '. #
Mails pulle I without ' Identifier ', therefore only one total
section: [ * ] # information about ignore and kill. notify(admin) #
of hard Kill, is based to From on really received Spam, whereby I use
# the ' Received' line of the Mail here, there ': ' and ' to: ' #
usually change and/or are falsified: = kill() * Received: " com.tw "
" ultima.co.jp " " net.tw " = kill() * Received: " illegel.com " "
mlmopps.com " # post of Mails into local groups of new:
postto(hamster.ml.pc welt) From: " news@pcwelt.de "
postto(hamster.ml.ehamster) to: " ehamster@onelist.com "
postto(hamster.ml.usehamsternet) to: " usehamsternet@onelist.com " #
*** experimental filters *** # I operate here with ' ignore() ' over
at applicable # criteria to be informed and then the above hard # '
kill ' refine ignore() bytes: %>50000 ignore() LINES: %>200 ignore()
Any senders: " info@witch.de " " life@xsâll.nl " ignore() *
Received: " cn " " hinet.net " " isocor.fr " " cornell.edu " ignore()
* Received: " tufts.edu " " wanadoo.fr " " wxs.nl " " jp " ignore()
to: " aol.com " " aol.de " ignore() From: " hotbot.com "
# eof


Accounts| autoscripts| configuring| Links| mail filters| newsreader| OE5faq| scoring| scripts| Settings| tips| tools
New English Help Files | Hamster Index