Sendmail 8.13.3 Programmer's Guide

Introduction
Milter Overview
Chapter 14
At various stages of the SMTP conversation, Sendmail sends a
message over the socket to the Milter program.
The Milter library invokes a callback into your code and sends a
reply message to Sendmail containing the return value from your
callback.