2 <head><title>smfi_setconn</title></head>
5 $Id: smfi_setconn.html,v 1.14 2003/05/26 05:09:16 gshapiro Exp $
9 <table border="0" cellspacing=4 cellpadding=4>
10 <!---------- Synopsis ----------->
11 <tr><th valign="top" align=left width=150>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></td>.
57 Nevertheless, smfi_setconn may fail for other reasons, e.g.,
58 due to a lack of memory.
62 <th valign="top" align=left>NOTES</th>
66 <li>If possible, filters should not run as root when communicating
67 over unix/local domain sockets.
68 <li>Unix/local sockets should have their permissions set to
69 0600 (read/write permission only for the socket's owner) or
70 0660 (read/write permission for the socket's owner and group)
71 which is useful if the sendmail RunAsUser option is used.
72 The permissions for a unix/local domain socket are determined as
73 usual by <code>umask</code>, which should be set to 007 or 077.
74 Note some operating systems (e.g, Solaris) don't use the
75 permissions of the socket. On those systems, place the socket in a
85 Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
88 By using this file, you agree to the terms and conditions set