2 <head><title>smfi_setreply</title></head>
6 <table border="0" cellspacing=4 cellpadding=4>
7 <!---------- Synopsis ----------->
8 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
10 #include <libmilter/mfapi.h>
18 Set the default SMTP error reply code.
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>
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
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.
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.
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.
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.
56 <!----------- Return values ---------->
58 <th valign="top" align=left>RETURN VALUES</th>
60 <td>smfi_setreply will fail and return MI_FAILURE if:
62 <li>The rcode or xcode argument is invalid.
63 <li>A memory-allocation failure occurs.
65 Otherwise, it return MI_SUCCESS.
69 <!----------- Notes ---------->
70 <tr align="left" valign=top>
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.
90 Copyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
93 By using this file, you agree to the terms and conditions set