Sendmail comprises a mail filter API (milter) which allows third-parties to hook up their filters into sendmail.
Installating sendmail with milter support
Download the sendmail source code from the Sendmail website.
The sendmail binary is now installed.
The next step is to configure sendmail.
Note: If you are using a sendmail RPM, install the sendmail-devel RPM.
The main configuration file for sendmail is the /etc/mail/sendmail.cf file. Starting with version 8.12, sendmail uses the /etc/mail/submit.cf configuration file for mail submission. The .cf files are complex to understand. It is recommended that you create a .mc configuration file and use the M4 (macro processor) to generate the .cf file.
There are some sample .mc configuration files in the cf/cf/ directory of the sendmail source code. Alternatively, you can use one of the sample configuration files available from our website. You should edit the .mc file with a UNIX text editor such as vi.
Order of milters
Several milters can be used with sendmail by adding INPUT_MAIL_FILTER lines for each of them. You can change the order in which the milters are called by placing the INPUT_MAIL_FILTER line for the one you want first.
Socket permission errors
You can get around file permissions reading the milter's Unix socket by using TCP sockets instead. e.g:
INPUT_MAIL_FILTER(`scam-back', `S=inet@8900@localhost, F=T, T=S:240s;R:240s;E:5m')dnl
This error generally occurs if the milter is not running. You should start the milter before starting sendmail.
If you have any comments, you can contact the author here.http://www.elandsys.com/resources/sendmail/milter.html