Pitfalls

  • Macros that are given values while sendmail processes mail might not get the value expected. If that happens, careful hand-tracing of rule sets is required to find the fault.[11] For example, the value in $g ($g) is the result of sender address rewriting and rewriting by the rule set that is specified in the S= equate of the selected delivery agent. Because $g is used to define the From: header line, errors in that line should be traced through errors in the S= equate’s rule set.

  • Macros can have other macros as their values. The sendmail program expands macros recursively. As a consequence, prior to V8.10, unintentional loops in macro definitions could cause sendmail to appear to hang and to eventually segmentation-fault and core-dump. Beginning with V8.10, such recursion is caught and the following error is printed:

    configfile: line num: expand: recursion too deep (10 max)

[11] Although use of the -d35.9,21.12 debugging command-line argument can help.

Get Sendmail, 3rd 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.