smfi_setreply.html revision 90792
1<html>
2<head><title>smfi_setreply</title></head>
3<body>
4<h1>smfi_setreply</h1>
5
6<table border="0" cellspacing=4 cellpadding=4>
7<!---------- Synopsis ----------->
8<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
9<pre>
10#include &lt;libmilter/mfapi.h&gt;
11int smfi_setreply(
12	SMFICTX *ctx,
13	char *rcode,
14	char *xcode,
15	char *message
16);
17</pre>
18Set the default SMTP error reply code.
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_setreply may be called from any of the xxfi_ callbacks.</td>
27</tr>
28<tr align="left" valign=top>
29<th width="80">Effects</th>
30<td>Directly set the SMTP error reply code for this connection.  This code 
31will be used on subsequent error replies resulting from actions taken by 
32this filter.</td>
33</tr>
34</table>
35
36<!----------- Arguments ---------->
37<tr><th valign="top" align=left>ARGUMENTS</th><td>
38    <table border="1" cellspacing=0>
39    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
40    <tr valign="top"><td>ctx</td>
41	<td>Opaque context structure.
42	</td></tr>
43    <tr valign="top"><td>rcode</td>
44	<td>The three-digit (RFC 821) SMTP reply code, as a null-terminated string.  rcode cannot be NULL, and must be a valid reply code.
45	</td></tr>
46    <tr valign="top"><td>xcode</td>
47	<td>The extended (RFC 2034) reply code.  If xcode is NULL, no extended code is used.  Otherwise, xcode must conform to RFC 2034.
48	</td></tr>
49    <tr valign="top"><td>message</td>
50	<td>The text part of the SMTP reply.  If message is NULL, an empty message is used.
51	</td></tr>
52    </table>
53</td></tr>
54
55<!----------- Return values ---------->
56<tr>
57<th valign="top" align=left>RETURN VALUES</th> 
58
59<td>smfi_setreply will fail and return MI_FAILURE if:
60<ul>
61    <li>The rcode or xcode argument is invalid.
62    <li>A memory-allocation failure occurs.
63</ul>
64Otherwise, it return MI_SUCCESS.
65</td>
66</tr>
67
68<!----------- Notes ---------->
69<tr align="left" valign=top>
70<th>NOTES</th> 
71<td>
72<ul>
73<li>Values passed to smfi_setreply are not checked for standards compliance.
74<li>For details about reply codes and their meanings, please see RFC's 
75<a href="http://www.cis.ohio-state.edu/htbin/rfc/rfc821.html">821</a>
76and <a href="http://www.cis.ohio-state.edu/htbin/rfc/rfc2034.html">2034</a>.
77</ul>
78</td>
79</tr>
80
81</table>
82
83<hr size="1">
84<font size="-1">
85Copyright (c) 2000 Sendmail, Inc. and its suppliers.
86All rights reserved.
87<br>
88By using this file, you agree to the terms and conditions set
89forth in the <a href="LICENSE.txt">LICENSE</a>.
90</font>
91</body>
92</html>
93