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 -structure < mime_message
51
52 parses a message on stdin and prints lots of debugging information.
53
54
55 mimedefang.pl -prettyprint < mime_message
56
57 parses a message on stdin and prints it in a "nice" format (depending
58 on your definition of "nice".)
59
60
61 mimedefang.pl -features
62
63 prints a list of detected optional Perl modules. The output looks
64 something like this:
65
66 HTMLCleaner: no
67 SpamAssassin: yes
68
69
70 mimedefang.pl -validate
71
72 calls the function filter_validate, if it is defined in your filter.
73 filter_validate should return an integer; this becomes the exit code.
74 If filter_validate does not exist, an error message is printed and
75 mimedefang.pl exits with an exit code of 1.
76
77
79 mimedefang.pl was written by David F. Skoll <dfs@roaringpenguin.com>.
80 The mimedefang home page is http://www.mimedefang.org/.
81
82
84 mimedefang(8), mimedefang-filter(5), mimedefang-protocol(7)
85
86
87
88
89
904th Berkeley Distribution 8 February 2005 MIMEDEFANG.PL(8)