home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / com / utils / elm / sources / alias.gui < prev    next >
Text File  |  1990-04-28  |  17KB  |  587 lines

  1. .\" @(#)$Id: Alias.guide,v 4.1 90/04/28 22:40:58 syd Exp $
  2. .\"
  3. .\"  A guide to the ELM alias system and so on.
  4. .\"  format with:
  5. .\"      tbl Alias.guide | troff -mn > Alias.format'
  6. .\"
  7. .\"  (C) Copyright 1986, 1987 Dave Taylor
  8. .\"  (C) Copyright 1988, 1989, 1990 USENET Community Trust
  9. .\"  Elm is now in the public trust. Bug reports, comments, suggestions, flames
  10. .\"  etc. should go to:
  11. .\"    Syd Weinstein        elm@DSI.COM (dsinc!elm)
  12. .\"
  13. .\"  $Log:    Alias.guide,v $
  14. .\" Revision 4.1  90/04/28  22:40:58  syd
  15. .\" checkin of Elm 2.3 as of Release PL0
  16. .\"
  17. .\"
  18. .tm Have we been run through "tbl" first?? I hope so!
  19. .po 1i
  20. .ds h0
  21. .ds h1
  22. .ds h2
  23. .ds f0
  24. .ds f1
  25. .ds f2
  26. .nr Hy 1
  27. .nr Pt 1
  28. .nr Pi 0
  29. .lg 0
  30. .nf
  31. .na
  32. .rs
  33. .za
  34. .sp |3.0i
  35. .ce 99
  36. .ps 20
  37. .ss 18
  38. .vs 12
  39. \f3The Elm Alias System Users Guide\f1
  40. .sp 4
  41. .ps 12
  42. .ss 14
  43. .vs 14
  44. \f2What aliases are and how to use them
  45. in the \f3Elm\fP mail system\f1
  46. .sp 2
  47. Dave Taylor
  48. .sp
  49. Hewlett-Packard Laboratories
  50. 1501 Page Mill Road
  51. Palo Alto CA
  52. 94304
  53. .sp 3
  54. email:  taylor\s-1@\s+1hplabs.HP.COM  or  hplabs\s-1!\s+1taylor
  55. .sp 3
  56. >>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
  57. .sp
  58. Syd Weinstein
  59. Datacomp Systems, Inc.
  60. 3837 Byron Road
  61. Huntingdon Valley, PA 19006-2320
  62. .sp
  63. email: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
  64. .sp 2
  65. \s18\f3\(co\f1\s12 Copyright 1986, 1987 by Dave Taylor
  66. \s18\f3\(co\f1\s12 Copyright 1988, 1989, 1990 by The USENET Community Trust
  67. .ps 10
  68. .ss 12
  69. .vs 12
  70. .fi
  71. .ad
  72. .bp 1
  73. .sv 5v
  74. .ps 14
  75. .ss 12
  76. .vs 16
  77. \f3The Elm Alias System Users Guide\f1
  78. .ds h0 "Alias Users Guide
  79. .ds h1
  80. .ds h2 "Version 2.3
  81. .ds f0 "May 1, 1990
  82. .ds f1
  83. .ds f2 "Page %
  84. .sp
  85. .ps 10
  86. .ss 12
  87. .vs 12
  88. (Version 2.3)
  89. .sp 2
  90. Dave Taylor
  91. .sp
  92. Hewlett-Packard Laboratories
  93. 1501 Page Mill Road
  94. Palo Alto CA
  95. 94304
  96. .sp
  97. email: taylor\s-1@\s+1hplabs.HP.COM  or  hplabs\s-1!\s+1taylor
  98. .sp 2
  99. >>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
  100. .sp
  101. Syd Weinstein
  102. Datacomp Systems, Inc.
  103. 3837 Byron Road
  104. Huntingdon Valley, PA 19006-2320
  105. .sp
  106. email: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
  107. .sp 2
  108. May 1, 1990
  109. .ce 0
  110. .sp 3
  111. .pg
  112. This document is intended as a supplement to the \f2Elm Users Guide\f1
  113. and is only of interest to those users desiring more knowledge
  114. about how aliases work and how to create strange and exciting
  115. aliases for their systems (okay, so maybe it's not \f2that\f1 exciting!)
  116. .sp
  117. .pg
  118. This document is broken up into the following sections;
  119. user aliases,
  120. group aliases,
  121. system aliases,
  122. editing and installing new aliases,
  123. the host routing database,
  124. the domain routing database,
  125. general warnings and other chitchat.
  126. .sp
  127. .hn 1 User Aliases
  128.  
  129. The most simple type of aliases in the \f3Elm\f1 system are individual
  130. user aliases.  These are made up of three parts;
  131. .nf
  132.     \f2aliasname list\f1  =  \f2username\f1  =  \f2address\f1 \s-2\u1\d\s0
  133. .fn
  134. 1. Notice that the alias separator has moved from being a colon
  135. character (`:') to the equals sign (`=').
  136. This is due to the requirements of the X.400 addressing scheme.
  137. .ef
  138. .fi
  139. Where the \f2aliasname list\f1 is either a single aliasname\s-2\u2\d\s0
  140. .fn
  141. 2. aliasnames can be any combination of letters, numbers, dashes (`-'),
  142. periods (`.'), or underscores (`_').  Letter case is not significant.
  143. That is `FRED' and `Fred' are identical.
  144. .ef
  145. or a list of aliasnames separated by commas.  Aliasnames are case insensitive and will be
  146. converted to all lower case by the alias system.
  147. .pg
  148. \f2Username\f1 is used to indicate the full `real name' of the user.
  149. For example, if you had an alias for `taylor' to get to me, the
  150. \f2username\f1 field would contain `Dave Taylor' or
  151. perhaps `Dave Taylor at HP'
  152. or some other permutation.  \f3Elm\f1
  153. uses this information to add the users full name to the addresses of
  154. outbound mail to get more readable addresses.
  155. .pg
  156. \f2Address\f1 is either the users full electronic mail address or, if
  157. the machine routing database is installed, the minimum address needed
  158. to specify the destination.  For example, say our routing database
  159. contained information on how to get to machine `hp-sdd' and I wanted
  160. to have an address for my friend Ken there \(em I could have his address
  161. specified as simply `ken@hp-sdd' (or alternatively `hp-sdd!ken' since
  162. the two are functionally equivalent).
  163. .sp
  164. .pg 0
  165. Let's get on to some examples, shall we?
  166. .sp
  167. Consider this excerpt from my own \f2.elm/aliases.text\f1 file;
  168.  
  169. .nf
  170. .ft CW
  171. .zf
  172. .in .5i
  173. .ta \w'frank,minjarez 'u \w'frank,minjarez = Frank Minjarez 'u
  174. # Mail aliases for Dave Taylor
  175. # Friends from UCSD
  176. addie    = Addie Silva    = addie@hp-sdd.SDD.HP.COM
  177. frank,minjarez    = Frank Minjarez    = Minjarez.Verify@dockmaster.arpa
  178. pizzini    = Ken Pizzini    = hplabs!ucbvax!ucdavis!pai!ken
  179. .ft 1
  180.  
  181. .in 0
  182. .fi
  183. Note that the alias for Frank Minjarez has two \f2aliasnames\f1 associated
  184. with it,
  185. .ft CW
  186. .zf
  187. frank\f1 and
  188. .ft CW
  189. .zf
  190. minjarez\f1.
  191. Also notice that the first and second aliases
  192. use the ARPA Internet style naming convention of \f2user@machine\f1
  193. whereas the third uses the UUCP notation of \f2machine!user\f1.
  194. .pg
  195. For the most part, the notational format is transparent within the
  196. alias file \(em the only time it \f2does\f1 make a difference
  197. is if you have to specify more than the machine that the user is
  198. receiving mail on (as in the third example above).
  199. .pg
  200. Suffice to say that if you must specify any sort of uucp route
  201. that you should use the uucp notation as much as possible to ensure
  202. that the system expands the correct machine name.  Similarly, if
  203. you're bouncing mail through different ARPA Internet sites (to
  204. get to a foreign system, as in the example below) you should use the
  205. notation that system expects:
  206.  
  207. .ft CW
  208. .zf
  209. .ti .5i
  210.     listserv%byuadmin.BITNET@rugters.edu
  211. .ft 1
  212. .sp
  213. .hn 1 Group Aliases
  214.  
  215. After the confusion of user aliases, group aliases are even more
  216. fun!  For the most part the notation is very similar;
  217.  
  218.     \f2aliasname list\f1   =   \f2groupname\f1   =   \f2list of people\f1
  219.  
  220. Where \f2aliasname list\f1 and \f2groupname\f1 are exactly equivalent
  221. to the corresponding fields in user aliases.
  222. .pg
  223. The interesting part is the \f2list of people\f1 field; this
  224. field is actually in the same notation as the aliasname list,
  225. so it's really quite easy to create.
  226. It's best to illustrate by example:
  227.  
  228. .ft CW
  229. .zf
  230. .nf
  231. .in .5i
  232. friends, mypals = The Gang of Six = joe, larry, mary, joanna,
  233. \h'\w'friends, mypals = The Gang of Six = 'u'nancy, michael
  234. .ft 1
  235.  
  236. .in 0
  237. .fi
  238. (Notice that you can continue onto as many lines as you'd like so
  239. long as each additional line start with either a \s8SPACE\s10 or a \s8TAB\s10
  240. character)
  241. .pg
  242. The major limitation with group aliases is that each of the
  243. people in the list must be a \f2previously defined alias\f1
  244. or a valid mail address on the current machine.
  245. .pg
  246. What does this mean?  That the following excerpt from an alias file:
  247.  
  248. .in .5i
  249. .ft CW
  250. .zf
  251. .nf
  252. .ta \w'hawaii 'u \w'hawaii = The Hawaiian Twins 'u
  253. hawaii    = The Hawaiian Twins    = joe@cs.rit.edu, maoa
  254. maoa    = Maoa Lichtenski Jr    = maoa@Hawaii.cs.uh.edu
  255. .ft 1
  256.  
  257. .in 0
  258. .fi
  259. will fail for two reasons \(em not only does the group \f2list of people\f1
  260. contain a complex address, but it also contains an aliasname that is
  261. defined \f2further on\f1 in
  262. the \f2.elm/aliases.text\f1 file.
  263. .pg
  264. The correct way to have the previous aliases in the file are to have them
  265. organized like:
  266.  
  267. .ft CW
  268. .zf
  269. .in .5i
  270. .ta \w'hawaii 'u \w'hawaii = The Hawaiian Twins 'u
  271. .nf
  272. joe    = Joe Lichtenski    = joe@cs.rit.edu
  273. maoa    = Maoa Lichtenski Jr    = maoa@Hawaii.cs.uh.edu
  274. hawaii    = The Hawaiian Twins    = joe, maoa
  275. .ft 1
  276.  
  277. .in 0
  278. .fi
  279. which will then work correctly.
  280. .sp
  281. Fortunately, while this seems fairly picky, when you run \f2newalias\f1
  282. to install the new aliases, you'll get relevant and meaningful
  283. error messages to help you fix your aliases up correctly.
  284. .sp
  285. .hn 1 System Aliases
  286.  
  287. System aliases are functionally equivalent to the individual \f3Elm\f1
  288. alias lists each \f3Elm\f1 user has (both user aliases and group aliases)
  289. but are \f2read only\f1 for everyone but the \f3Elm\f1 administrator.  The
  290. format of the file is identical to the users file, and the only difference is
  291. that this file is expected to be located in the directory that contains
  292. the \f2system_hash_file\f1 and \f2system_data_file\f1 files (see the
  293. \f2Elm Configuration Guide\f1 for more details on these variables).
  294. .pg
  295. Simply create the system alias file in the specified directory
  296. as you would a normal alias file, and install it the same way (see the
  297. following section for more details on that).
  298. .pg
  299. Voila!!
  300. .sp
  301. .hn 1 Editing and Installing New Aliases
  302.  
  303. To install new aliases, you need merely to create, or modify,
  304. the file \f2.elm/aliases.text\f1 until you're
  305. satisfied with it and it meets the requirements discussed above.
  306. You can then try to install it with the command;
  307.  
  308.     $ \f3newalias\f1
  309.  
  310. which will either report back the number of aliases installed
  311. or any errors encountered trying to parse and store the
  312. given alias list.
  313. .pg
  314. Note that blank lines are no problem and that comments are not only
  315. allowed but actually encouraged, and must have `\f3#\f1' as the first
  316. character of each comment line.
  317. .sp
  318. Finally, if you find that you're hitting the ``Too many aliases'' error,
  319. then you'll need to reconfigure the entire \f3Elm\f1 system (again,
  320. see \f2The Elm Configuration Guide\f1).
  321. .sp
  322. .hn 1 The Hostname Routing Database
  323.  
  324. Floating about on the various networks is a rather nifty program by
  325. a number of people, including Peter Honeyman and Steve Bellovin,
  326. called \f2pathalias\f1.  What this software does is
  327. take the Usenet articles in the group ``comp.mail.maps'' and change
  328. them into a file of the form;
  329.  
  330.     \f2hostname\f1    <tab>    \f2address\f1
  331.  
  332. which then must be sorted alphabetically and stored in the file
  333. pointed to by \f2pathfile\f1 for \f3Elm\f1 (and other
  334. programs) to use.
  335. .pg
  336. If you don't have the program, or don't want to use it, you can
  337. simulate this file by listing machines in the same format.  The
  338. exact format expected is;
  339.  
  340.     \f2hostname\f1<tab>\f2machine-address\f1
  341.  
  342. where \f2hostname\f1 is a limited identifier (no special characters) and
  343. machine-address MUST contain the sequence `%s' (and consequently
  344. any other percent signs that appear in the address must be paired)
  345. so that the call in the program ``sprintf(buffer, machine-address, username)''
  346. will generate a valid return address.  This file must be sorted alphabetically
  347. for Elm to use it properly.
  348. .pg
  349. By way of example, here are a few entries from my own file;
  350.  
  351. .ft CW
  352. .zf
  353. .in .5i
  354. .TS
  355. l l.
  356. HPL    %s@hplabs
  357. PARC    %s%%Xerox.PA.COM@hplabs
  358. amc-hq    %s%%AMC-HQ.ARPA@hplabs
  359. imsss    %s%%IMSSS%%AI.STANFORD.EDU@hplabs
  360. infopro    hplabs!infopro!%s
  361. interleaf    sun!interleaf!%s
  362. .TE
  363. .ft 1
  364.  
  365. .in 0
  366. As you can see, the addresses can get pretty complicated.  In fact
  367. it's due purely to the complexity of addresses that this file
  368. is so useful.
  369. .sp
  370. .ne 5
  371. Some brief examples:
  372.  
  373. .in .5i
  374. .ft CW
  375. .zf
  376. .nf
  377. $ \f3elm joe@HPL\f1
  378. .ft CW
  379. .zf
  380. To: joe@hplabs
  381. $ \f3elm michelle@imsss\f1
  382. .ft CW
  383. .zf
  384. To: michelle%IMSSS%AI.STANFORD.EDU@hplabs
  385. $ \f3elm fiedler@infopro\f1
  386. .ft CW
  387. .zf
  388. To: hplabs!infopro!fiedler
  389. .ft 1
  390. .fi
  391.  
  392. .in 0
  393. If you'd like further information on the \f2pathalias\f1 program, try
  394. keeping track of the entries in the netnews group \f2comp.sources.unix\f1 \(em
  395. it's posted about once a year or so...
  396. .sp
  397. .hn 1 The Domain Routing Database
  398.  
  399. Another interesting feature of the
  400. \f3Elm\f1 system is the shorthand domain routing database.
  401. This is the same database (in the same strange format) as used by
  402. the publically available \f2uumail\f1 program.
  403. .pg
  404. In a nutshell, the file contains information of the form;
  405.  
  406. .in .5i
  407. \f2domain,   path-to-gateway,  rewrite-template\f1
  408. .in 0
  409.  
  410. The \f2domain\f1 field must begin with a leading `.' and
  411. is usually ordered in the same way as the standard
  412. domain entries (that is, ``\s8.HP.COM\s10'' not ``\s8.COM.HP\s10'').
  413. .pg
  414. \f2Path-to-gateway\f1 is routing information on how to get
  415. to the particular gateway that this domain expects, and
  416. always is a machine/host name (to be found in the pathalias
  417. database, see the previous section) preceded by a `>'
  418. character.
  419. .pg
  420. \f2Rewrite-template\f1 is the most interesting of the
  421. three, and is akin to a printf string for C.  The
  422. changes are that instead of `%s' `%d' and so on, the
  423. actual ``percent'' values represent various parts of
  424. the address, namely;
  425.  
  426. .in .5i
  427. .TS
  428. c l.
  429. \f3Symbol    Represents\f1
  430. %U    The username in the To: address
  431. %N    The remote machine name
  432. %D    %N + domain information
  433. %R    path to %N from pathalias
  434. %P    \f2path-to-gateway\f1 entry
  435. %%    The `%' character
  436. .TE
  437. .in 0
  438.  
  439. with this very un-intuitive setup, let's look at a few entries
  440. from the domains database and then see how they work:
  441.  
  442. .nf
  443. .ft CW
  444. .zf
  445. .in .5i
  446. \&.EUR.UUCP, , , %R!%U
  447. \&.ATT.COM, >att, , %P!%D!%U
  448. \&.HP.COM, , , %R!%U
  449. \&.UUCP, , , %R!%U
  450. \&.COM, >hplabs, , %P!%U@%D
  451. \&.CSNET, >hplabs, , %P!18:12:00%%D@CSNET-RELAY.ARPA
  452. \&.EDU, >hplabs, , %P!%U@%D
  453. .ft 1
  454. .fi
  455. .in 0
  456.  
  457. (Note the presence of a third field that is always null.
  458. This is for compatibility with the \f2uumail\f1 program.
  459. Also notice that there is a space after each and every comma,
  460. even if that field has an entry.)
  461. .pg
  462. To see how it all works, let's suppose that we want to send a message
  463. to `jad@cs.purdue.edu'.  This would break down into the following fields:
  464.  
  465. .nf
  466. .in .5i
  467. %U = \f2jad\f1
  468. %N = \f2cs\f1
  469. %D = \f2cs.purdue.edu\f1
  470. .in 0
  471.  
  472. .fi
  473. When the \f3Elm\f1 program matches the \f2.edu\f1  entry
  474.  
  475. .nf
  476. .in .5i
  477. .ft CW
  478. .zf
  479. \&.EDU, >hplabs, , %P!%U@%D
  480. .ft 1
  481. .in 0
  482.  
  483. .fi
  484. the other field instantiated would be:
  485.  
  486. .nf
  487. .in .5i
  488. %P = \f2path to hplabs\f1
  489. template = \f2%P!%U@%D\f1
  490. .in 0
  491. .fi
  492.  
  493. If, say, our path to \f2hplabs\f1 was \f2hpcnoe!hplabs\f1, then
  494. the fully expanded address would be:
  495.  
  496. .nf
  497. .ft CW
  498. .zf
  499. .in .5i
  500. hpcnoe!hplabs!jad@cs.purdue.edu
  501. .ft 1
  502. .in 0
  503. .fi
  504.  
  505. \f1and so on.
  506. .sp
  507. What does this mean to the average user?  It means that you can
  508. for the most part send mail to people on different networks by
  509. simply using their full address, including any domain information,
  510. so that mail to addresses like ``Jack@AI.MIT.EDU'' will work,
  511. a message to ``SueAnn@BBN.MAILNET'' will work and so on!
  512. .sp
  513. .hn 1 Other Stuff not Covered Yet
  514.  
  515. Probably the biggest question you have in your mind right now
  516. is ``But how the heck does this relate to my existing \f2Berkeley Mail\f1
  517. aliases and the lower-level \f2sendmail\f1 alias system??''  Well,
  518. rest assured that if you \f2really\f1 want to have
  519. your aliases down in the transport you can.  No problem.  All you'll
  520. need to do is to turn off the address validation routine in \f3Elm\f1.
  521. .pg
  522. And for those ex-\f2Berkeley Mail\f1 fans, you can translate your
  523. aliases into the format that \f3Elm\f1 wants by running them
  524. through the \f2awk\f1 script listed in the appendix.
  525. .pg
  526. Finally, if you have any problems or questions, try looking in
  527. the \f2newalias\f1 manual entry, or dropping me a line at the
  528. ``usual'' email address.
  529. .bp
  530. .ce 99
  531. \f3Appendix One
  532. An AWK Script for Translating Aliases from
  533. a \f2Berkeley Mail\fP ``.mailrc'' File to an \f2Elm\fP ``.elm/aliases.text''
  534. File\f1
  535. .ce 0
  536. .sp
  537. .nf
  538.  
  539. .ta .5i
  540. .ft CW
  541. .zf
  542. BEGIN { print "# Elm .elm/aliases.text file, from a .mailrc file..."
  543.     print ""
  544.     }
  545. next_line == 1 {
  546.     next_line = 0;
  547.     group = ""
  548.     for (i = 1; i <= NF; i++) {
  549.       if (i == NF && $i == "\\\\") sep = ""
  550.       else                       sep = ", "
  551.       if ($i == "\\\\") {
  552.         group = sprintf("%s,", group)
  553.         next_line = 1;
  554.       }
  555.       else if (length(group) > 0)
  556.         group = sprintf("%s%s%s", group, sep, $i);
  557.       else
  558.         group = $i;
  559.       }
  560.       print "\\t" group
  561.     }
  562. $1 ~ /[Aa]lias | [Gg]roup/ {
  563.     if ( NF == 3)
  564.       print $2 " = user alias = " $3;
  565.     else {
  566.       group = ""
  567.       for (i = 3; i <= NF; i++) {
  568.         if (i == NF && $i == "\\\\") sep = ""
  569.         else        sep = ", "
  570.         if ($i == "\\\\") {
  571.           group = sprintf("%s,", group)
  572.           next_line = 1;
  573.         }
  574.         else if (length(group) > 0)
  575.           group = sprintf("%s%s%s", group, sep, $i);
  576.         else
  577.           group = $i;
  578.         }
  579.         print $2 " = group alias = " group;
  580.       }
  581.     }
  582.  
  583. .ft 1
  584. .fi
  585. Note: this script is contained in the release under the name ``mailrc.awk''
  586. in the utilities directory ``utils''.
  587.