xref: /freebsd/contrib/sendmail/libmilter/docs/smfi_setreply.html (revision 4026605903c0ab8df33c4ae8c419acdb2b652af8)
140266059SGregory Neil Shapiro<html>
240266059SGregory Neil Shapiro<head><title>smfi_setreply</title></head>
340266059SGregory Neil Shapiro<body>
440266059SGregory Neil Shapiro<h1>smfi_setreply</h1>
540266059SGregory Neil Shapiro
640266059SGregory Neil Shapiro<table border="0" cellspacing=4 cellpadding=4>
740266059SGregory Neil Shapiro<!---------- Synopsis ----------->
840266059SGregory Neil Shapiro<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
940266059SGregory Neil Shapiro<pre>
1040266059SGregory Neil Shapiro#include &lt;libmilter/mfapi.h&gt;
1140266059SGregory Neil Shapiroint smfi_setreply(
1240266059SGregory Neil Shapiro	SMFICTX *ctx,
1340266059SGregory Neil Shapiro	char *rcode,
1440266059SGregory Neil Shapiro	char *xcode,
1540266059SGregory Neil Shapiro	char *message
1640266059SGregory Neil Shapiro);
1740266059SGregory Neil Shapiro</pre>
1840266059SGregory Neil ShapiroSet the default SMTP error reply code.
1940266059SGregory Neil Shapiro</td></tr>
2040266059SGregory Neil Shapiro
2140266059SGregory Neil Shapiro<!----------- Description ---------->
2240266059SGregory Neil Shapiro<tr><th valign="top" align=left>DESCRIPTION</th><td>
2340266059SGregory Neil Shapiro<table border="1" cellspacing=1 cellpadding=4>
2440266059SGregory Neil Shapiro<tr align="left" valign=top>
2540266059SGregory Neil Shapiro<th width="80">Called When</th>
2640266059SGregory Neil Shapiro<td>smfi_setreply may be called from any of the xxfi_ callbacks.</td>
2740266059SGregory Neil Shapiro</tr>
2840266059SGregory Neil Shapiro<tr align="left" valign=top>
2940266059SGregory Neil Shapiro<th width="80">Effects</th>
3040266059SGregory Neil Shapiro<td>Directly set the SMTP error reply code for this connection.  This code
3140266059SGregory Neil Shapirowill be used on subsequent error replies resulting from actions taken by
3240266059SGregory Neil Shapirothis filter.</td>
3340266059SGregory Neil Shapiro</tr>
3440266059SGregory Neil Shapiro</table>
3540266059SGregory Neil Shapiro
3640266059SGregory Neil Shapiro<!----------- Arguments ---------->
3740266059SGregory Neil Shapiro<tr><th valign="top" align=left>ARGUMENTS</th><td>
3840266059SGregory Neil Shapiro    <table border="1" cellspacing=0>
3940266059SGregory Neil Shapiro    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
4040266059SGregory Neil Shapiro    <tr valign="top"><td>ctx</td>
4140266059SGregory Neil Shapiro	<td>Opaque context structure.
4240266059SGregory Neil Shapiro	</td></tr>
4340266059SGregory Neil Shapiro    <tr valign="top"><td>rcode</td>
4440266059SGregory Neil Shapiro	<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.
4540266059SGregory Neil Shapiro	</td></tr>
4640266059SGregory Neil Shapiro    <tr valign="top"><td>xcode</td>
4740266059SGregory Neil Shapiro	<td>The extended (RFC 2034) reply code.  If xcode is NULL, no extended code is used.  Otherwise, xcode must conform to RFC 2034.
4840266059SGregory Neil Shapiro	</td></tr>
4940266059SGregory Neil Shapiro    <tr valign="top"><td>message</td>
5040266059SGregory Neil Shapiro	<td>The text part of the SMTP reply.  If message is NULL, an empty message is used.
5140266059SGregory Neil Shapiro	</td></tr>
5240266059SGregory Neil Shapiro    </table>
5340266059SGregory Neil Shapiro</td></tr>
5440266059SGregory Neil Shapiro
5540266059SGregory Neil Shapiro<!----------- Return values ---------->
5640266059SGregory Neil Shapiro<tr>
5740266059SGregory Neil Shapiro<th valign="top" align=left>RETURN VALUES</th>
5840266059SGregory Neil Shapiro
5940266059SGregory Neil Shapiro<td>smfi_setreply will fail and return MI_FAILURE if:
6040266059SGregory Neil Shapiro<ul>
6140266059SGregory Neil Shapiro    <li>The rcode or xcode argument is invalid.
6240266059SGregory Neil Shapiro    <li>A memory-allocation failure occurs.
6340266059SGregory Neil Shapiro</ul>
6440266059SGregory Neil ShapiroOtherwise, it return MI_SUCCESS.
6540266059SGregory Neil Shapiro</td>
6640266059SGregory Neil Shapiro</tr>
6740266059SGregory Neil Shapiro
6840266059SGregory Neil Shapiro<!----------- Notes ---------->
6940266059SGregory Neil Shapiro<tr align="left" valign=top>
7040266059SGregory Neil Shapiro<th>NOTES</th>
7140266059SGregory Neil Shapiro<td>
7240266059SGregory Neil Shapiro<ul>
7340266059SGregory Neil Shapiro<li>Values passed to smfi_setreply are not checked for standards compliance.
7440266059SGregory Neil Shapiro<li>For details about reply codes and their meanings, please see RFC's
7540266059SGregory Neil Shapiro<a href="http://www.cis.ohio-state.edu/htbin/rfc/rfc821.html">821</a>
7640266059SGregory Neil Shapiroand <a href="http://www.cis.ohio-state.edu/htbin/rfc/rfc2034.html">2034</a>.
7740266059SGregory Neil Shapiro</ul>
7840266059SGregory Neil Shapiro</td>
7940266059SGregory Neil Shapiro</tr>
8040266059SGregory Neil Shapiro
8140266059SGregory Neil Shapiro</table>
8240266059SGregory Neil Shapiro
8340266059SGregory Neil Shapiro<hr size="1">
8440266059SGregory Neil Shapiro<font size="-1">
8540266059SGregory Neil ShapiroCopyright (c) 2000 Sendmail, Inc. and its suppliers.
8640266059SGregory Neil ShapiroAll rights reserved.
8740266059SGregory Neil Shapiro<br>
8840266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set
8940266059SGregory Neil Shapiroforth in the <a href="LICENSE.txt">LICENSE</a>.
9040266059SGregory Neil Shapiro</font>
9140266059SGregory Neil Shapiro</body>
9240266059SGregory Neil Shapiro</html>
93