NAME
smfi_opensocket() — attempts to create the interface socket that MTAs use to connect to the filter
SYNOPSIS
#include <libmilter/mfapi.h>
int smfi_opensocket (
bool rmsocket
);
PARAMETERS
The
smfi_opensocket()
contains the following parameters:
- rmsocket
A flag that indicates whether the library must try to remove any existing
UNIX domain socket before attempting to create a new socket.
DESCRIPTION
The
smfi_opensocket()
routine is used to create the socket specified
previously by a call to the
smfi_setconn()
routine, which is the
interface between Mail Transfer Agents (MTAs) and the filter.
The
smfi_setconn()
routine allows the calling application to ensure that the socket can be created.
If
smfi_opensocket()
is
not called, the
smfi_main()
routine does it implicitly.
The
smfi_opensocket()
routine
is called only from program mainline before calling the
smfi_main()
routine.
RETURN VALUE
Following are the possible reasons when the
smfi_opensocket()
routine fails and returns
MI_FAILURE:
The interface socket is not created.
When
rmsocket
is true, either the socket is not
examined or the socket exists and cannot be removed.
The
smfi_setconn()
routine is not called.
AUTHOR
The
smfi_opensocket()
routine was developed was the Sendmail Inc.