LUSER_RELAY mc Macro

A local user is one who evaluates to delivery on the local machine, even after aliasing. By defining LUSER_RELAY:

define(`LUSER_RELAY', `relay_host')dnl

any username that is not found in the passwd(5) file will be forwarded to relay_host. This check is made after aliasing but before processing of the ~/.forward file.

The mc method adds rules to the localaddr rule set 5 that cause the user to be looked up with the user database type (see the name field lookup for that type in user on page 945). If the user’s name is not found, the message is forwarded to relay_host.

See Relays on page 602 for a description of how to include a delivery agent specification with relay_host. Also see the V8.12 FEATURE(preserve_luser_host) (FEATURE(preserve_luser_host) on page 638) for a way to preserve the recipient’s hostname when using this LUSER_RELAY m4 configuration macro.

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.