Sendmail 8.13.3 Programmer's Guide
Table Of Contents

Milter APIs
Callbacks
Chapter 2 43
• xxfi_abort() must reclaim any resource allocated on a per-message
basis and must be tolerant of being called between any two
message-oriented callbacks.
• Calls to xxfi_abort() and xxfi_eom() are mutually exclusive.
• xxfi_abort() is not responsible for reclaiming connection-specific
data because xxfi_close() is always called when a connection is
closed.
• Because xxfi_abort() aborts the message, the filter application
ignores the return value of xxfi_abort().
• xxfi_abort() is called only if the message is aborted outside the
control of the filter application and if the filter application has not
completed its message-oriented processing. For example, if a filter
has already returned the values SMFIS_ACCEPT, SMFIS_REJECT, or
SMFIS_DISCARD from a message-oriented routine, xxfi_abort() is
not called even if the message is aborted later outside its control.
Argument
You must call xxfi_abort() with the ctx argument, which specifies an
opaque context structure.
The xxfi_close() Callback
The xxfi_close() callback denotes that the current connection is
closed. It returns the SMFIS_CONTINUE value to the calling filter
application. The filter application always calls xxfi_close() once at the
end of each connection.
The declaration of xxfi_close() is as follows:
#include <libmilter/mfapi.h>
sfsistat (*xxfi_close)(
SMFICTX * ctx
);
Following are some points to consider regarding xxfi_close():
• You can call xxfi_close() in any order, that is, you can call
xxfi_close() even before calling xxfi_connect(). After
establishing a connection with the filter application, if Sendmail
decides to discard the traffic of a connection, Sendmail does not pass