5 .\" include the -mh macro file
8 .TH AP %manext8% MH.6.8 [%nmhversion%]
10 ap \- parse addresses 822-style
15 \%[\-form\ formatfile]
18 \%[\-normalize] \%[\-nonormalize]
27 \fIAp\fR is a program that parses addresses according to the ARPA
28 Internet standard. It also understands many non\-standard formats.
29 It is useful for seeing how \fInmh\fR will interpret an address.
31 The \fIap\fR program treats each argument as one or more addresses, and
32 prints those addresses out in the official 822\-format. Hence, it is
33 usually best to enclose each argument in double\-quotes for the shell.
35 To override the output format used by \fIap\fR, the `\-format\ string' or
36 `\-format\ file' switches are used. This permits individual fields of
37 the address to be extracted with ease. The string is simply a format
38 string, and the file is simply a format file. See \fImh\-format\fR\0(5)
41 In addition to the standard escapes,
42 \fIap\fR also recognizes the following additional escape:
45 .ta \w'Escape 'u +\w'Returns 'u
46 \fIEscape\fR \fIReturns\fR \fIDescription\fR
47 error string A diagnostic if the parse failed
51 If the `\-normalize' switch is given, \fIap\fR will try to track down
52 the official hostname of the address.
54 Here is the default format string used by \fIap\fR:
57 %<{error}%{error}: %{text}%|%(putstr(proper{text}))%>
59 which says that if an error was detected, print the error, a `:', and
60 the address in error. Otherwise, output the 822\-proper format of
63 ^$HOME/\&.mh\(ruprofile~^The user profile
64 ^%etcdir%/mts.conf~^nmh mts configuration file
70 \fIStandard for the Format of ARPA Internet Text Messages\fR (RFC\-822)
72 `\-format' defaults as described above
76 `\-width' defaults to the width of the terminal
80 The argument to the `\-format' switch must be interpreted as a single token
81 by the shell that invokes \fIap\fR.
83 one must usually place the argument to this switch inside double\-quotes.