1<HTML> 2<HEAD><TITLE>smfi_setconn</TITLE></HEAD> 3<BODY> 4<!-- 5$Id: smfi_setconn.html,v 1.18 2013-11-22 20:51:39 ca Exp $ 6--> 7<H1>smfi_setconn</H1> 8 9<TABLE border="0" cellspacing=4 cellpadding=4> 10<!---------- Synopsis -----------> 11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12<PRE> 13#include <libmilter/mfapi.h> 14int smfi_setconn( 15 char *oconn; 16); 17</PRE> 18Set the socket through which this filter should communicate with sendmail. 19</TD></TR> 20 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> 27</TR> 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> 31</TR> 32</TABLE> 33 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" 41 format: 42 <UL> 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. 46 </UL> 47 </TD></TR> 48 </TABLE> 49</TD></TR> 50 51<!----------- Return values ----------> 52<TR> 53<TH valign="top" align=left>RETURN VALUES</TH> 54 55<TD>smfi_setconn will not fail on an invalid address. 56The failure will only be detected in <A href="smfi_main.html">smfi_main</A>. 57Nevertheless, smfi_setconn may fail for other reasons, e.g., 58due to a lack of memory. 59</TD> 60</TR> 61 62<TR> 63<TH valign="top" align=left>NOTES</TH> 64 65<TD> 66<UL> 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 77 protected directory. 78</UL> 79</TD> 80</TR> 81 82</TABLE> 83 84<HR size="1"> 85<FONT size="-1"> 86Copyright (c) 2000, 2003 Proofpoint, Inc. and its suppliers. 87All rights reserved. 88<BR> 89By using this file, you agree to the terms and conditions set 90forth in the LICENSE. 91</FONT> 92</BODY> 93</HTML> 94