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