smfi_setreply.html revision 111823
1117521Snjl<html> 2127175Snjl<head><title>smfi_setreply</title></head> 3127175Snjl<body> 4127175Snjl<h1>smfi_setreply</h1> 5127175Snjl 6127175Snjl<table border="0" cellspacing=4 cellpadding=4> 7127175Snjl<!---------- Synopsis -----------> 8127175Snjl<tr><th valign="top" align=left width=150>SYNOPSIS</th><td> 9127175Snjl<pre> 10127175Snjl#include <libmilter/mfapi.h> 11127175Snjlint smfi_setreply( 12127175Snjl SMFICTX *ctx, 13127175Snjl char *rcode, 14127175Snjl char *xcode, 15127175Snjl char *message 16127175Snjl); 17127175Snjl</pre> 18127175SnjlSet the default SMTP error reply code. 19127175Snjl</td></tr> 20127175Snjl 21127175Snjl<!----------- Description ----------> 22127175Snjl<tr><th valign="top" align=left>DESCRIPTION</th><td> 23127175Snjl<table border="1" cellspacing=1 cellpadding=4> 24127175Snjl<tr align="left" valign=top> 25127175Snjl<th width="80">Called When</th> 26127175Snjl<td>smfi_setreply may be called from any of the xxfi_ callbacks 27127175Snjlother than xxfi_connect.</td> 28127175Snjl</tr> 29127175Snjl<tr align="left" valign=top> 30127175Snjl<th width="80">Effects</th> 31127175Snjl<td>Directly set the SMTP error reply code for this connection. This code 32127175Snjlwill be used on subsequent error replies resulting from actions taken by 33127175Snjlthis filter.</td> 34127175Snjl</tr> 35127175Snjl</table> 36127175Snjl 37127175Snjl<!----------- Arguments ----------> 38127175Snjl<tr><th valign="top" align=left>ARGUMENTS</th><td> 39127175Snjl <table border="1" cellspacing=0> 40127175Snjl <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr> 41127175Snjl <tr valign="top"><td>ctx</td> 42127175Snjl <td>Opaque context structure. 43127175Snjl </td></tr> 44127175Snjl <tr valign="top"><td>rcode</td> 45127175Snjl <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. 46127175Snjl </td></tr> 47127175Snjl <tr valign="top"><td>xcode</td> 48127175Snjl <td>The extended (RFC 2034) reply code. If xcode is NULL, no extended code is used. Otherwise, xcode must conform to RFC 2034. 49127175Snjl </td></tr> 50127175Snjl <tr valign="top"><td>message</td> 51127175Snjl <td>The text part of the SMTP reply. If message is NULL, an empty message is used. 52127175Snjl </td></tr> 53127175Snjl </table> 54127175Snjl</td></tr> 55127175Snjl 56127175Snjl<!----------- Return values ----------> 57127175Snjl<tr> 58127175Snjl<th valign="top" align=left>RETURN VALUES</th> 59127175Snjl 60127175Snjl<td>smfi_setreply will fail and return MI_FAILURE if: 61127175Snjl<ul> 62127175Snjl <li>The rcode or xcode argument is invalid. 63127175Snjl <li>A memory-allocation failure occurs. 64126372Snjl</ul> 65126372SnjlOtherwise, it return MI_SUCCESS. 66126372Snjl</td> 67126372Snjl</tr> 68126372Snjl 69126372Snjl<!----------- Notes ----------> 70126372Snjl<tr align="left" valign=top> 71126372Snjl<th>NOTES</th> 72126372Snjl<td> 73126372Snjl<ul> 74126372Snjl<li>Values passed to smfi_setreply are not checked for standards compliance. 75126372Snjl<li>For details about reply codes and their meanings, please see RFC's 76126372Snjl<a href="http://www.rfc-editor.org/rfc/rfc821.txt">821</a> 77126372Snjland <a href="http://www.rfc-editor.org/rfc/rfc2034.txt">2034</a>. 78126372Snjl<li>If the reply code (rcode) given is a '4XX' code but SMFI_REJECT is used 79126372Snjlfor the message, the custom reply is not used. 80126372Snjl<li>Similarly, if the reply code (rcode) given is a '5XX' code but 81126372SnjlSMFI_TEMPFAIL is used for the message, the custom reply is not used. 82126372Snjl</ul> 83126372Snjl</td> 84126372Snjl</tr> 85126372Snjl 86126372Snjl</table> 87126372Snjl 88126372Snjl<hr size="1"> 89126372Snjl<font size="-1"> 90126372SnjlCopyright (c) 2000, 2002 Sendmail, Inc. and its suppliers. 91126372SnjlAll rights reserved. 92126372Snjl<br> 93126372SnjlBy using this file, you agree to the terms and conditions set 94126372Snjlforth in the <a href="LICENSE.txt">LICENSE</a>. 95126372Snjl</font> 96126372Snjl</body> 97126372Snjl</html> 98126372Snjl