Skip to Content.
Sympa Menu

baslinux - Re: [BL] O, and bye the way, Hello.

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: cce.zizkov AT volny.cz
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] O, and bye the way, Hello.
  • Date: Thu, 9 Sep 2004 22:36:54

On 10 Sep 04 at 6:52, 3aoo-cvfd AT dea.spamcon.org wrote:

>cce.zizkov AT volny.cz wrote:
>>
>> what about trying to compile 'mailfilter'?
>> That could be a quite useful add-on for BL3.
>
>What does mailfilter do that you can't do with
>the mail packages already in Slackware 4.0?
>
>Cheers,
>Steven

Hi Steven,

I enclose the a self-explaining sample of the configuration file for
mailfilter below.

This program is certainly not the best spam filtering program.

+ it is quite small (BL3 ;-)

+ it is easy to setup (I run it headless with a modified BL2 RAM
version), the mailfilter.rc is sitting on my DOS partition and
can be continuously improved.

- it is too simple (only yes and no - you can not combine
spam criteria (let's say a hotmail address and the word money).
If you receive spam mainly in English language, but mail in a
different language you can achieve close to 50% of actual spam.
More restrictive use is possible, but then you risk to lose
unexpected good messages.

I do not know all those other programs. I realized during BL1 that
fetchmail could also be combined with all kind of filter routines,
eg. procmail. But I think this was always _after_ downloading the
junk.

Nevertheless, I finally did the reading about pmail (ver. 0.9.16).
This version (I do not know how far it is from that one included in
BL3) has a (according to the documentation still experimental)
filter functionality that also kills spam on the server. If it
really does what the manual claims, it will be _much_ superior to
mailfilter. Mailfilter, however, will probably be further
improved, too.

I see, I have to play a bit with pmail. May be I can replace
my DOS mail transport programs (Arachne and UKA-PPP) with a pmail
running on a Linux box. But do not understand the file formats of
incoming and outgoing mail, yet.

Christof


------ mailfilter.rc -----------------------------------------------

# -----------------------------------------------------------
# Logile path (be sure you have write permission in this
# directory; you MUST specify a logfile)

LOGFILE=/root/.mailfilter.log

# Do not forget chmod 600
# Warning: your e-mail will noty be received, if
# Request: I sent you a message, but spamcop blocked your mailbox
# against my mail, please add my address to white list

# -----------------------------------------------------------
# Level of verbosity
#
# 0 Silent, show nothing at all
# 1 Only show errors
# 2 Only show "Deleted..." messages and errors
# 3 Default; Show "Deleted..." messages, errors
# and "Examining..." messages
# 4 Like (3), except this also shows the current
# account's username
# 5 Like (4), except this also shows the com§
# mands issued to the server and the server's
# return value (OK or ERR)
# 6 Debugging mode; prints almost everything

VERBOSE=4
TEST=yes
SHOW_HEADERS=yes


# -----------------------------------------------------------
# POP3 server list (do not change the order of the fields!)
# Note: Port 110 is usually the port POP3 servers use.
# Currently only POP3 is supported.

SERVER=pop3.volny.cz
USER=cce.zizkov
PASS=
PROTOCOL=pop3
PORT=110


# -----------------------------------------------------------
# Do you want case sensitive e-mail filters? { yes | no }

REG_CASE=no


# -----------------------------------------------------------
# Sets the type of Regular Expression used { extended | basic }
#
# (The default is 'basic', don't change unless you know what you
# are doing. Extended REs are more complex to set up.)

REG_TYPE=extended


# Accept only 250 KBytes message size. Friends can send more though.
# (See MAXSIZE_ALLOW for further information.)

MAXSIZE_DENY=1000000


# -----------------------------------------------------------
# Set maximum line length of any field in the message header
# (default is 998 characters per line; 0 to disable option)

MAXLENGTH=998


# ----------------------------------------------------------
# Filter rules for detecting spam (each rule must be placed
# in a separate line)

# These filters detect certain unpleasant e-mail subjects:
DENY=^Subject:.*penis.*
DENY=^Subject:.*WIN.*MONEY
DENY=^Subject:.*low.*salary
DENY=^Subject:.*save.*money
DENY=^Subject:.*mak.*money
DENY=^Subject:.*v.agra
DENY=^Subject:.*buy.*and

# This one filters mail from a certain person.
# (We need the back slash before the '.com' since we are using
# extended Regular Expressions.)
DENY=^From:.*spammer@any_spam_organisation\.com
DENY=^From:.*gmone@tpg\.com\.au

# This one filters mail from everyone at a certain organisation:
DENY=^From:.*@any_provider_that_spams\.org

# We don't want any of those 'LEGAL' messages either
# while stuff with 'legal' in the subject still interests us:
DENY_CASE=^Subject:.*LEGAL

# This one demonstrates the use of 'Negative Filters' and the
# logical OR '|' in Regular Expressions.
# (Again, the example works only with extended Regular Expressions.)
# Kill everything not directly addressed to own account:
DENY<>(^To|^Cc):(.*username@server\.com|.*anotherusername@secondserver

# -----------------------------------------------------------
# Normalises the subject strings before parsing, e.g.
# ',L.E-G,A.L; ,C.A-B`L`E, +.B-O`X` ;D`E`S,C;R,A.MB;L,E.R-]'
# becomes 'LEGAL CABLE BOX DESCRAMBLER' which can be filtered.
#
# If NORMAL is switched on, Mailfilter tries to apply filters
# to both the normalised and the original subject.

NORMAL=yes


# -----------------------------------------------------------
# The maximum e-mail size in bytes that messages from friends
# should not exceed. Set this to 0 if all your friends (ALLOW)
# can send messages as long as they want.

MAXSIZE_ALLOW=0

# ----------------------------------------------------------
# Set list of friends that always pass, if they do not
# exceed the message length of MAXSIZE_ALLOW

# This rule allows all mail from a friend who was unlucky enough
# to have signed up with a spam organisation. With DENY we
# block everyone else from that domain though! See above!
ALLOW=^From:.*a_friend_with_account@any_provider_that_spams\.org
ALLOW=^To:.*asf-news@hermes\.ipn\.de

# Of course we allow e-mail from anyone who has something to say about
# mailfilter:
ALLOW=^Subject:.*mailfilter

# We also let our girlfriend send any e-mail she wants:
ALLOW=^From:.*my_girlfriend@any_provider\.com



________________________________________________________________

Českobratrská církev evangelická - Betlémská kaple na Žižkově
Prokopova 4/216, 130 00 Praha 3, Czech Republic
Tel. (+420) 222 78 06 73 / 222 78 20 02 / 603 18 87 53
http://www.volny.cz/cce.zizkov





Archive powered by MHonArc 2.6.24.

Top of Page