Internet Express for Tru64 UNIX Version 6.8 Administration Guide (14233)

3. On the Configure Sendmail Server menu, make sure that Server is selected and click on
Configure.
4. From the Configure Sendmail Server menu, choose Configure MILTER.
5. In the Existing Filters list, choose the filter to be deleted.
6. Click Delete.
7. On the confirmation page, click Continue.
5.1.4.8.4 Filters Included with Internet Express
Bogofilter and Clam AV anti-virus filters are supplied with this release. Clam AV anti-virus can
be enabled using the Administration Utility (see Section 5.1.4.5: Enabling Anti-Virus). For
information about Bogofilter, see Section 5.4: Bogofilter Spam Filter.
5.1.4.8.5 Creating a New Mail Filter
Appendix A includes the code for a sample mail filter code called sample.c. To compile it, use
the following command:
# cc I/usr/internet/include -o sample sample.c libmilter.a libsm.a
-pthread
Any new filter must be thread-safe. Depending on how many threads will run, the per-process
limits in the new filter may have to be changed.
5.1.4.8.6 Adding the Sample Filter Using the Administration Utility
Access the Add New Filter menu, as described in Section 5.1.4.8.1: Adding a Mail Filter. Enter
the appropriate information for the filter, for example:
Filter Name: sample Socket: local:/var/run/f1.sock
Socket: local:/var/run/f1.sock
When you click on Submit, the new filter interface is added to the current Sendmail configuration
file.
5.1.4.8.7 Testing the New Filter
The sample filter takes one argument, -p, which indicates the local port on which to create a
listening socket (the UNIX domain socket located in /var/run/example1.sock).
./sample -p local:/var/run/example1.sock
If the sample filter returns immediately to a command line, there was problem. Check the
following items:
1. Whether the command line had errors
2. If the local socket was created
3. The syslog for any errors
4. Use the command netstat -a to verify the filter process is listening on the correct local
socket.
To test the filter, e-mail messages must be piped to the filter via Sendmail. There are two means
of doing this: by using sendmail -bs, or by telnet localhost 25. See the following
example:
# sendmail -bs
220 example.hp.com ESMTP Sendmail 8.13.5/8.13.5; Thu, 23 Feb 2006 13:05:23 -0500 (EST)
HELO localhost
250 example.dec.com Hello test@localhost, pleased to meet you
MAIL From: <test>
250 2.1.0 <test>... Sender ok
RCPT To:
250 2.1.5 <root>... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
From: test@example.hp.com
To: root@example.hp.com
5.1 Sendmail Server Administration 113