PureMessage for UNIX: configuring milter parameters for sendmail

  • Article ID: 10178
  • Updated: 07 Jun 2012

PureMessage for UNIX interacts with sendmail or Sendmail Switch via the Milter interface. Refer to "Installing PureMessage for UNIX" in the PureMessage documentation for more information on installing the sendmail distribution included with PureMessage, or configuring PureMessage to work with an existing sendmail or Sendmail Switch installation.

What to do

This section, taken from the sendmail documentation, provides a general description of the parameters for the INPUT_MAIL_FILTER setting.

Filters can be specified in your .mc file using the following:

INPUT_MAIL_FILTER('filter1', 'S=local:/var/run/f1.sock, F=R')
INPUT_MAIL_FILTER('filter2', 'S=inet6:999@localhost, F=T, T=S:3m;R:3m;E:8m')
INPUT_MAIL_FILTER('filter3', 'S=inet:3333@localhost'

The first attaches to a UNIX-domain socket in the /var/run directory.
The second uses an IPv6 socket on port 999 of localhost.
The third uses an IPv4 socket on port 3333 of localhost.

The current flags (F=) are:

Flag Meaning
R Reject connection if filter unavailable
T Temporary fail connection if filter unavailable

If neither F=R nor F=T is specified, the message is passed through sendmail as if the filter was not present.

You can also override the default timeouts used by sendmail when talking to the filters using the T= equate. There are three fields within the T= equate:

Flag Meaning
C Timeout for connecting to a filter (if 0, use system timeout).
S Timeout for sending information from the MTA to a filter. Depending on system load, this timeout may need to be increased to several minutes.
R Timeout for reading a reply from the filter. This value should typically be of the order of several minutes, especially if the system is receiving large messages, RBL checks are enabled, or the DNS system is slow.
E Overall timeout between sending end-of-message to filter and waiting for the final acknowledgment. This value should be the same or greater than the value for R.

The separator between each entry is a semicolon ';' (a comma ',' already separates equates and therefore can't separate timeouts). The default values (if not set in the config) are:

T=C:5m;E:8m;R:4m;S:2m

where 's' is seconds and 'm' is minutes.

After you have configured your filters, you must ensure that the filters continue running while sendmail is processing messages. If your filters are on the same server as sendmail, you should set up the initialization scripts to start PureMessage filters before sendmail, and shut them down after sendmail; that is, treat PureMessage as a resource that sendmail needs as soon as it starts up, and as long as it is running.

If sendmail and the filters run on different servers, you can set up a cron job to ensure that the filters are running correctly.

 
If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent

Comments