2 <HEAD><TITLE>smfi_setconn</TITLE></HEAD>
5 $Id: smfi_setconn.html,v 1.17 2006/12/21 18:30:35 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>
34 <!----------- Arguments ---------->
35 <TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
36 <TABLE border="1" cellspacing=0>
37 <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
38 <TR valign="top"><TD>oconn</TD>
39 <TD>The address of the desired communication socket.
40 The address should be a NULL-terminated string in "proto:address"
43 <LI><CODE>{unix|local}:/path/to/file</CODE> -- A named pipe.
44 <LI><CODE>inet:port@{hostname|ip-address}</CODE> -- An IPV4 socket.
45 <LI><CODE>inet6:port@{hostname|ip-address}</CODE> -- An IPV6 socket.
51 <!----------- Return values ---------->
53 <TH valign="top" align=left>RETURN VALUES</TH>
55 <TD>smfi_setconn will not fail on an invalid address.
56 The failure will only be detected in <A href="smfi_main.html">smfi_main</A>.
57 Nevertheless, smfi_setconn may fail for other reasons, e.g.,
58 due to a lack of memory.
63 <TH valign="top" align=left>NOTES</TH>
67 <LI>If possible, filters should not run as root when communicating
68 over unix/local domain sockets.
69 <LI>Unix/local sockets should have their permissions set to
70 0600 (read/write permission only for the socket's owner) or
71 0660 (read/write permission for the socket's owner and group)
72 which is useful if the sendmail RunAsUser option is used.
73 The permissions for a unix/local domain socket are determined as
74 usual by <CODE>umask</CODE>, which should be set to 007 or 077.
75 Note some operating systems (e.g, Solaris) don't use the
76 permissions of the socket. On those systems, place the socket in a
86 Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
89 By using this file, you agree to the terms and conditions set