2 <HEAD><TITLE>smfi_setconn</TITLE></HEAD>
5 $Id: smfi_setconn.html,v 1.18 2013-11-22 20:51:39 ca Exp $
9 <TABLE border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
13 #include <libmilter/mfapi.h>
18 Set the socket through which this filter should communicate with sendmail.
21 <!----------- Description ---------->
22 <TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
23 <TABLE border="1" cellspacing=1 cellpadding=4>
24 <TR align="left" valign=top>
25 <TH width="80">Called When</TH>
26 <TD>smfi_setconn must be called once before <A href="smfi_main.html">smfi_main</A>.</TD>
28 <TR align="left" valign=top>
29 <TH width="80">Effects</TH>
30 <TD>Sets the socket through which the filter communicates with sendmail.</TD>
35 <!----------- Arguments ---------->
36 <TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
37 <TABLE border="1" cellspacing=0>
38 <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
39 <TR valign="top"><TD>oconn</TD>
40 <TD>The address of the desired communication socket.
41 The address should be a NULL-terminated string in "proto:address"
44 <LI><CODE>{unix|local}:/path/to/file</CODE> -- A named pipe.
45 <LI><CODE>inet:port@{hostname|ip-address}</CODE> -- An IPV4 socket.
46 <LI><CODE>inet6:port@{hostname|ip-address}</CODE> -- An IPV6 socket.
52 <!----------- Return values ---------->
54 <TH valign="top" align=left>RETURN VALUES</TH>
56 <TD>smfi_setconn will not fail on an invalid address.
57 The failure will only be detected in <A href="smfi_main.html">smfi_main</A>.
58 Nevertheless, smfi_setconn may fail for other reasons, e.g.,
59 due to a lack of memory.
64 <TH valign="top" align=left>NOTES</TH>
68 <LI>If possible, filters should not run as root when communicating
69 over unix/local domain sockets.
70 <LI>Unix/local sockets should have their permissions set to
71 0600 (read/write permission only for the socket's owner) or
72 0660 (read/write permission for the socket's owner and group)
73 which is useful if the sendmail RunAsUser option is used.
74 The permissions for a unix/local domain socket are determined as
75 usual by <CODE>umask</CODE>, which should be set to 007 or 077.
76 Note some operating systems (e.g, Solaris) don't use the
77 permissions of the socket. On those systems, place the socket in a
87 Copyright (c) 2000, 2003 Proofpoint, Inc. and its suppliers.
90 By using this file, you agree to the terms and conditions set