Milter xxfi_eoh()

Process end of headers All Milter versions

The message is passed in the DATA phase of the SMTP transaction. The message is composed of headers first, then a blank line, and lastly the message body. Each header line is processed by your xxfi_header() function, if used. After all headers have been processed, but before the message body is processed, this xxfi_eoh() function, if used, is called.

The xxfi_eoh() function is called like this:

sfsistat
xxfi_eoh(SMFICTX *ctx)

Here, ctx is the context pointer passed to all xxfi_ functions to maintain state in a multi-threaded environment, and it is the only argument.

It is up to you and your code to have cached any decisions about headers for later use by this xxfi_eoh() function.

The xxfi_eoh() function can return any of several values that determine the further handling of the current envelope:

SMFIS_CONTINUE

Allow the current envelope and continue handling the current envelope. This is the default return value if you don’t declare an end-of-headers handler in smfiDesc (Milter smfi_register() on page 1194).

SMFIS_ACCEPT

Accept the current envelope. Your Milter will not be called again for this envelope but will have xxfi_close() called at the end of the connection. Note that despite your acceptance, this envelope may still be rejected by a later Milter. Also note that this accepts only the current envelope. If there are more envelopes on the current connection, your Milter will still be called for each.

SMFIS_REJECT

Reject the current ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.