Chapter 3. Configuring chainmail

Table of Contents

Configuring Sendmail
Chainmail configuration file
General structure of the configration file
Options
Rules
Conditions
Actions
Including other configuration files
Examples of rules

Configuring Sendmail®

In order to filter your email traffic through chainmail, you need to tell Sendmail® to use chainmail as its mail filter (milter). To achieve this, you need to add the following line to your sendmail.mc file:

INPUT_MAIL_FILTER(`chainmail', `S=unix:/var/run/chainmail.sock, F=T')

The text after S= is the path to chainmail milter socket. The path given above is the default; if you change it, you need to modify chainmail configuration accordingly. The F=T part instructs Sendmail® to temporarily fail all email messages if for some reason chainmail is not available (e.g. not started, or crashed). If chainmail filtering is not cricual for you, and you'd rather have Sendmail® continue operating normally if chainmail is not available, replace F=T with F= (no character after the '=' sign).

If you are using other milters in your Sendmail® configuration and you have defined the confINPUT_MAIL_FILTER macro, so that your sendmail.mc file contains a line like this:

define(`confINPUT_MAIL_FILTER', `some_milter')

then you need to add chainmail to the list of active milters like this:

define(`confINPUT_MAIL_FILTER', `some_milter, chainmail')

Note that if you don't define confINPUT_MAIL_FILTER explicitly, it will automatically contains all milters that you defined with INPUT_MAIL_FILTER