1EXPN(1) General Commands Manual EXPN(1)
2
3
4
6 expn - recursively expand mail aliases
7
9 expn [-a] [-v] [-w] [-d] [-1] user[@hostname] [user[@hostname]]...
10
12 expn will use the SMTP expn and vrfy commands to expand mail aliases.
13 It will first look up the addresses you provide on the command line.
14 If those expand into addresses on other systems, it will connect to the
15 other systems and expand again. It will keep doing this until no fur‐
16 ther expansion is possible.
17
19 The default output of expn can contain many lines which are not valid
20 email addresses. With the -aa flag, only expansions that result in
21 legal addresses are used. Since many mailing lists have an illegal
22 address or two, the single -a, address, flag specifies that a few ille‐
23 gal addresses can be mixed into the results. More -a flags vary the
24 ratio. Read the source to track down the formula. With the -a option,
25 you should be able to construct a new mailing list out of an existing
26 one.
27
28 If you wish to limit the number of levels deep that expn will recurse
29 as it traces addresses, use the -1 option. For each -1 another level
30 will be traversed. So, -111 will traverse no more than three levels
31 deep.
32
33 The normal mode of operation for expn is to do all of its work
34 silently. The following options make it more verbose. It is not nec‐
35 essary to make it verbose to see what it is doing because as it works,
36 it changes its argv[0] variable to reflect its current activity. To
37 see how it is expanding things, the -v, verbose, flag will cause expn
38 to show each address before and after translation as it works. The -w,
39 watch, flag will cause expn to show you its conversations with the mail
40 daemons. Finally, the -d, debug, flag will expose many of the inner
41 workings so that it is possible to eliminate bugs.
42
44 No environment variables are used.
45
47 /tmp/expn$$ temporary file used as input to nslookup.
48
50 aliases(5), sendmail(8), nslookup(8), RFC 823, and RFC 1123.
51
53 Not all mail daemons will implement expn or vrfy. It is not possible
54 to verify addresses that are served by such daemons.
55
56 When attempting to connect to a system to verify an address, expn only
57 tries one IP address. Most mail daemons will try harder.
58
59 It is assumed that you are running domain names and that the
60 nslookup(8) program is available. If not, expn will not be able to
61 verify many addresses. It will also pause for a long time unless you
62 change the code where it says $have_nslookup = 1 to read $have_nslookup
63 = 0.
64
65 Lastly, expn does not handle every valid address. If you have an exam‐
66 ple, please submit a bug report.
67
69 In 1986 or so, Jon Broome wrote a program of the same name that did
70 about the same thing. It has since suffered bit rot and Jon Broome has
71 dropped off the face of the earth! (Jon, if you are out there, drop me
72 a line)
73
75 The latest version of expn is available through anonymous ftp at
76 ftp://ftp.idiom.com/pub/muir-programs/expn.
77
79 David Muir Sharnoff <muir@idiom.com>
80
81
82
837th Edition March 11, 1993 EXPN(1)