Previous Section Next Section

$z

The recipient's home directory All versions

The $z macro holds the location of the local user's home directory. This macro is given a value only if the delivery agent has the F=w flag set (F=w)[27] and if delivery is to a user (rather than a file or a program). The home directory is looked up using the method defined by the MailboxDatabase option (MailboxDatabase),[28] and that directory's location is placed into this $z macro.

[27] Prior to V8.7 this behavior was tied to the local delivery agent.

[28] Prior to V8.12, the getpwnam(3) routine was used.

The sendmail program uses $z to access a user's ~/.forward file and to save failed mail to a user's ~/dead-letter file.

$z can be passed in the A= equate to a custom-written local delivery agent. One reason to do so would be to deliver mail to a user's home directory rather than to a central spool directory. $z is also very useful with the ForwardPath option (ForwardPath).

$z is transient. If it is defined in the configuration file or the command line, that definition will be ignored by sendmail. Note that a $& prefix is necessary when you reference this macro in rules (that is, use $&z, not $z).

    Previous Section Next Section