Milter xxfi_negotiate()
Redefine one’s abilities at runtime V8.14 and later
Prior to V8.14, a Milter declared its intentions once
from main
() by
calling the smfi_register
() routine (Milter smfi_register()
on page 1194). The arguments passed to smfi_register
() are of
type struct
smfiDesc
and look, in part, like
this:
struct smfiDesc { char *name
; intversion
; unsigned longflags
; sfsistatfunct
; /* for xxfi_connect */ sfsistatfunct
; /* for xxfi_helo */ sfsistatfunct
; /* for xxfi_envfrom */ sfsistatfunct
; /* for xxfi_envrcpt */ sfsistatfunct
; /* for xxfi_header */ ... etc.
Here, the flags
state your
intention to perform selected actions, such as to
remove recipients, or to replace headers. Each of
the funct
lines provides
a pointer to a function that will handle that phase
of the SMTP Milter conversation. If the second
funct
, for example,
were expressed as NULL
, the xxfi_
function that handles HELO/EHLO
will not be
called. But if that second funct
were instead a function name,
such as the name xxfi_helo
() or myDoHelo
(), that
function will be called to handle the HELO/EHLO
phase of the
SMTP transaction.
Beginning with V8.14 sendmail,
more functions may be called at additional points in
the SMTP conversation, and more flags may be set
than with earlier sendmail
versions. This can lead to problems when a single
Milter is connected to by multiple
sendmail servers (perhaps
across a network of MTAs). One
sendmail may be V8.14 and
able to recognize the SMFIS_SKIP flag so that the
xxfi_body ...
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.