Sendmail 8.13.3 Programmer's Guide
Table Of Contents

Milter APIs
Callbacks
Chapter 2 37
If an earlier filter application rejects a connection in its xxfi_connect()
callback, the current filter does not call xxfi_connect().
Arguments
You must call xxfi_connect() with the following arguments:
ctx Specifies an opaque context structure.
hostname Specifies the host name of the message sender, as
determined by a reverse lookup on the host address. If
the reverse lookup fails, hostname contains the IP
address of the message sender enclosed in square
brackets. For example, [a.b.c.d], where a.b.c.d
denotes the IP address.
hostaddr Specifies the host address, as determined by a
getpeername() call on the SMTP socket. The value of
hostaddr is NULL if the type is not supported in the
current version or if the SMTP connection is made
through stdin.
The xxfi_helo() Callback
The xxfi_helo() callback handles the HELO and EHLO commands.
xxfi_helo() returns the SMFIS_CONTINUE value to the calling filter
application. xxfi_helo() is called when the client sends a HELO or EHLO
command. You can therefore call xxfi_helo() multiple times or you can
also refrain from calling this callback.
The declaration of xxfi_helo() is as follows:
#include <libmilter/mfapi.h>
sfsistat (*xxfi_helo)(
SMFICTX * ctx,
char * helohost
);
Arguments
You must call xxfi_helo() with the following arguments:
ctx Specifies an opaque context structure.
helohost Specifies the value that is passed to HELO or EHLO,
which must be the domain name of the sending host.