smfi_setreply.html revision 94334
1179090Sjb<html>
2179090Sjb<head><title>smfi_setreply</title></head>
3179090Sjb<body>
4179090Sjb<h1>smfi_setreply</h1>
5179090Sjb
6179090Sjb<table border="0" cellspacing=4 cellpadding=4>
7179090Sjb<!---------- Synopsis ----------->
8179090Sjb<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
9179090Sjb<pre>
10179090Sjb#include &lt;libmilter/mfapi.h&gt;
11179090Sjbint smfi_setreply(
12179090Sjb	SMFICTX *ctx,
13179090Sjb	char *rcode,
14179090Sjb	char *xcode,
15179090Sjb	char *message
16179090Sjb);
17179090Sjb</pre>
18179090SjbSet the default SMTP error reply code.
19179090Sjb</td></tr>
20179090Sjb
21179090Sjb<!----------- Description ---------->
22179090Sjb<tr><th valign="top" align=left>DESCRIPTION</th><td>
23179090Sjb<table border="1" cellspacing=1 cellpadding=4>
24179090Sjb<tr align="left" valign=top>
25179090Sjb<th width="80">Called When</th>
26179090Sjb<td>smfi_setreply may be called from any of the xxfi_ callbacks.</td>
27179090Sjb</tr>
28179090Sjb<tr align="left" valign=top>
29179090Sjb<th width="80">Effects</th>
30179090Sjb<td>Directly set the SMTP error reply code for this connection.  This code 
31179090Sjbwill be used on subsequent error replies resulting from actions taken by 
32179090Sjbthis filter.</td>
33179090Sjb</tr>
34179090Sjb</table>
35179090Sjb
36179090Sjb<!----------- Arguments ---------->
37179090Sjb<tr><th valign="top" align=left>ARGUMENTS</th><td>
38179090Sjb    <table border="1" cellspacing=0>
39179090Sjb    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
40219028Snetchild    <tr valign="top"><td>ctx</td>
41269752Smarkj	<td>Opaque context structure.
42179090Sjb	</td></tr>
43179090Sjb    <tr valign="top"><td>rcode</td>
44179090Sjb	<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.
45179090Sjb	</td></tr>
46219028Snetchild    <tr valign="top"><td>xcode</td>
47219028Snetchild	<td>The extended (RFC 2034) reply code.  If xcode is NULL, no extended code is used.  Otherwise, xcode must conform to RFC 2034.
48219028Snetchild	</td></tr>
49227293Sed    <tr valign="top"><td>message</td>
50179090Sjb	<td>The text part of the SMTP reply.  If message is NULL, an empty message is used.
51269752Smarkj	</td></tr>
52269752Smarkj    </table>
53269752Smarkj</td></tr>
54269752Smarkj
55269752Smarkj<!----------- Return values ---------->
56269752Smarkj<tr>
57269752Smarkj<th valign="top" align=left>RETURN VALUES</th> 
58269752Smarkj
59179090Sjb<td>smfi_setreply will fail and return MI_FAILURE if:
60179090Sjb<ul>
61179090Sjb    <li>The rcode or xcode argument is invalid.
62179090Sjb    <li>A memory-allocation failure occurs.
63211613Srpaulo</ul>
64211613SrpauloOtherwise, it return MI_SUCCESS.
65179090Sjb</td>
66179090Sjb</tr>
67179090Sjb
68179090Sjb<!----------- Notes ---------->
69179090Sjb<tr align="left" valign=top>
70179090Sjb<th>NOTES</th> 
71211614Srpaulo<td>
72179090Sjb<ul>
73179090Sjb<li>Values passed to smfi_setreply are not checked for standards compliance.
74179090Sjb<li>For details about reply codes and their meanings, please see RFC's 
75179090Sjb<a href="http://www.rfc-editor.org/rfc/rfc821.txt">821</a>
76179090Sjband <a href="http://www.rfc-editor.org/rfc/rfc2034.txt">2034</a>.
77211613Srpaulo<li>If the reply code (rcode) given is a '4XX' code but SMFI_REJECT is used
78179090Sjbfor the message, the custom reply is not used.
79179090Sjb<li>Similarly, if the reply code (rcode) given is a '5XX' code but
80179090SjbSMFI_TEMPFAIL is used for the message, the custom reply is not used.
81179090Sjb</ul>
82179090Sjb</td>
83179090Sjb</tr>
84179090Sjb
85179090Sjb</table>
86179090Sjb
87179090Sjb<hr size="1">
88211614Srpaulo<font size="-1">
89211613SrpauloCopyright (c) 2000, 2002 Sendmail, Inc. and its suppliers.
90179090SjbAll rights reserved.
91179090Sjb<br>
92179090SjbBy using this file, you agree to the terms and conditions set
93179090Sjbforth in the <a href="LICENSE.txt">LICENSE</a>.
94179090Sjb</font>
95179090Sjb</body>
96211614Srpaulo</html>
97179090Sjb