Sendmail 8.13.3 Programmer's Guide
Table Of Contents

Milter APIs
Data Access APIs
Chapter 2 19
All macros specified with the xxfi_connect() and xxfi_helo()
callbacks are active from the point they are received until the end of the
connection. All macros specified with the callback xxfi_envfrom() are
active from the point they are received until the end of the message. All
macros specified with the callbacks xxfi_envrcpt() are active for each
recipient.
You can use the confMILTER_MACROS_* options in the Sendmail .mc file
to change the macro list. Depending on when Sendmail sets the macros,
you can determine the scope of these macros.
Arguments
You must call smfi_getsymval() with the following argument:
ctx Specifies a opaque context structure.
symname Denotes the name of a Sendmail macro. You can
optionally enclose single letter macros and long macro
names in braces (“{“ and “}”), similar to the macros in
the sendmail.cf file.
Return Value
smfi_getsymval() returns the value of the given macro as a
null-terminated string or a NULL value if the macro is not defined.
The smfi_getpriv() API
You can use the smfi_getpriv() API to get the connection-specific data
pointer for a connection. You can call smfi_getpriv() in any of the
xxfi_* callbacks.
The declaration of smfi_getpriv() is as follows:
xxfi_envfrom() i, auth_type, auth_authen, auth_ssf,
auth_author, mail_mailer, mail_host,
mail_addr
xxfi_envrcpt() rcpt_mailer, rcpt_host, rcpt_addr
Table 2-2 Sendmail Macros (Continued)
xxfi_*
Callbacks
Sendmail Macros