Sendmail 8.13.3 Programmer's Guide

Sample Program
Milter Sample Program
Chapter 574
{
fprintf(stderr, "%s: Missing required -p
argument\n", argv[0]);
usage(argv[0]);
exit(EX_USAGE);
}
if (smfi_register(smfilter) == MI_FAILURE)
{
fprintf(stderr, "smfi_register failed\n");
exit(EX_UNAVAILABLE);
}
return smfi_main();
}
/* eof */
This sample program logs each message to a separate temporary file,
adds a recipient given with the -a flag, and rejects a disallowed recipient
address given with the -r flag. The sample program recognizes the
following options:
-p port Specifies the port through which Sendmail connects to
the filter.
-t sec Specifies the timeout value.
-r addr Specifies a recipient to reject.
-a addr Specifies a recipient to add.