Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / sendmail / libmilter / docs / smfi_setreply.html
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;
11 int smfi_setreply(
12         SMFICTX *ctx,
13         char *rcode,
14         char *xcode,
15         char *message
16 );
17 </pre>
18 Set 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
27 other than xxfi_connect.</td>
28 </tr>
29 <tr align="left" valign=top>
30 <th width="80">Effects</th>
31 <td>Directly set the SMTP error reply code for this connection.  This code 
32 will be used on subsequent error replies resulting from actions taken by 
33 this filter.</td>
34 </tr>
35 </table>
36
37 <!----------- Arguments ---------->
38 <tr><th valign="top" align=left>ARGUMENTS</th><td>
39     <table border="1" cellspacing=0>
40     <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
41     <tr valign="top"><td>ctx</td>
42         <td>Opaque context structure.
43         </td></tr>
44     <tr valign="top"><td>rcode</td>
45         <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.
46         </td></tr>
47     <tr valign="top"><td>xcode</td>
48         <td>The extended (RFC 2034) reply code.  If xcode is NULL, no extended code is used.  Otherwise, xcode must conform to RFC 2034.
49         </td></tr>
50     <tr valign="top"><td>message</td>
51         <td>The text part of the SMTP reply.  If message is NULL, an empty message is used.
52         </td></tr>
53     </table>
54 </td></tr>
55
56 <!----------- Return values ---------->
57 <tr>
58 <th valign="top" align=left>RETURN VALUES</th> 
59
60 <td>smfi_setreply will fail and return MI_FAILURE if:
61 <ul>
62     <li>The rcode or xcode argument is invalid.
63     <li>A memory-allocation failure occurs.
64 </ul>
65 Otherwise, it return MI_SUCCESS.
66 </td>
67 </tr>
68
69 <!----------- Notes ---------->
70 <tr align="left" valign=top>
71 <th>NOTES</th> 
72 <td>
73 <ul>
74 <li>Values passed to smfi_setreply are not checked for standards compliance.
75 <li>For details about reply codes and their meanings, please see RFC's 
76 <a href="http://www.rfc-editor.org/rfc/rfc821.txt">821</a>
77 and <a href="http://www.rfc-editor.org/rfc/rfc2034.txt">2034</a>.
78 <li>If the reply code (rcode) given is a '4XX' code but SMFI_REJECT is used
79 for the message, the custom reply is not used.
80 <li>Similarly, if the reply code (rcode) given is a '5XX' code but
81 SMFI_TEMPFAIL is used for the message, the custom reply is not used.
82 </ul>
83 </td>
84 </tr>
85
86 </table>
87
88 <hr size="1">
89 <font size="-1">
90 Copyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
91 All rights reserved.
92 <br>
93 By using this file, you agree to the terms and conditions set
94 forth in the LICENSE.
95 </font>
96 </body>
97 </html>