The InputMailFilters Option

Filters to connect to for processing messages through external programs are declared with the X configuration command (The X Configuration Command on page 1173). One form of that command (for use in your mc file) not only declares the Milter, but also defines the order in which the Milters will be called:

INPUT_MAIL_FILTER(`progA', ``S=local:/var/run/f1.sock, F=R'')
INPUT_MAIL_FILTER(`progB', ``S=inet6:999@localhost, F=T, T=S:1s;R:1s;E:5m'')

Here, the Milters will be called in the order progA first and progB second, for each phase of the message. Table 26-5 shows which portion of the message is checked by each Milter in time order. Note the change in order when the DATA phase begins (header/body).

Table 26-5. Milters called in time order

Milter

Screens what

progA

Connection information, such as hostname and IP address

progB

Connection information, such as hostname and IP address

progA

HELO/EHLO greeting information

progB

HELO/EHLO greeting information

progA

MAIL From: address and ESMTP arguments

progB

MAIL From: address and ESMTP arguments

progA

RCPT To: address and ESMTP arguments

progB

RCPT To: address and ESMTP arguments

progA

DATA command (V8.14 and later)

progB

DATA command (V8.14 and later)

progA

The message headers

progA

The message body

progA

The end of a message (a semaphore)

progB

The message headers

progB

The message body

progB

The end of a message (a semaphore)

Each Milter is handed portions of a message envelope ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.