bounce_error_classify

March 26, 2020 Contributors

Name

bounce_error_classify — Classify a buffer in the context of an out-of-band bounce

Synopsis

#include "misc/smtp_error_classify.h"

| int **bounce_error_classify** ( | body, |   |
|   | body_len, |   |
|   | orig_rcpt, |   |
|   | ignorelist, |   |
|   | mid); |   |

const char * <var class="pdparam">body</var>;
int <var class="pdparam">body_len</var>;
char ** <var class="pdparam">orig_rcpt</var>;
const char * <var class="pdparam">ignorelist</var>;
message_id * <var class="pdparam">mid</var>;

Description

Deprecated

Use bounce_error_classify2 instead!

Classify a buffer in the context of an out-of-band bounce.

This function will NOT parse out RFC 3464 dispositions.

Starting with version 3.3.0, this function will simply call the core_bounce_error_classify_hook(), utilizing a cache for the result. If no hook is registered, this function will return BC_UNDETERMINED.

In earlier versions, additional heuristics were employed.

The caller is responsible for releasing the memory returned for orig_rcpt using free(3).

Prior to version 3.3.0, the body parameter was temporarily modified to truncate it at the terminator of the message. Since 3.3.0, an internal copy is constructed if body ends with <CRLF.CRLF>.

Parameters

body

A buffer containing the message body to parse.

body_len

How much of body to parse.

orig_rcpt

The likely recipient of the original message that bounced.

ignorelist

Ignored and unused.

mid

The message-id (to update the internal cache) – may be NULL.

Return Values

The SMTP classification ID.