File: INSTALL

package info (click to toggle)
mailfilter 0.6.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,268 kB
  • ctags: 2,088
  • sloc: ansic: 6,502; sh: 4,443; cpp: 2,169; makefile: 465; yacc: 426; lex: 171; perl: 106; sed: 16
file content (248 lines) | stat: -rw-r--r-- 8,473 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
Mailfilter INSTALL
-=-=-=-=-=-=-=-=-=

0. REQUIREMENTS

To run Mailfilter it's best to have a UNIX (-like) operating system, but it
also compiles fine with Windows 9x/NT/2000 if additional libraries and tools
are installed (e. g. Cygwin or DJGPP).  So far Mailfilter has been success-
fully compiled and tested with

 - Solaris 8 / SunOS 5.8

 - Irix 6.5

 - FreeBSD 4.1.1-RELEASE, 4.5-RELEASE

 - Mac OS X 10.0

 - NetBSD 1.5

 - Linux:  Mandrake 7.0 - 8.2, Debian 2.1 - 3.0, RedHat 6.2 - 7.1,
           Slackware 3.9 (See doc/README.Slackware for further details)
           SuSE 6.2, LinuxPPC

 - Windows NT, 2000, XP (using Cygwin)

but it may well work on other platforms, too.  (Please report success if
you have managed to compile it on any other system - thanks.)

To compile/install Mailfilter you also need to have a fairly recent version
of a (GNU) C++ compiler (e. g. GCC >= 2.95.2) and your system must support
BSD-type sockets (in general all UNIX systems do meet this criterion).  For 
compilation you will also need some of the GNU autotools (gettext, m4) and
the programs flex (http://lex.sf.net/) and yacc (or the GNU substitute bison
(http://www.gnu.org/software/bison/)).

ATTENTION: GNU flex is unlikely to work with recent compiler releases.  So,
if you experience compile problems, please use flex from http://lex.sf.net/.
GNU flex is broken!!

Please be sure to check the doc/ directory for platform-specific installation
notes before proceeding  (especially if you want to run Mailfilter on any of
the MS-Windows systems).


1. CONFIGURE

If you have downloaded and installed a binary distribution of Mailfilter, then
there is no need to read the following instructions.  Continue with section 3
and 4 instead.

If you have downloaded a compressed source code archive, then please proceed
the following steps.  Change to the Mailfilter distribution directory (where
the INSTALL file can be found, e. g. /home/tux/mailfilter-x.y.z) and run

      ./configure

For a list of available options for configuration,  call configure with the
--help parameter.  Running configure creates a Makefile in your source code
directory.  If you like, have a look at it before you continue, though this
should not be necessary, unless you want to have debugging information
included or things like that.


2. INSTALL

After configure has successfully guessed your system's specific values, you
can compile the Mailfilter source code with

      make

NOTE:  On Linux systems make typically refers to GNU gmake.  However, some
operating systems (e. g. FreeBSD) ship with different versions of make and
you will need to explicitly use the command 'gmake'  (and later 'gmake
install') in order to get Mailfilter compiled correctly.

If you have not changed any of the predefined values for configure then
Mailfilter will be installed in /usr/local/bin.   Become 'root' now and
run

      make install

That's it - you're done with the installation, but please read on to find out
what you have to do in order to make Mailfilter work.  (IMPORTANT!!)


3. SET-UP MAILFILTER

Before you can execute the Mailfilter application you must create a rcfile
called

      .mailfilterrc

in your home directory, e. g. /home/tux/.mailfilterrc.  In this file you
must specify the POP accounts you want Mailfilter to check for spam.  Here
is a very basic set of example rules you could use.  I suggest you simply
copy and paste it.  For further information and a list of all supported key-
words, please also read the mailfilterrc(5) and mailfilterex(5) man pages.
More rcfiles are available in the doc/ directory of the Mailfilter
distribution.


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

LOGFILE = /home/tux/logs/.mailfilter.log


# -----------------------------------------------------------
# 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 which filter
#          matched which string of an e-mail header
#   6      Debugging mode; prints almost everything

VERBOSE = 3


# -----------------------------------------------------------
# Server list  (Do not change the order of the fields!!)
# Note: Port 110 is usually the port APOP and POP3 servers use.

SERVER   = pop.server.com
USER     = username
PASS     = password
PROTOCOL = pop3
PORT     = 110

SERVER   = pop.secondserver.com
USER     = anotherusername
PASS     = anotherusername
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 = basic


# -----------------------------------------------------------
# Maximum e-mail size in bytes that should not be exceeded.

MAXSIZE_DENY = 1000000


# -----------------------------------------------------------
# Set maximum line length of any field in the message header
 
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:.*Get penis enlargement
DENY = ^Subject:.*WIN MONEY

# This one filters mail from a certain person:
DENY = ^From:.*spammer@any_spam_organisation.com

# 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


# -----------------------------------------------------------  
# 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

# 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


It is _very_ important to not change the order of the SERVER, USER, PASS,
PROTOCOL and PORT fields.  Generally the rcfile is not case-sensitive, which
means it does not matter whether the keywords are spelled in  capitals or
not.  You can place white space characters before and in between a command
and its parameters, but usually not after the parameter!

To find out how to set up more complex rules and options, please refer to
the man pages and the FAQ provided with the Mailfilter program, or simply
look up the webpage.  If you do not set up a .mailfilterrc file, the program
refuses to start.  It is also recommended to change the permissions of this
file to read-only, as it contains all your passwords en clear.


4. RUN MAILFILTER

Now try it out!  Mailfilter can be started with

      mailfilter

on the command line.  Be sure you have set up an individual rcfile (e.g.
$HOME/.mailfilterrc) in your home directory.  If you don't know how to do
this, please read section 3 of this document again, or consult the
Mailfilter FAQ in the doc/ directory for further information.