# smfi_setreply

SYNOPSIS |
    #include <libmilter/mfapi.h>
    int smfi_setreply(
    	SMFICTX *ctx,
    	char *rcode,
    	char *xcode,
    	char *message
    );
Set the default SMTP error reply code.
DESCRIPTION |
Called When | smfi_setreply may be called from any of the xxfi_ callbacks.
Effects | Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter.
ARGUMENTS |
Argument | Description
--- | ---
ctx | Opaque context structure.
rcode | The three-digit (RFC 821) SMTP reply code, as a null-terminated string. rcode cannot be NULL, and must be a valid reply code.
xcode | The extended (RFC 2034) reply code. If xcode is NULL, no extended code is used. Otherwise, xcode must conform to RFC 2034.
message | The text part of the SMTP reply. If message is NULL, an empty message is used.
RETURN VALUES | smfi_setreply will fail and return MI_FAILURE if: The rcode or xcode argument is invalid. A memory-allocation failure occurs. Otherwise, it return MI_SUCCESS.
NOTES | Values passed to smfi_setreply are not checked for standards compliance. For details about reply codes and their meanings, please see RFC's 821 and 2034.

Copyright (c) 2000 Sendmail, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.