Project homepage:

http://jmaimon.com/sendmail/callahead-milter/

For assistance:

<jmaimon@jmaimon.com>

You will need libmilter development installed.

Debian:

apt-get install libmilter-dev

Compile with any of the following lines:

gcc -DDEBUG -g callahead-milter.c -lmilter -lpthread -o callahead-milter -Wall -lresolv -lmcheck
gcc -DDEBUG -g callahead-milter.c -lmilter -lpthread -o callahead-milter -Wall -lresolv
gcc -g callahead-milter.c -lmilter -lpthread -o callahead-milter -Wall -lresolv
gcc -02 callahead-milter.c -lmilter -lpthread -o callahead-milter -Wall -lresolv

To turn on additional features that depend on Joe Maimon Sendmail Patches.

export CFLAGS="D_FFR_MILTER_REWRITE=1 -D_FFR_MILTER_SM_MAP=1"

Depending on your libmilter setup this may also be needed

export LDFLAGS="-L/usr/lib/libmilter"

or use make and edit the makefile to select the correct CFLAGS

FILES and DEFAULT installation paths.

callahead-milter - binary program, installed to /usr/local/bin/callahead-milter
rc.callahead-milter - RC script, installed to /etc/init.d/callahead-milter
default.callahead-milter - RC Option Shell fragment, installed to /etc/default/callahead-milter

To run automaticall on startup, you will need to run (Debian) 

update-rc.d callahead-milter defaults 30

Edit /etc/default/callahead-milter to enable the daemon.
