home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / ELM23-2 / ELM23-2.ZIP / doc / Alias.guide (.txt) next >
Amigaguide Document  |  1990-04-28  |  17KB  |  431 lines

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