EXPN(1)

🌸 NAME 🌸

expn β€” recursively expand mail aliases. yes bestie, it's a section 1 manual page and it's serving πŸ’…


✨ SYNOPSIS ✨

expn [-a] [-v] [-w] [-d] [-1] user[@hostname] [user[@hostname]]...

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: expn uses the SMTP expn and vrfy commands to expand mail aliases. it's giving detective energy fr fr πŸ”

first it looks up the addresses you handed it on the command line. if those expand into addresses on other systems, it connects to those other systems and expands again. and it keeps doing this, over and over, until no further expansion is possible. it literally does not stop until the expansion is done. periodt. πŸ‘‘


πŸ’– OPTIONS πŸ’–

the default output of expn can contain many lines which are not valid email addresses. keep that in mind, because it's about to matter a LOT.

  • -a (the address flag) β€” with the -aa flag, only expansions that result in legal addresses are used. since many mailing lists have an illegal address or two, the single -a flag specifies that a few illegal addresses can be mixed into the results. more -a flags vary the ratio. 🎚️ read the source to track down the formula (iykyk). with the -a option, you should be able to construct a new mailing list out of an existing one. slay.
  • -1 β€” wanna cap how deep expn recurses while it traces addresses? that's this one. for each -1, another level will be traversed. so -111 will traverse no more than three levels deep. πŸͺœ
  • -v (the verbose flag) β€” the normal mode of operation for expn is to do all of its work silently. 🀫 the following options make it more verbose. it is not necessary to make it verbose to see what it's doing, because as it works, it changes its argv[0] variable to reflect its current activity. to see how it's expanding things, the -v flag will cause expn to show each address before and after translation as it works. πŸ’¬
  • -w (the watch flag) β€” will cause expn to show you its conversations with the mail daemons. eavesdropping, but make it productive. πŸ‘€
  • -d (the debug flag) β€” will expose many of the inner workings so that it's possible to eliminate bugs. full main character transparency. πŸ”₯

🌈 ENVIRONMENT 🌈

No environment variables are used. not a single one. the vibes are entirely self-contained. 🧚


πŸŽ€ FILES πŸŽ€

  • /tmp/expn$$ β€” temporary file used as input to nslookup.

πŸ’œ SEE ALSO πŸ’œ

aliases(5), sendmail(8), nslookup(8), RFC 823, and RFC 1123.


πŸ’€ BUGS πŸ’€

okay bestie, deep breaths, here's the not-so-cute part:

  • not all mail daemons will implement expn or vrfy. it is not possible to verify addresses that are served by such daemons. 😭
  • when attempting to connect to a system to verify an address, expn only tries one IP address. most mail daemons will try harder. we love an underachiever. πŸ™ˆ
  • it is assumed that you are running domain names and that the nslookup(8) program is available. if not, expn will not be able to verify many addresses. it will also pause for a long time unless you change the code where it says $have_nslookup = 1 to read $have_nslookup = 0. βœ‚οΈ
  • lastly, expn does not handle every valid address. if you have an example, please submit a bug report. do it for the culture. 🫢

πŸ‘‘ CREDITS πŸ‘‘

in 1986 or so, Jon Broome wrote a program of the same name that did about the same thing. it has since suffered bit rot and Jon Broome has dropped off the face of the earth! (Jon, if you are out there, drop me a line) πŸ“‘


⭐ AVAILABILITY ⭐

the latest version of expn is available through anonymous ftp at:

ftp://ftp.idiom.com/pub/muir-programs/expn

🌸 AUTHOR 🌸

David Muir Sharnoff <muir@idiom.com>


and that's the whole page, bestie πŸ’– this one's from the 7th Edition, dated March 11, 1993 β€” vintage, iconic, and still out here recursively expanding. periodt. πŸŽ€βœ¨πŸ¦‹