Parse an Address with /parse
The /parse
rule-testing command instructs
sendmail to pass an address
through a predetermined sequence of rules to select
a delivery agent and to put the $u
macro ($u on page 848) into its final
form. The /parse
command is used like this:
/parse address
If the address is missing, sendmail prints the following usage message:
Usage: /parse address
The following example shows a local address being fed
into /parse
. Note
that the numbers on the left are for later reference
and are not part of sendmail’s
output:
>/parse you@localhost (Your Name)
❶ Cracked address = $g (Your Name
) ❷ Parsing envelope-recipient address canonify input: you @ localhost ❸ Canonify2 input: you < @ localhost > ❹ Canonify2 returns: you < @ here . our. domain . > canonify returns: you < @ here . our. domain . > ❺ parse input: you < @ here . our. domain . > Parse0 input: you < @ here . our. domain . > Parse0 returns: you < @ here . our. domain . > ParseLocal input: you < @ here . our. domain . > ParseLocal returns: you < @ here . our. domain . > Parse1 input: you < @ here . our. domain . > Parse1 returns: $# local $: you ❻ parse returns: $# local $: you ❼ 2 input: you 2 returns: you ❽ EnvToL input: you ❾ EnvToL returns: you final input: you final returns: you ❿ mailer local, user you
The address you@localhost is
first fed into crackaddr (line
❶) to separate it from any surrounding RFC822
comments such as "(Your
Name)
.” If mail were actually to be sent, the address would be stored in the ...
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.