Sendmail 8.13.3 Programmer's Guide
Table Of Contents

Milter APIs
Library Control APIs
Chapter 2 13
Table 2-1 describes the bitwise OR of zero or more values, which the
xxfi_flags field can contain. The table also describes the possible
actions of the filter.
Return Values
The smfi_register() API returns MI_FAILURE because of the following
reasons:
• Memory allocation failure
• Incompatible version or illegal value of flags
The smfi_setconn() API
You can use the smfi_setconn() API to set the socket through which a
filter must communicate with Sendmail. You must call setconn() before
calling the smfi_main() API.
The declaration of smfi_setconn() is as follows:
#include <libmilter/mfapi.h>
int smfi_setconn{
char *oconn;
};
Do not run filters as a root user when communicating over UNIX or
local domain sockets.
Table 2-1 The xxfi_flags Field Values
Flag Description
SMFIF_ADDHDRS Adds headers.
SMFIF_CHGHDRS Changes and deletes headers.
SMFIF_CHGBODY Replaces the body of the messageduring
filtering. This can have significant
performance impact if other filters filter the
body after this filter.
SMFIF_ADDRCPT Adds recipients to the message.
SMFIF_DELRCPT Removes recipients from the message.