Milter smfi_opensocket()
Actually set up the listening connection V8.13 and later
After you call smfi_setconn
() (Milter smfi_setconn()
on page 1197) to declare the socket on which the
Milter will listen, you may call the smfi_opensocket
()
library routine which actually causes the Milter to
set up that socket for listening. The smfi_opensocket
()
library routine is called like this:
ret = smfi_opensocket(flag
);
Here, the flag
tells the
Milter to remove an existing Unix domain socket
before creating a new one. If the
flag
is true (nonzero),
the socket is removed; otherwise, it is not. If the
socket is not a Unix domain socket, this
flag
has no
effect.
Any error in opening the socket will return a value
other than MI_SUCCESS. If that occurs, you should
print or log the error and close down the Milter.
Note that if you don’t use this new routine, the
socket will still be opened automatically by the
smfi_main
()
routine (Milter smfi_main() on
page 1193).
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.