Pass Macros with Milter.macros
Individual sendmail macros may be sent to your Milter during nearly any phase of the SMTP transaction. Table 26-7 shows the individual options available for sending macros.
Table 26-7. Options to have sendmail macro values sent to a Milter
|
mc option |
Configuration option |
§ |
|---|---|---|
|
|
|
Milter.macros.connect on page 1054 |
|
|
|
Milter.macros.envfrom on page 1054 |
|
|
|
Milter.macros.envrcpt on page 1055 |
|
|
|
Milter.macros.data on page 1055 |
|
|
|
Milter.macros.eoh on page 1056 |
|
|
|
Milter.macros.eom on page 1056 |
|
|
|
Milter.macros.helo on page 1054 |
Two steps are required for you to set up a macro for use with your Milter. First you declare your intention inside your mc (or configuration) file with a line like the following:
define(`confMILTER_MACROS_HELO',``{client_addr}, {client_name}'')This tells sendmail you want the
value of the ${client_addr} macro (${client_addr} on page 810) and the value of the ${client_name} macro
(${client_name} on page 812) sent to the xxfi_helo() handler
function (Milter xxfi_helo()
on page 1218) inside your Milter.
Second, you arrange inside your Milter for your
handler function (here your xxfi_helo() handler) to receive (request) those macro values ...