home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume3 / pcmail / part03 / Installation < prev    next >
Text File  |  1989-02-03  |  8KB  |  186 lines

  1. THE UNIX SIDE OF THE CONNECTION
  2.  
  3. The pc-mail programs will need a UNIX host to  exchange  messages
  4. with.  This  automatically gives access to other networks. I sug-
  5. gest the following strategy:
  6.  
  7.  - Get a uucp login, say, uuxyz on a UNIX system. This will  also
  8. become the uucp-node name of the pc. The file /usr/lib/uucp/L.sys
  9. should be extended with an entry, e.g.
  10.  
  11.  uuxyz Passive
  12.  
  13. (on some systems one has to use `Never' instead of `Passive'). It
  14. may also be necessary to update the /usr/lib/uucp/USERFILE.
  15.  
  16.  - Have all mail for user uuxyz forwarded to  uuxyz!somebody.  On
  17. BSD  UNIX  systems,  this  is  achieved  by  placing  the address
  18. `uuxyz!somebody' in  a  file  ~uuxyz/.forward;  on  System-V  one
  19. should  put  the  text  `Forward  to  uuxyz!somebody' in the file
  20. /usr/mail/uuxyz, which should be read/writeable by group mail.
  21.  
  22. In the above examples, somebody is a  name  that  can  be  freely
  23. chosen;  it  will  not  be used by the pc. Of course, mail can be
  24. forwarded to uuxyz!somebody from other accounts as well.
  25.  
  26. The result of all this is that you can send mail to any  user  on
  27. the UNIX host by just specifying her login name; the host name of
  28. your pc will not appear in mail headers. People can send mail  to
  29. you  by  specifying an address on the UNIX host. There is no need
  30. to register the pc in the uucp maps.
  31.  
  32. If the above strategy is not what you  like,  you  will  have  to
  33. operate  as  a  "real"  uucp node and should #define UUCP_HOST in
  34. sendwork.c. You should also be registered as a uucp  node.  There
  35. is more discussion about this in sendwork.c
  36.  
  37. As a minimum, the UNIX host should support the standard uucp  `g'
  38. protocol.  This  protocol was developed for eight-bit data paths.
  39. Unfortunately, modern networks often eat up  XON/XOFF  and  other
  40. control characters.
  41.  
  42. To handle non-transparent networks  I  have  written  a  protocol
  43. called  `k'. It has been used with the Eindhoven University Sytek
  44. network for over two years and is part of the  pc-mail  distribu-
  45. tion.  If  you're  really  desperate (and have UNIX source) build
  46. this protocol into the uucico program  by  adding  the  following
  47. line to struct Proto Ptbl[] in cntrl.c:
  48.  
  49.  'k', kturnon, krdmsg, kwrmsg, krddata, kwrdata, kturnoff,
  50.  
  51. and linking the uucico objects with kio.c  kp.h  kphys.c  kpres.c
  52. and ktrans.c.
  53.  
  54. THE PC SIDE OF THE CONNECTION
  55.  
  56. To bring pc-mail up, edit the makefile to reflect the system  you
  57. are  using  (there  are  separate makefiles for UNIX and MS-DOS).
  58. The MS-DOS makefile is for a UNIX-compatible make utility  posted
  59. to  usenet  near  the  end of 1986. There is a batch command file
  60. (buidall.bat) for those who do not have  a  unix-compatible  make
  61. utility.  For testing purposes it is convenient to run this stuff
  62. on a UNIX host.
  63.  
  64. Saying `make' should produce five programs:
  65.  
  66.  - mail, the menu-driven user interface
  67.  - cmail, a program that checks if there is new mail
  68.  - smail, a program that queues messages for  transmission  after
  69.           doing alias substitution on mail addresses
  70.  - cico, the program that performs dialups and file transfers
  71.  - rmail, extracts "From" info from mail received by cico
  72.  
  73. The programs access a common data base in the  form  of  a  spool
  74. directory  with  setup  file,  logfile  and  message files. There
  75. should be no  other  files  in  the  spool  directory,  to  avoid
  76. confusion.  You  will  have  to  create  the spool directory; the
  77. programs will not do that.
  78.  
  79. You will have to set some environment  variables  before  running
  80. the mail program.
  81.  
  82.  - MAILDIR, the absolute path to your spool directory
  83.  - EDITOR, the name of your favourite editor program
  84.  - PATH, in order locate the executables
  85.  
  86. The editor command may be an MS-DOS batch file; in that case  you
  87. should include the '.bat' suffix in the command name.
  88.  
  89. The following two environment variables are optional.
  90.  
  91.  - MAILPRN, if printer output should not go to PRN
  92.  - MAILCMD, command that is executed when the mail program  exits
  93.  
  94. Also,  make  sure  that  the limit on the number of open files is
  95. large enough (20 or so). On MS-DOS, this is  handled  by  a  line
  96. `files=20' in the CONFIG.SYS file.
  97.  
  98. Run the interactive mail program and choose the setup command. On
  99. MS-DOS  systems  only  the  com1  port  is  supported  (see  file
  100. comport.s). Here is my setup (some  names  changed)  for  getting
  101. through the TUE port selector:
  102.  
  103.     communications_port: com1
  104.     baud_rate:           1200
  105.     remote_host_name:    eutwc1
  106.     login_name:          uutest
  107.     dialup_sequence:     atm\r OK atdt455215\r CONNECT \0 ease: xyz\r ease: 
  108. xyz\r choice: 1\r called: b076\r CLOSED \r
  109.     disconnect_sequence: \0
  110.  
  111. All entries must be filled or the  cico  program  will  complain.
  112. The MS-DOS version supports the com1 port only.
  113.  
  114. The dial-up sequence requires some explanation. Basically it is a
  115. list  of words separated by whitespace. The first word is sent to
  116. the comm. port. The program  will  wait  until  it  receives  the
  117. second word. And so on. Unlike real uucp (or kermit), there is no
  118. retry facility. The backslash escape sequences  are  stolen  from
  119. the c programming language, with some extensions:
  120.  
  121.  \b    backspace
  122.  \f    formfeed
  123.  \n    linefeed
  124.  \r    carriage return
  125.  \s    blank
  126.  \t    tab
  127.  \\    backslash
  128.  \nnn    octal code for a character
  129.  
  130. In order to send or expect an empty string, use the \0 sequence.
  131.  
  132. It is not possible to send null characters. The dial-up  sequence
  133. should terminate when the UNIX host displays its "login:" prompt;
  134. the remainder of the dialup sequence is built into the  software.
  135. This,  and  having  (pc  node  name)  == (uucp login name) are to
  136. prevent fraud. Thus,  assuming  a  Hayes-compatible  modem,  your
  137. dialup sequence could be as simple as:
  138.  
  139.     atm\r OK atdt455215\r CONNECT \0 
  140.  
  141. When this dialup sequence succeeds, the  program  continues  with
  142. its built-in sequence:
  143.  
  144.     ogin: login_name\r ssword: your_password\r
  145.  
  146. The disconnect sequence uses the same  escape  sequences  as  the
  147. dial-up  sequence,  but does not use the send/expect protocol. In
  148. the above sequence, the disconnect sequence is an empty string.
  149.  
  150. If the cico program has problems communicating with the UNIX host
  151. you can run it by hand, for example:
  152.  
  153.  cico -d 9 -p your_password
  154.  
  155. which will  produce  a  lot  of  debugging  output.  Setting  the
  156. debugging  level  to less than 9 produces less output. Level 4 is
  157. sufficient to monitor the dial-up and login sequence.
  158.  
  159. ALIAS DATABASE
  160.  
  161. The user can define aliases for (groups of) mail  addresses.  The
  162. format  of  the alias data base is simple: it is a text file with
  163. on each line:
  164.  
  165.  alias replacement part
  166.  
  167. The replacement  part  may  be  one  or  more  words;  words  are
  168. separated  by  blanks,  tabs  or commas. Whenever the smail (mail
  169. spooler) program recognizes an  alias,  it  is  replaced  by  the
  170. `replacement'  part.  Aliases  may  be  defined in terms of other
  171. aliases; also the order in which they appear in  the  alias  data
  172. base  is not important (except when an alias is defined more than
  173. once; the program  remembers  only  the  last  definition  of  an
  174. alias).  The  alias  expansion software is smart enough to detect
  175. infinite loops and to suppress multiple occurrances of  the  same
  176. recipient. Alias substitution is not case-sensitive.
  177.  
  178. BATCH-MODE OPERATION
  179.  
  180. The cmail program can be run from a batch file (say each time the
  181. pc  is  turned on), contact the UNIX host, and report if there is
  182. new mail. Also, you may want to auto-execute  the  cmail  command
  183. when exiting from the interactive mail shell. See the manual page
  184. in the cmail.c source.
  185.  
  186.