Skip to Content
sendmail, 4th Edition
book

sendmail, 4th Edition

by Bryan Costales, Claus Assmann, George Jansen, Gregory Neil Shapiro
October 2007
Intermediate to advanced
1308 pages
161h 13m
English
O'Reilly Media, Inc.
Content preview from sendmail, 4th Edition

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

§

confMILTER_MACROS_CONNECT

Milter.macros.connect

Milter.macros.connect on page 1054

confMILTER_MACROS_ENVFROM

Milter.macros.envfrom

Milter.macros.envfrom on page 1054

confMILTER_MACROS_ENVRCPT

Milter.macros.envrcpt

Milter.macros.envrcpt on page 1055

confMILTER_MACROS_DATA

Milter.macros.data

Milter.macros.data on page 1055

confMILTER_MACROS_EOH

Milter.macros.eoh

Milter.macros.eoh on page 1056

confMILTER_MACROS_EOM

Milter.macros.eom

Milter.macros.eom on page 1056

confMILTER_MACROS_HELO

Milter.macros.helo

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sendmail, 3rd Edition

Sendmail, 3rd Edition

Bryan Costales
Postfix

Postfix

Richard Blum
Linux Email

Linux Email

Ian Haycox, Ralf Hildebrandt, David Rusenko, Alistair McDonald, Patrick Ben Koetter, Carl Taylor, Magnus Back

Publisher Resources

ISBN: 9780596510299Errata Page