|by Walt Stoneburner||v1.5|
Milter is an API provided by the folks at sendmail to muck about with
incoming mail at every step of the SMTP session, accepting, rejecting,
discarding, altering, whatever you want to do, along the way.
A "milter daemon" runs in the background, parallel to the sendmail process, with sendmail communcating with it (via UNIX or TCP sockets, so the daemon could reside on a separate machine if server load required it). At every step of the SMTP session, callbacks to the milter daemon are issued, and the milter daemon advises the sendmail process what to do -- continue to accept the message, reject the message, etc.
|-- Source: About Page from www.milter.org, a MILTER discussion site|
MILTER is not compiled by sendmail by default; it requires POSIX thread support on the host operating system.
To enable MILTER, edit the Makefile and add libmilter to the end of the subdirectory list, and save the file. This will build the file libmilter.a.
SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \ mailstats makemap praliases rmail smrsh vacation libmilterNote, you will also need to add a user called smmsp, a group called smmsp, and make sure the following directories and files exist with the following permissions:
drwxrwx--- smmsp smmsp /var/spool/clientmqueue drwx------ root wheel /var/spool/mqueue -r--r--r-- root wheel /etc/mail/sendmail.cf -r--r--r-- root wheel /etc/mail/submit.cf -r-xr-sr-x root smmsp /usr/sbin/sendmail
If you've added MILTER support, support add
these two lines to site.config.m4:
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE ')
$ cd ../..
$ ./Build -c
Consider adding, above the MAILER() lines:
FEATURE(`mailertable',`hash -T<TMPF> /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -T<TMPF> /etc/mail/virtusertable.db')dnl
FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access')dnl
HX-Comment: Please report spam to firstname.lastname@example.org
The dnl is actually an m4 code that means "Delete Through Newline," it deletes from the dnl up to and including the next newline.
If you added MILTER support, you should see MILTERin the "Compiled with:" section at the top.
Press Control-D to exit.
This generates a file called op.txt. It contains very useful information about sendmail.
MILTER documentation resides in libmilter/READMEfor compilation instructions) and in libmilter/docs (for API and configuration).