sendmail filter configurations
Use these guidelines to specify the filters you want while configuring sendmail.
Specify filters using the key letter X (for eXternal). In the following
example, three filters are specified:
Xfilter1, S=local:/var/run/f1.sock, F=R
Xfilter2, S=inet6:999@localhost, F=T, T=C:10m;S:1s;R:1s;E:5m
Xfilter3, S=inet:3333@localhost
You can specify filters in your .mc file using the following syntax:
INPUT_MAIL_FILTER(`filter1', `S=local:/var/run/f1.sock, F=R')
INPUT_MAIL_FILTER(`filter2', `S=inet6:999@localhost, F=T, T=C:10m;S:1s;R:1s;E:5m')
INPUT_MAIL_FILTER(`filter3', `S=inet:3333@localhost')
where
filter(number) is the name of your filter. The first line of
the syntax specifies that the filter attach to a socket in the UNIX domain
in the /var/run directory. The second line specifies
that the filter use an IPv6 socket on port 999 of the local host.
The third line specifies that the filter use an IPv4 socket on port
3333 of the local host. The
If neither flag is specified, the message is passed through sendmail as
if the filter were not present.
F=
denotes which of the following flags applies:
Item | Description |
---|---|
R | Rejects the connection if the filter is unavailable. |
T | Fails the connection temporarily if the filter is unavailable. |
By specifying a value for
As indicated in the preceding example, the separators between
each timeout is a semicolon (
T=
, you can use the
filters to override the default timeouts used by sendmail.
The T=
equate uses the following fields:
Item | Description |
---|---|
C | Timeout for connecting to a filter (if 0, use the system timeout). |
S | Timeout for sending information from the MTA to a filter. |
R | Timeout for reading replies from the filter. |
E | Overall timeout between sending end-of-message notices to the filter and waiting for the final acknowledgement. |
;
), and the separator
between each equate is a comma (,
).The default values for timeouts are as follows:
T=C:0m;S:10s;R:10s;E:5m
where s
is
seconds and m
is minutes.The InputMailFilters option determines which
filters are used and in what sequence.
Note: If the InputMailFilters option
is not specified, no filters are used.
The InputMailFilters option
is set automatically according to the order of the INPUT_MAIL_FILTER
commands in your .mc file. You can reset this
value by setting a value for confINPUT_MAIL_FILTERS in your .mc file.
For example, if the InputMailFilters option
is set as:InputMailFilters=filter1, filter2, filter3
the
three filters will be called in the same order they were specified. By using MAIL_FILTER() instead of INPUT_MAIL_FILTER() in your .mc file, you can define a filter without adding it to the input filter list.