MaxAliasRecursion

Maximum recursion of aliases V8.10 and later

When sendmail processes an alias, it essentially translates one address into new addresses. It must then look up each new address to see whether it, too, is aliased. Clearly, there is a risk that this process might become recursive or excessively deep. Prior to V8.10 sendmail, the MAXRCRSN compile-time macro set the limit on how far this recursion could go. Beginning with V8.10, the limit is set with this MaxAliasRecursion option.

The MaxAliasRecursion option is declared like this:

O MaxAliasRecursion=numconfiguration file (V8.10 and later)
-OMaxAliasRecursion=numcommand line (V8.10 and later)
define(`confMAX_ALIAS_RECURSION',`num')     ← mc configuration (V8.10 and later)

The num is of type numeric and, if omitted, becomes zero. If the entire MaxAliasRecursion option is omitted, the default becomes 10. The default for the mc configuration technique is also 10. If num is zero or negative, all aliases will be limited to one transformation, and every one will cause an error. Whatever the value of num, when recursion becomes greater than that number, the following error is logged and returned as an error in the SMTP dialog, thus bouncing that address:

554 5.0.0 aliasing/forwarding loop broken (actual aliases deep; num max)

In general, a value of 10 should be considered the minimum.

The MaxAliasRecursion option is not safe. If it is specified from the command line, it can cause sendmail to give up any special privileges.

Get sendmail, 4th 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.