1MIMEDEFANG.PL(8) System Manager's Manual MIMEDEFANG.PL(8)
2
3
4
6 mimedefang.pl - Perl script to scan MIME messages.
7
8
10 mimedefang.pl [-f filter] dir
11
12
14 mimedefang.pl is a Perl script designed to work with mimedefang(8). It
15 takes a single argument which is a directory which should contain files
16 laid out as described in mimedefang(8).
17
18
20 -f filter
21 Specifies the name of the file containing the filter. If this
22 option is omitted, the default filter /etc/mail/mimedefang-fil‐
23 ter is used.
24
25
27 mimedefang.pl evaluates the file /etc/mail/mimedefang-filter as a Perl
28 fragment. This file should define the filter procedure. For each part
29 of a MIME message, mimedefang.pl calls filter and disposes of the part
30 as instructed by the filter. The various modes of disposition are
31 described in mimedefang-filter(5).
32
33
35 You are strongly recommended to test your filter before installing it
36 in /etc/mail/mimedefang-filter. To test the filter, save it in a file
37 (e.g. test-filter) and run this command:
38
39 mimedefang.pl -f test-filter -test
40
41 This tests the filter for syntactic correctness. If it passes, you can
42 install it as a production filter. (Note that the test tests only for
43 correct Perl syntax; it doesn't make sure your filter does something
44 sensible.)
45
46
48 There are a few other ways to invoke mimedefang.pl:
49
50 mimedefang.pl -features
51
52 prints a list of detected optional Perl modules. The output looks
53 something like this:
54
55 SpamAssassin: yes
56
57
58 mimedefang.pl -validate
59
60 calls the function filter_validate, if it is defined in your filter.
61 filter_validate should return an integer; this becomes the exit code.
62 If filter_validate does not exist, an error message is printed and
63 mimedefang.pl exits with an exit code of 1.
64
65
67 mimedefang.pl was written by David F. Skoll <dfs@roaringpenguin.com>.
68 The mimedefang home page is http://www.mimedefang.org/.
69
70
72 mimedefang(8), mimedefang-filter(5), mimedefang-protocol(7)
73
74
75
76
77
784th Berkeley Distribution 8 February 2005 MIMEDEFANG.PL(8)