2002-02-17 21:56:45 +00:00
|
|
|
<html>
|
|
|
|
<head><title>smfi_setconn</title></head>
|
|
|
|
<body>
|
2004-08-01 01:04:57 +00:00
|
|
|
<!--
|
|
|
|
$Id: smfi_setconn.html,v 1.14 2003/05/26 05:09:16 gshapiro Exp $
|
|
|
|
-->
|
2002-02-17 21:56:45 +00:00
|
|
|
<h1>smfi_setconn</h1>
|
|
|
|
|
|
|
|
<table border="0" cellspacing=4 cellpadding=4>
|
|
|
|
<!---------- Synopsis ----------->
|
|
|
|
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
|
|
|
<pre>
|
|
|
|
#include <libmilter/mfapi.h>
|
|
|
|
int smfi_setconn(
|
|
|
|
char *oconn;
|
|
|
|
);
|
|
|
|
</pre>
|
|
|
|
Set the socket through which this filter should communicate with sendmail.
|
|
|
|
</td></tr>
|
|
|
|
|
|
|
|
<!----------- Description ---------->
|
|
|
|
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
|
|
|
<table border="1" cellspacing=1 cellpadding=4>
|
|
|
|
<tr align="left" valign=top>
|
|
|
|
<th width="80">Called When</th>
|
|
|
|
<td>smfi_setconn must be called once before <a href="smfi_main.html">smfi_main</a>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr align="left" valign=top>
|
|
|
|
<th width="80">Effects</th>
|
|
|
|
<td>Sets the socket through which the filter communicates with sendmail.</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<!----------- Arguments ---------->
|
|
|
|
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
|
|
|
<table border="1" cellspacing=0>
|
|
|
|
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
|
|
|
<tr valign="top"><td>oconn</td>
|
|
|
|
<td>The address of the desired communication socket.
|
|
|
|
The address should be a NULL-terminated string in "proto:address"
|
|
|
|
format:
|
|
|
|
<ul>
|
|
|
|
<li><code>{unix|local}:/path/to/file</code> -- A named pipe.
|
|
|
|
<li><code>inet:port@{hostname|ip-address}</code> -- An IPV4 socket.
|
|
|
|
<li><code>inet6:port@{hostname|ip-address}</code> -- An IPV6 socket.
|
|
|
|
</ul>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
</td></tr>
|
|
|
|
|
|
|
|
<!----------- Return values ---------->
|
|
|
|
<tr>
|
|
|
|
<th valign="top" align=left>RETURN VALUES</th>
|
|
|
|
|
2003-03-29 19:12:53 +00:00
|
|
|
<td>smfi_setconn will not fail on an invalid address.
|
|
|
|
The failure will only be detected in <a href="smfi_main.html">smfi_main</a></td>.
|
|
|
|
Nevertheless, smfi_setconn may fail for other reasons, e.g.,
|
|
|
|
due to a lack of memory.
|
2002-02-17 21:56:45 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<th valign="top" align=left>NOTES</th>
|
|
|
|
|
|
|
|
<td>
|
2003-03-29 19:12:53 +00:00
|
|
|
<ul>
|
|
|
|
<li>If possible, filters should not run as root when communicating
|
|
|
|
over unix/local domain sockets.
|
|
|
|
<li>Unix/local sockets should have their permissions set to
|
|
|
|
0600 (read/write permission only for the socket's owner) or
|
|
|
|
0660 (read/write permission for the socket's owner and group)
|
|
|
|
which is useful if the sendmail RunAsUser option is used.
|
|
|
|
The permissions for a unix/local domain socket are determined as
|
2003-09-19 23:11:30 +00:00
|
|
|
usual by <code>umask</code>, which should be set to 007 or 077.
|
|
|
|
Note some operating systems (e.g, Solaris) don't use the
|
|
|
|
permissions of the socket. On those systems, place the socket in a
|
|
|
|
protected directory.
|
2002-02-17 21:56:45 +00:00
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<hr size="1">
|
|
|
|
<font size="-1">
|
2003-03-29 19:12:53 +00:00
|
|
|
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
2002-02-17 21:56:45 +00:00
|
|
|
All rights reserved.
|
|
|
|
<br>
|
|
|
|
By using this file, you agree to the terms and conditions set
|
2003-03-29 19:12:53 +00:00
|
|
|
forth in the LICENSE.
|
2002-02-17 21:56:45 +00:00
|
|
|
</font>
|
|
|
|
</body>
|
|
|
|
</html>
|