Prev | Current Page 1467 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"


21.9.75 ${ntries}
Number of delivery attempts V8.10 and later
When a message begins life and delivery has not yet been attempted, the message is considered
to have had zero delivery attempts. If the first delivery attempt fails, the message is
deferred to the queue and marked as having had one delivery attempt. Thereafter, each
time the message is fetched from the queue and delivery fails, the number of attempts is
incremented. Each time the message is read from the queue, the number of delivery
attempts is stored in the ${ntries} macro.
One use for this ${ntries} macro might be to bounce high-priority mail that fails on the
first try. If it cannot be sent right away, perhaps such mail should be faxed, or followed up
with a telephone call. Consider the following mc file lines that suggest one way to accomplish
this:
LOCAL_CONFIG
C{persistentMacros} {X-Notice}
HX-Notice: $>CheckNotice
Kstore macro
LOCAL_RULESETS
SCheckNotice
R $* $: $(store {X-Notice} $@ YES $)
Scheck_compat
R $* $: $&{X-Notice}
R $* $: $(store {X-Notice} $) $1
R YES $: $(math l $@ $&{ntries} $@ 1 $)
R FALSE $#error $@ 5.7.1 $: "550 X-Notice mail exceeded allowed tries"
Here, we set up our own ${X-Notice} macro as a private flag so that we can detect the presence
of the X-Notice: header, even when the message is read from the queue. Under
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc.


Pages:
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479
projektowanie ogrodów łódź Okna PCV Wrocław Kurs architektury wyprawy 47lw570s