Rule sets 0 and 5 are special in that they allow you to select a delivery agent. Selecting a delivery agent means placing a "triple" in the RHS. The form of that triple looks like this:
$#agent
$@host
$:user
The order is important; any other order will fail.
Selects the delivery agent by symbolic name. If the name is error, the message is bounced (or deferred) and the nature of the $@ and $: changes.
Selects the host to which the mail will be sent. The hostname is placed as-is into $h. For the error agent, this is the DSN return code (common codes are: 5.1.3 for illegal syntax, 5.1.1 for an address syntax error, 5.1.2 for an invalid hostname, or 5.7.1 for a security rejection; see RFC1893 and §30.5.2).
Specifies the name of the recipient user. For remote mail this may be a full address. For local mail it may be a login name. The user name is processed by rule set 2, then by the rule set indicated by the R= equate of the delivery agent, then by rule set 4, and the result placed into $u. For the error agent, this is the literal text of the error message. A three-digit SMTP error code can optionally prefix this text (see §30.5.2).