Milter xxfi_helo()
Process a HELO/EHLO command All Milter versions
After the client connects to the listening
sendmail server, and after
sendmail has sent its
220
greeting,
the client will usually send a HELO
or EHLO
command to greet
sendmail and to declare its
use of ESMTP extensions:
220 your.host.domain ESMTP Sendmail 8.14.1/8.14.1; Fri, 12 Dec 2007 06:06:10 −0800 (PST) HELOclient name here
← do not use ESMTP extensions EHLOclient name here
← use ESMTP extensions
After the client has sent its HELO
or EHLO
greeting, and before
sendmail replies to that
greeting, your xxfi_helo
() function, if used, is
called.
The xxfi_helo
()
function is called like this:
sfsistat xxfi_helo(SMFICTX *ctx,
char *helohost
)
Here, ctx
is the context
pointer passed to all xxfi_
functions to maintain state in a
multithreaded environment. The
helohost
is the
client’s hostname as supplied along with the
HELO
or
EHLO
greeting.
It is a zero-terminated string that contains the
literal text supplied by the client to the HELO
or EHLO
greeting. That text
should be a canonical hostname, but may turn out to
be almost anything, so your xxfi_helo
() function
should practice defensive programming:
"" "foo" "bob.is.a.happy.boy"
The HELO
or
EHLO
command is
optional. The connecting client may elect to omit
sending this command and instead skip ahead and send
the MAIL From:
command. Thus, your xxfi_helo
() may not be called for any
given connection. If you wish to ensure that it is
called, set one of the following in your mc configuration ...
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.