Sendmail 8.13.3 Programmer's Guide

Milter APIs
Library Control APIs
Chapter 212
Arguments
You must call smfi_register() with the following argument:
descr Specifies a filter descriptor of type smfiDesc, which
describes the functions of the filter. The smfiDesc
contains the following members:
struct smfiDesc
{
char*xxfi_name; /* filter name */
intxxfi_version;/* version code -- do not change */
unsigned longxxfi_flags;/* flags */
/* connection info filter */
sfsistat(*xxfi_connect)(SMFICTX *, char *, _SOCK_ADDR *);
/* SMTP HELO command filter */
sfsistat(*xxfi_helo)(SMFICTX *, char *);
/* envelope sender filter */
sfsistat(*xxfi_envfrom)(SMFICTX *, char **);
/* envelope recipient filter */
sfsistat(*xxfi_envrcpt)(SMFICTX *, char **);
/* header filter */
sfsistat(*xxfi_header)(SMFICTX *, char *, char *);
/* end of header */
sfsistat(*xxfi_eoh)(SMFICTX *);
/* body block */
sfsistat(*xxfi_body)(SMFICTX *, unsigned char *, size_t);
/* end of message */
sfsistat(*xxfi_eom)(SMFICTX *);
/* message aborted */
sfsistat(*xxfi_abort)(SMFICTX *);
/* connection cleanup */
sfsistat(*xxfi_close)(SMFICTX *);
};
A NULL value for any callback indicates that the filter does not want to
process the given type of information and the callback returns only
SMFIS_CONTINUE.
For more information on callbacks, see “Callbacks” on page 36.