Sendmail 8.13.3 Programmer's Guide

Milter APIs
Callbacks
Chapter 244
data to the filter application until the client closes down the
connection. This is this time when xxfi_close() is called to close
the connection.
xxfi_close() is called on close even if the previous mail transaction
was aborted.
xxfi_close() is responsible for freeing any resource allocated on a
per-connection basis.
The filter application ignores the return value of xxfi_close()
because after the connection is closed, the return value does not hold
any importance.
Argument
You must call xxfi_close() with the ctx argument, which specifies an
opaque context structure.