The argv is an array of pointers to strings. The zeroth string is
always the envelope-sender address. Note that this is the address as it was received by sendmail
and could easily be in an unexpected format:
argv[0] ?†’ "
"
argv[0] ?†’ ">"
argv[0] ?†’ "<>"
argv[0] ?†’ ""
As you can see from the last two lines in the preceding code, your Milter should be
prepared to handle not only oddly formed addresses, but also bounce addresses and empty
addresses as well.
If the envelope sender is followed by ESMTP extensions, each extension will be copied to a
subsequent string in the order they appeared in the MAIL From: command. For example, the
following MAIL From:
MAIL From: SIZE=1024 ENVID=ABCD
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
1212 | Chapter 26: The X (Milters) Configuration Command
will yield the following values in argv:
argv[0] ?†’ "???
argv[1] ?†’ "SIZE=1024"
argv[2] ?†’ "ENVID=ABCD"
argv[3] ?†’ NULL
The xxfi_envfrom() function can return any of several values that determine the handling
of the envelope sender and possibly the fate of the envelope:
SMFIS_CONTINUE
Allow the MAIL From: command, and thus the current envelope, and continue handling
the current envelope. This is the default return value if you don??™t declare an envelopesender
handler in smfiDesc (?§26.
Pages:
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183