To compile a filter, you must complete the following steps:
Insert the include and Sendmail directories in your include path. For
example, -I/path/to/include -I path/to/sendmail.
Ensure that the libmilter.a file is in your library path and link your filter
application with this file. For example, you can use the -lmilter option to link your the filter application with
this file.
Compile with pthreads either by using -pthread for gcc or by linking with a pthreads support library (-lpthread).
Following is an example of a command to compile a filter application:
# cc -I/path/to/include -I/path/to/sendmail -c myfile.c
where:
myfile.c specifies the name of the Milter program.
Following is an example of a command to link the filter application:
# cc -o myfilter [object-files] -L[library-location] -lmilter -pthread