smfi_setreply.html revision 94334
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 <libmilter/mfapi.h> 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.rfc-editor.org/rfc/rfc821.txt">821</a> 76and <a href="http://www.rfc-editor.org/rfc/rfc2034.txt">2034</a>. 77<li>If the reply code (rcode) given is a '4XX' code but SMFI_REJECT is used 78for the message, the custom reply is not used. 79<li>Similarly, if the reply code (rcode) given is a '5XX' code but 80SMFI_TEMPFAIL is used for the message, the custom reply is not used. 81</ul> 82</td> 83</tr> 84 85</table> 86 87<hr size="1"> 88<font size="-1"> 89Copyright (c) 2000, 2002 Sendmail, Inc. and its suppliers. 90All rights reserved. 91<br> 92By using this file, you agree to the terms and conditions set 93forth in the <a href="LICENSE.txt">LICENSE</a>. 94</font> 95</body> 96</html> 97