xxfi_connect.html revision 132943
1<html>
2<head><title>xxfi_connect</title></head>
3<body>
4<!--
5$Id: xxfi_connect.html,v 1.13 2003/10/29 22:54:16 msk Exp $
6-->
7<h1>xxfi_connect</h1>
8
9<table border="0" cellspacing=4 cellpadding=4>
10<!---------- Synopsis ----------->
11<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
12<pre>
13#include &lt;libmilter/mfapi.h&gt;
14sfsistat (*xxfi_connect)(
15        SMFICTX    *ctx, 
16        char       *hostname,
17        _SOCK_ADDR *hostaddr);
18</pre>
19</td></tr>
20<!----------- Description ---------->
21<tr><th valign="top" align=left>DESCRIPTION</th><td>
22<table border="1" cellspacing=1 cellpadding=4>
23<tr>
24<th valign="top" align=left width=80>Called When</th>
25<td>Once, at the start of each SMTP connection.</td>
26</tr>
27<tr>
28<th valign="top" align=left width=80>Default Behavior</th>
29<td>Do nothing; return SMFIS_CONTINUE.</td>
30</tr>
31</table>
32<!--
33This callback function is invoked on each connection to the mail 
34filter program.  The callback is to be implemented by the Milter
35application developers.  The name of the callback can be any valid
36function name.  The function pointer is to be assigned to the
37smfiDesc.xxfi_connect and the pointer to the smfiDesc structure
38is passed to smfi_register().
39</td></tr>
40-->
41<!----------- Arguments ---------->
42<tr><th valign="top" align=left>ARGUMENTS</th><td>
43    <table border="1" cellspacing=0>
44    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
45    <tr><td>ctx</td>
46	<td>the opaque context structure.
47	</td></tr>
48    <tr><td>hostname</td>
49	<td>the host name of the message sender, as determined by a
50	    reverse lookup on the host address.  If the reverse lookup
51	    fails, hostname will contain the message sender's IP
52	    address enclosed in square brackets (e.g. `[a.b.c.d]').
53	</td></tr>
54    <tr><td>hostaddr</td>
55	<td>the host address, as determined by a getpeername() call on the SMTP socket.
56	 NULL if the type is not supported in the current version or if
57	the SMTP connection is made via stdin.
58	</td></tr>
59    </table>
60</td></tr>
61<!----------- Return values ---------->
62<!--
63<tr>
64<th valign="top" align=left>SPECIAL RETURN VALUES</th>
65<td><table border="1" cellspacing=0>
66  <tr bgcolor="#dddddd"><th>Return value</th><th>Description</th></tr>
67  <tr valign="top">
68     <td>SMFIS_ACCEPT</td>
69     <td>Accept all commands and messages from this client without any
70         further contact with the filter. </td>
71     </td>
72  </tr>
73  <tr valign="top">
74     <td>SMFIS_CONTINUE</td>
75     <td>Continue normal processing. </td>
76  </tr>
77  <tr valign="top">
78     <td>SMFIS_DISCARD</td>
79     <td>Undefined behaviour; do not use. </td>
80  </tr>
81  <tr valign="top">
82     <td>SMFIS_TEMPFAIL</td>
83     <td>Reject all commands and messages from this client with a
84         temporary failure reply code.  If also used in conjunction
85         with <tt>smfi_setreply()</tt> to set a reply whose SMTP
86         code is 421, the MTA will drop the connection immediately. </td>
87  </tr>
88  <tr valign="top">
89     <td>SMFIS_REJECT</td>
90     <td>Reject all commands and messages from this client with a
91         permanent failure reply code. </td>
92  </tr>
93</table>
94</tr>
95-->
96<!----------- Notes ---------->
97<tr>
98<th valign="top" align=left>NOTES</th> 
99<td>If an earlier filter rejects the connection in its xxfi_connect()
100routine, this filter's xxfi_connect() will not be called.</td>
101</tr>
102</table>
103
104<hr size="1">
105<font size="-1">
106Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
107All rights reserved.
108<br>
109By using this file, you agree to the terms and conditions set
110forth in the LICENSE.
111</font>
112</body>
113</html>
114