Sendmail 8.13.3 Programmer's Guide

Milter APIs
Library Control APIs
Chapter 214
If you use the Sendmail RunAsUser option, you must set the permissions
for UNIX or local sockets to 0600 (read/write permission only for the
owner of the socket) or 0660 (read/write permission for the owner and
group of the socket). To determine the permission for a UNIX or local
domain socket, you can use the umask command and set umask to 007 or
077.
Arguments
You must call smfi_setconn() with the following argument:
oconn Specifies the address of the desired communication
socket. The address must be a NULL-terminated string
in the following proto:address format:
{unix|local}:/path/to/file – Specifies a
named pipe.
inet:port@{hostname|ip-address} – Specifies
an IPV4 socket.
inet6:port@{hostname|ip-address} – Specifies
an IPV6 socket.
Return Value
The smfi_setconn() API does not fail on an invalid address. The failure
is only detected in the smfi_main() API.
The smfi_settimeout() API
You can use the smfi_settimeout() API to set the connection timeout
value of the filter. The connection timeout value specifies the number of
seconds the libmilter library must wait for an MTA connection before
timing out a socket. If the filter application does not call
smfi_settimout(), the filter application uses a default timeout value of
7210 seconds.
The declaration of smfi_settimout() is as follows:
#include <libmilter/mfapi.h>
int smfi_settimeout(
int otimeout
);
Arguments
You must call smfi_settimeout() with the following argument: