home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 13 / MA_Cover_13.bin / source / c / stefanb_src / ums / install / install_ums-rfc
Encoding:
Text File  |  1999-02-20  |  32.3 KB  |  1,222 lines

  1. ; $VER: Install_UMS-RFC 1.0 (22.02.99)
  2.  
  3. ( if (= @language "english")
  4. (
  5.   (set #intro
  6.   (cat "Installing UMS RFC (UUCP/NNTP/SMTP/POP) network driver..."
  7.   ))
  8.   (set #requires
  9.   (   cat "This installer script requires at least UMS-server 11.32 and "
  10.        "ums.library 11.19"
  11.   ))
  12.   (set #rexxdossupport
  13.   (cat "Copying rexxdossupport.library..."
  14.   ))
  15.   (set #cannotwrite
  16.   (cat "Unable to write variable: "
  17.   ))
  18.   (set #cannotdel
  19.   (cat "Unable to delete variable: "
  20.   ))
  21.   (set #cannotread
  22.   (cat "Unable to read variable: "
  23.   ))
  24.   (set #info
  25.   (cat "You should have completed the installation of UMS itself before "
  26.        "you can use this script.\n\n"
  27.  
  28.        "If you are using more than one newsfeed you'll most likely have "
  29.        "to adjust the configuration manually. Please read all "
  30.        "documentation!.\n\n"
  31.   ))
  32.   (set #copying
  33.   (cat "Copying files..."
  34.   ))
  35.   (set #dest
  36.   (cat "In which disk or drawer did you install Universal Message System?\n\n"
  37.  
  38.        "You can install \"in place\" if you already unpacked the archive "
  39.        "directly to  the correct destination (in that case just select ok)."
  40.   ))
  41.   (set #sysopaccount
  42.   (cat "Please enter the sysop account on your UMS system"
  43.   ))
  44.   (set #sysoppassword
  45.   (cat "Please enter the sysop password"
  46.   ))
  47.   (set #nologin
  48.   (cat "unable to login"
  49.   ))
  50.   (set #alreadyinstalled
  51.   (cat "RFC subsystem already installed"
  52.   ))
  53.   (set #instlibs
  54.   (cat "Installing libraries"
  55.   ))
  56.   (set #protocols
  57.   (cat "Which transfer protocols do you want to use?"
  58.   ))
  59.   (set #noprotocols
  60.   (cat "If you aren't using any protocols there's no need for UMSRFC!"
  61.   ))
  62.   (set #needpop
  63.   (cat "If you do not have a permanent domainname you need at least "
  64.        "a POP account to receive mail (and use UMSRFC)!"
  65.   ))
  66.   (set #encoding
  67.   (cat "When exporting messages which contain non-ASCII characters for "
  68.        "transportation over non-transparent (that is 8 bit clean) links, "
  69.        "UMS RFC can encode them according to the MIME standard."
  70.   ))
  71.   (set #mailquotedprintable
  72.   (cat "encode mail as quoted-printable"
  73.   ))
  74.   (set #newsquotedprintable
  75.   (cat "encode news as quoted-printable"
  76.   ))
  77.   (set #shortusername
  78.   (cat "Please enter a short username (if you are using POP enter the POP "
  79.        "username) for "
  80.   ))
  81.   (set #cannotcreate
  82.   (cat "Cannot create RFC exporter!"
  83.   ))
  84.   (set #useuucpcall
  85.   (cat "In order to transfer news and mail just call the script "
  86.   ))
  87.   (set #hostnamestatus
  88.   (cat "Status of your host's name (temporary changes on every internet "
  89.        "connection and is common for SLIP or PPP)"
  90.   ))
  91.   (set #hntemp
  92.   (cat "temporary"
  93.   ))
  94.   (set #hnperm
  95.   (cat "permanent"
  96.   ))
  97.   (set #domname
  98.   (cat "Please the domainname of your node"
  99.   ))
  100.   (set #nodename
  101.   (cat "Please enter your node's name (without domain)"
  102.   ))
  103.   (set #maps
  104.   (cat "Is your system registered in the world wide maps?"
  105.   ))
  106.   (set #confuucp
  107.   (cat "Now configuring your UUCP subsystem"
  108.   ))
  109.   (set #feedname
  110.   (cat "Please enter the name of your feed (without domain)"
  111.   ))
  112.   (set #dumb
  113.   (cat "Does your newsfeed rely on information in the UUCP mail "
  114.        "envelopes (RFC976 format) instead of parsing to RFC822 "
  115.        "header?\n\n"
  116.        "Usually it does not, but if your newsfeed is running "
  117.        "Dillon UUCP it requires this outdated information."
  118.   ))
  119.   (set #deldupes
  120.   (cat "Do you want bad jobs, which had only dupe errors "
  121.        "to be automatically deleted?\n\n"
  122.        "Normally duplicate messages are flagged as error "
  123.        "and the job is not deleted."
  124.   ))
  125.   (set #olddillon
  126.   (cat "An old UUCP installation was detected. UMS-UUCP will use "
  127.        "the config files (\"UULIB:config\", \"UULIB:L.sys\") "
  128.        "of this installation. Please check if they are correct.\n"
  129.   ))
  130.   (set #telephone
  131.   (cat "Please enter the telephone number of your newsfeed"
  132.   ))
  133.   (set #feedpw
  134.   (cat "Please enter you password for your newsfeed"
  135.   ))
  136.   (set #expmeth
  137.   (cat "Please choose exporting method for mail and news"
  138.   ))
  139.   (set #mailbatch
  140.   (cat "batch mail"
  141.   ))
  142.   (set #newsbatch
  143.   (cat "batch news"
  144.   ))
  145.   (set #mailcompress
  146.   (cat "Please select compression method for mail"
  147.   ))
  148.   (set #maxbytes
  149.   (cat "Please enter maximal number of bytes for one batch"
  150.   ))
  151.   (set #newscompress
  152.   (cat "Please select compression method for news"
  153.   ))
  154.   (set #instassign
  155.   (cat "Installing Assigns for UMS-UUCP"
  156.   ))
  157.   (set #removemanually
  158.   (cat "You have to remove some parts of the RFC installation manually "
  159.        "(e.g. AKAs, aliases)"
  160.   ))
  161.   (set #popserver
  162.   (cat "Please enter the name of your POP3 server"
  163.   ))
  164.   (set #smtpserver
  165.   (cat "Please enter the name of your SMTP server"
  166.   ))
  167.   (set #nntpserver
  168.   (cat "Please enter the name of your NNTP server"
  169.   ))
  170.   (set #poppasswd
  171.   (cat "Please the password (for the POP3 server) for user "
  172.   ))
  173.   (set #useipcall
  174.   (cat "In order to transfer news and mail just call the script "
  175.   ))
  176. ;  (set #
  177. ;  (cat
  178. ;  ))
  179. ))
  180.  
  181. ( if (= @language "deutsch")
  182. (
  183.   (set #intro
  184.   (cat "Installiere UMS RFC (UUCP/NNTP/SMTP/POP) Netzwerk Treiber..."
  185.   ))
  186.   (set #requires
  187.   (cat "Dieses Installer-Script benötigt mindesten UMS-Server 11.32 und "
  188.        "ums.library 11.19"
  189.   ))
  190.   (set #rexxdossupport
  191.   (cat "Kopiere rexxdossupport.library..."
  192.   ))
  193.   (set #cannotwrite
  194.   (cat "Kann Variable nicht schreiben: "
  195.   ))
  196.   (set #cannotdel
  197.   (cat "Kann Variable nicht löschen: "
  198.   ))
  199.   (set #cannotread
  200.   (cat "Kann Variable nicht lesen: "
  201.   ))
  202.   (set #info
  203.   (cat "Sie sollten die UMS-Server-Installation schon abgeschlossen haben, "
  204.        "bevor Sie dieses Script benutzen können.\n\n"
  205.  
  206.        "Fallst Sie mehr als einen Newsfeed benutzen müssen Sie die "
  207.        "Konfiguration von Hand ändern. "
  208.        "Bitte lesen Sie die Dokumentation!.\n\n"
  209.   ))
  210.   (set #copying
  211.   (cat "Kopiere Dateien..."
  212.   ))
  213.   (set #dest
  214.   (cat "In welche Schublade bzw. auf welches Laufwerk haben Sie das "
  215.        "Universal Message System installiert?\n\n"
  216.  
  217.        "Es ist möglich eine \"in place\" Installation durchzuführen "
  218.        "(In diesem Fall einfach OK auswählen)"
  219.   ))
  220.   (set #sysopaccount
  221.   (cat "Bitte geben Sie Ihren Sysop Account-Namen für UMS ein"
  222.   ))
  223.   (set #sysoppassword
  224.   (cat "Bitte geben Sie das Sysop Passwort ein."
  225.   ))
  226.   (set #nologin
  227.   (cat "Einloggen fehlgeschlagen"
  228.   ))
  229.   (set #alreadyinstalled
  230.   (cat "Die RFC Treiber wurden schon installiert"
  231.   ))
  232.   (set #instlibs
  233.   (cat "Installiere Libraries"
  234.   ))
  235.   (set #protocols
  236.   (cat "Welche Protokolle möchten Sie benutzen?"
  237.   ))
  238.   (set #noprotocols
  239.   (cat "Wenn Sie keines dieser Protokolle benutzen, dann brauchen Sie "
  240.        "UMS-RFC nicht!"
  241.   ))
  242.   (set #needpop
  243.   (cat "Falls sie keinen dauerhaften Domainnamen haben, dann brauchen Sie "
  244.         "zumindest einen POP-Account um Mail empfangen (und UMS-RFC "
  245.         "benutzen) zu können"
  246.   ))
  247.   (set #encoding
  248.   (cat "Wenn Nachrichten, die exportiert werden und nicht-ASCII Zeichen "
  249.        "enthalten, über nicht transparente (d.h. nicht 8-Bit) "
  250.        "Verbindungen übertragen werden, dann kann UMS RFC diese "
  251.        "Nachrichten nach dem MIME-Standard codieren."
  252.   ))
  253.   (set #mailquotedprintable
  254.   (cat "Mail \"quoted-printable\" codieren"
  255.   ))
  256.   (set #newsquotedprintable
  257.   (cat "News \"quoted-printable\" codieren"
  258.   ))
  259.   (set #shortusername
  260.   (cat "Bitte geben sie einen kurzen Benutzername (falls Sie POP benutzen "
  261.        "geben sie bitte den POP-Benutzernamen) ein für: "
  262.   ))
  263.   (set #cannotcreate
  264.   (cat "Kann RFC-Exporter nicht erzeugen!"
  265.   ))
  266.   (set #useuucpcall
  267.   (cat "Um Mail und News zu Übertragen müssen Sie einfach diese Script "
  268.        "starten: "
  269.   ))
  270.   (set #hostnamestatus
  271.   (cat "Status Ihres Hostnamens: (tempörär ändert sich bei jeder Internet-"
  272.        "Verbindung - kommt häufig bei SLIP oder PPP vor)"
  273.   ))
  274.   (set #hntemp
  275.   (cat "temporär"
  276.   ))
  277.   (set #hnperm
  278.   (cat "permanent"
  279.   ))
  280.   (set #domname
  281.   (cat "Bitte geben Sie den Domain-Namen Ihres Computers ein"
  282.   ))
  283.   (set #nodename
  284.   (cat "Bitte geben Sie den Namen Ihres Computers (ohne Domain) ein"
  285.   ))
  286.   (set #maps
  287.   (cat "Ist Ihr Computer in den weltweiten \"maps\" registriert?"
  288.   ))
  289.   (set #confuucp
  290.   (cat "Nun wird Ihr UUCP-Untersystem konfiguriert"
  291.   ))
  292.   (set #feedname
  293.   (cat "Bitte geben Sie den Namen Ihres \"Neewsfeeds\" (ohne Domain) ein"
  294.   ))
  295.   (set #dumb
  296.   (cat "Verläßt sich Ihr Newsfeed auf die Information im UUCP "
  297.        "\"Mail-Envelopes\" (RFC976 Format), anstelle die RFC822 "
  298.        "\"Header\" zu beachten?\n\n"
  299.        "Normalerweise tut das kein Newsfeed, aber das veraltete "
  300.        "Dillon UUCP benötigt diese Information."
  301.   ))
  302.   (set #deldupes
  303.   (cat "Wollen Sie, daß Nachrichtenpakete, welche nur Fehler aufgrund "
  304.        "doppelter Nachrichten enthalten, gelöscht werden?"
  305.   ))
  306.   (set #olddillon
  307.   (cat "Eine alte UUCP-Installation wurde erkannt. UMS-UUCP benutzt nur "
  308.        "die Konfigurationsdateien (\"UULIB:config\", \"UULIB:L.sys\") "
  309.        "dieser Installation. Bitte überprüfen Die die Korrektheit dieser "
  310.        "Dateien.\n"
  311.   ))
  312.   (set #telephone
  313.   (cat "Bitte geben Sie die Telefonnummer Ihres Newsfeeds ein"
  314.   ))
  315.   (set #feedpw
  316.   (cat "Bitte geben Sie das Passwort Ihres Newsfeeds ein"
  317.   ))
  318.   (set #expmeth
  319.   (cat "Bitte wählen sie die Export-Variante für Ihre Nachrichten:"
  320.   ))
  321.   (set #mailbatch
  322.   (cat "Mail \"batchen\" (zusammenfassen)"
  323.   ))
  324.   (set #newsbatch
  325.   (cat "News \"batchen\" (zusammenfassen)"
  326.   ))
  327.   (set #mailcompress
  328.   (cat "Bitte Komprimierungsmethode für Mail auswählen"
  329.   ))
  330.   (set #maxbytes
  331.   (cat "Bitte Maximalzahl von Bytes pro Batch-Datei angeben"
  332.   ))
  333.   (set #newscompress
  334.   (cat "Bitte Komprimierungsmethode für News auswählen"
  335.   ))
  336.   (set #instassign
  337.   (cat "Installiere Assigns für UMS-UUCP"
  338.   ))
  339.   (set #removemanually
  340.   (cat "Einige Teile der RFC-Installation müssen von Hand entfernt werden "
  341.        "(z.B. AKAs, Aliases)"
  342.   ))
  343.   (set #popserver
  344.   (cat "Bitte Namen Ihres POP3-Servers angeben"
  345.   ))
  346.   (set #smtpserver
  347.   (cat "Bitte Namen Ihres SMTP-Servers angeben"
  348.   ))
  349.   (set #nntpserver
  350.   (cat "Bitte Namen Ihres NNTP-Servers angeben"
  351.   ))
  352.   (set #poppasswd
  353.   (cat "Bitte geben Sie das Passwort (für den POP3-Server) für diesen "
  354.        "User ein: "
  355.   ))
  356.   (set #useipcall
  357.   (cat "Um News und Mails zu übertragen einfach diese Script ausfrufen: "
  358.   ))
  359. ;  (set #
  360. ;  (cat
  361. ;  ))
  362. ))
  363.  
  364. (procedure GETCONFIG
  365.   (
  366.     (set cmd (cat "rx //rexx/GetUMSConfig.rexx >ENV:umsvariabledata \""
  367.                      sysopaccount "\" \"" sysoppassword "\" \""
  368.                      variable "\" " options))
  369.     (debug cmd)
  370.     (set res (run cmd))
  371.  
  372. ;     (if (>= res 20)  (abort (cat #cannotread variable)))
  373.     (set data (getenv "umsvariabledata"))
  374.     (set data (substr data 0 (- (strlen data) 1)))
  375.     (debug (cat "Got (res " res ") configvariable: '" variable
  376.                 "'\ndata: '" data  "'\noptions: " options))
  377.   )
  378. )
  379.  
  380. (procedure DELCONFIG
  381.   (
  382.     (set res (run (cat "rx //rexx/SetUMSConfig.rexx \"" sysopaccount "\" \""
  383.                        sysoppassword "\" \"" variable "\"" options)))
  384.     (debug (cat "Delete configvariable: '" variable "'\noptions: " options))
  385.     (if (<> res 0)  (abort (cat #cannotdel variable)))
  386.   )
  387. )
  388.  
  389. (procedure SETCONFIG
  390.   (
  391.     (set res (run (cat "rx //rexx/SetUMSConfig.rexx \"" sysopaccount "\" \""
  392.                        sysoppassword "\" \"" variable "\" \"" data "\" "
  393.                        options)))
  394.     (debug (cat "Set configvariable: '" variable "'\ndata: '" data
  395.                 "'\noptions: " options))
  396.     (if (<> res 0)  (abort (cat #cannotwrite variable)))
  397.   )
  398. )
  399.  
  400. (transcript #intro)
  401.  
  402. (set vernum (getversion "L:umsserver"))
  403. (set ver (/ vernum 65536))
  404. (if (< ver                      11) (abort #requires))
  405. (if (< (- vernum (* ver 65536)) 32) (abort #requires))
  406.  
  407. (set vernum (getversion "LIBS:ums.library"))
  408. (set ver (/ vernum 65536))
  409. (if (< ver                      11) (abort #requires))
  410. (if (< (- vernum (* ver 65536)) 19) (abort #requires))
  411.  
  412. (welcome #info)
  413.  
  414. (complete 0)
  415.  
  416. (run "SYS:System/RexxMast")
  417. (run "Resident SYS:Rexxc/RX PURE")
  418. (copylib
  419.   (help @copylib-help)
  420.   (prompt #rexxdossupport)
  421.   (source "//libs/rexxdossupport.library")
  422.   (dest "LIBS:")
  423.   (optional "fail" "force")
  424.   (confirm)
  425. )
  426.  
  427. (complete 5)
  428.  
  429. (set sysopaccount
  430.   (askstring
  431.     (prompt #sysopaccount)
  432.     (help @askstring-help)
  433.     (default "sysop")
  434.   )
  435. )
  436.  
  437. (set sysoppassword
  438.   (askstring
  439.     (prompt #sysoppassword)
  440.     (help @askstring-help)
  441.     (default "")
  442.   )
  443. )
  444.  
  445. (set options "USER=\"rfc.default\"") (set variable "rfc.domainname") (GETCONFIG)
  446. (if (= res 20) (abort #nologin))
  447. (if (= res 0)
  448.   (
  449.     (if (askbool
  450.          (prompt #alreadyinstalled)
  451.          (choices "Uninstall" "Quit")
  452.          (help #askbool-help)
  453.        )
  454.       (
  455.         (set options "GLOBAL")
  456.         (set variable "rfc.domainname") (DELCONFIG)
  457.         (set variable "rfc.receivedname") (DELCONFIG)
  458.         (set variable "rfc.pathname") (DELCONFIG)
  459.         (set variable "rfc.mailencoding") (DELCONFIG)
  460.         (set variable "rfc.newsencoding") (DELCONFIG)
  461.         (run (cat "rx //rexx/DelUser.rexx \"" sysopaccount "\" \""
  462.                   sysoppassword "\" \"rfc.default\""))
  463.         (run (cat "rx //rexx/DelUser.rexx \"" sysopaccount "\" \""
  464.                   sysoppassword "\" \"uucp.default\""))
  465.  
  466.         (set res (run (cat "rx //rexx/UserList.rexx >T:umsusers \"" sysopaccount
  467.                            "\" \"" sysoppassword "\"")))
  468.         (set n 1)
  469.         (set username "start me up")
  470.         (until (= username "")
  471.           (
  472.             (set res (run (cat "rx //rexx/LineAfterLine.rexx "
  473.                                ">ENV:umsuser T:umsusers " n)))
  474.             (set username (getenv "umsuser"))
  475.             (if (= (substr username (- (strlen username) 1) 1) "\n")
  476.               (
  477.                 (set username (substr username 0 (- (strlen username) 1)))
  478.               )
  479.             )
  480.  
  481.             (debug (cat "found user #" n ": \"" username "\""))
  482.             (if (<> username "")
  483.               (
  484.                 (set options (cat "USER=\"" username "\""))
  485.                 (set variable "rfc.username") (DELCONFIG)
  486.               )
  487.             )
  488.             (set n (+ n 1))
  489.           )
  490.         )
  491.  
  492.         (message #removemanually)
  493.       )
  494.     )
  495.     (exit)
  496.   )
  497. )
  498.  
  499. (complete 10)
  500.  
  501. (set @default-dest
  502.   (expandpath
  503.     (askdir
  504.       (prompt #dest)
  505.       (help @askdir-help)
  506.       (default (expandpath "//"))
  507.     )
  508.   )
  509. )
  510.  
  511. (set inplace (= (expandpath "//") @default-dest))
  512.  
  513. (if (<> (substr @default-dest (- (strlen @default-dest) 1) 1) ":")
  514.   (
  515.     (set @default-dest (cat @default-dest "/"))
  516.   )
  517. )
  518.  
  519. (if (= inplace 0)
  520.   (
  521.     (set n 0)
  522.     (while
  523.       (set filename
  524.         (select n "//Bin/compress"
  525.                   "//Bin/freeze"
  526.                   "//Bin/gzip"
  527.                   "//Bin/setnntpdate"
  528.                   "//Bin/telser"
  529.                   "//Bin/ums2uucp"
  530.                   "//Bin/umsnntp"
  531.                   "//Bin/umsnntpd"
  532.                   "//Bin/umsnntpget"
  533.                   "//Bin/umspop3"
  534.                   "//Bin/umspop3d"
  535.                   "//Bin/umsrfcprint"
  536.                   "//Bin/umsrfcwrite"
  537.                   "//Bin/umssmtp"
  538.                   "//Bin/umssmtpd"
  539.                   "//Bin/uucico"
  540.                   "//Bin/uuxqt"
  541.                   "//rexx/SetUMSConfig.rexx"
  542.                   "//rexx/GetUMSConfig.rexx"
  543.                   "//rexx/MakeUser.rexx"
  544.                   "//rexx/AddAlias.rexx"
  545.                   "//rexx/AddAKAs.rexx"
  546.                   "//rexx/DelUser.rexx"
  547.                   "//rexx/UserList.rexx"
  548.                   ""
  549.         )
  550.       )
  551.       (
  552.         (copylib
  553.           (help @copylib-help)
  554.           (prompt #copying)
  555.           (source filename)
  556.           (dest (tackon @default-dest (pathonly (substr filename 2))))
  557.           (optional "force" "askuser")
  558.           (infos)
  559.         )
  560.         (set n (+ n 1))
  561.       )
  562.     )
  563.  
  564.     (complete 20)
  565.  
  566.     (set n 0)
  567.     (makedir (tackon @default-dest "doc"))
  568.     (makedir (tackon @default-dest "networks"))
  569.     (makedir (tackon @default-dest "networks/RFC"))
  570.     (while
  571.       (set filename
  572.         (select n "//Doc/english/umsrfc.guide"
  573.                   "//Doc/english/umsrfc.txt"
  574.                   "//Doc/english/uucico.txt"
  575.                   "//Networks/RFC/convert/ConvAUUCPMail.rexx"
  576.                   "//Networks/RFC/convert/ConvAUUCPNews"
  577.                   "//Networks/RFC/convert/Readme"
  578.                   "//Networks/RFC/db/telser.conf"
  579.                   "//Networks/RFC/db/telser.hosts"
  580.                   "//Networks/RFC/lib/config"
  581.                   "//Networks/RFC/lib/L.Ports"
  582.                   "//Networks/RFC/lib/L.Sys"
  583.                   "//Networks/RFC/lib/security"
  584.                   "//Networks/RFC/lib/seq"
  585.                   "//Networks/RFC/src/History"
  586.                   ""
  587.         )
  588.       )
  589.       (
  590.         (copyfiles
  591.           (help @copyfiles-help)
  592.           (prompt #copying)
  593.           (source filename)
  594.           (dest (tackon @default-dest (pathonly (substr filename 2))))
  595.           (optional "force" "askuser")
  596.           (infos)
  597.         )
  598.         (set n (+ n 1))
  599.       )
  600.     )
  601.   )
  602. )
  603.  
  604. (complete 30)
  605.  
  606. (set n 0)
  607. (while
  608.   (set filename
  609.     (select n "//Libs/OwnDevUnit.library"
  610.               "//Libs/rawin.library"
  611.               "//Libs/umsrfc.library"
  612.               ""
  613.     )
  614.   )
  615.   (
  616.     (copylib
  617.       (help @copylib-help)
  618.       (prompt #instlibs)
  619.       (source filename)
  620.       (dest "LIBS:")
  621.       (optional "force" "askuser")
  622.       (infos)
  623.     )
  624.     (set n (+ n 1))
  625.   )
  626. )
  627.  
  628. (complete 35)
  629.  
  630. ; -------------------------------------------------------------------------
  631.  
  632. (set amitcp (exists "AmiTCP:AmiTCP"))
  633.  
  634. (if amitcp
  635.   (
  636.     (copylib
  637.       (help @copylib-help)
  638.       (prompt #copying)
  639.       (source "//devs/telser.device")
  640.       (dest "DEVS:")
  641.       (optional "force" "askuser")
  642.       (infos)
  643.     )
  644.     (set protocoldefaults 15)
  645.   )
  646.   (
  647.     (set protocoldefaults 1)
  648.   )
  649. )
  650.  
  651. (set protocols
  652.   (askoptions
  653.     (prompt #protocols)
  654.     (help @askoptions-help)
  655.     (choices "UUCP" "SMTP" "NNTP" "POP3")
  656.     (default protocoldefaults)
  657.   )
  658. )
  659.  
  660. (if (= protocols 0)
  661.   (
  662.     (abort #noprotocols)
  663.   )
  664. )
  665.  
  666. (if (in protocols 0)
  667.   (
  668.     (set temporarydomainname 0)
  669.   )
  670.   (
  671.     (set choice
  672.       (askchoice
  673.         (prompt #hostnamestatus)
  674.         (choices #hntemp #hnperm)
  675.         (help @askchoice-help)
  676.       )
  677.     )
  678.     (set temporarydomainname (= choice 0))
  679.   )
  680. )
  681.  
  682. (if temporarydomainname
  683.   (
  684.     (if (not (in protocols 3)) ; POP3
  685.       (
  686.         (abort #needpop)
  687.       )
  688.     )
  689.   )
  690.   (
  691.     (set nodename
  692.       (askstring
  693.         (prompt #nodename)
  694.         (help @askstring-help)
  695.         (default "mysystem")
  696.       )
  697.     )
  698.  
  699.     (set options "GLOBAL QUOTED")
  700.  
  701.     (set domainname
  702.       (askstring
  703.         (prompt #domname)
  704.         (help @askstring-help)
  705.         (default (cat nodename ".do.main"))
  706.       )
  707.     )
  708.     (set variable "rfc.domainname") (set data domainname) (SETCONFIG)
  709.  
  710.     (if (= 1 (askchoice
  711.                (prompt #maps)
  712.                (choices "no" "yes")
  713.                (help @askchoice-help)
  714.              )
  715.         )
  716.       (
  717.         (set variable "rfc.pathname") (set data nodename) (SETCONFIG)
  718.       )
  719.     )
  720.  
  721.     (set options "GLOBALONLY")
  722.     (set variable "SYSNAME") (GETCONFIG)
  723.     (if (= data "_not_configured_")
  724.       (
  725.         (set options "GLOBAL")
  726.         (set data domainname)
  727.         (SETCONFIG)
  728.       )
  729.     )
  730.   )
  731. )
  732.  
  733. (complete 40)
  734.  
  735. (run (cat "rx //rexx/AddAlias.rexx \"" sysopaccount "\" \""
  736.           sysoppassword "\" \"" sysopaccount "\" \"postmaster\""))
  737.  
  738. (set res (run (cat "rx //rexx/UserList.rexx >T:umsusers \"" sysopaccount
  739.                    "\" \"" sysoppassword "\"")))
  740. (set n 1)
  741. (set username "start me up")
  742. (until (= username "")
  743.   (
  744.     (set res (run (cat "rx //rexx/LineAfterLine.rexx >ENV:umsuser T:umsusers " n)))
  745.     (set username (getenv "umsuser"))
  746.     (if (= (substr username (- (strlen username) 1) 1) "\n")
  747.       (
  748.         (set username (substr username 0 (- (strlen username) 1)))
  749.       )
  750.     )
  751.  
  752.     (debug (cat "found user #" n ": \"" username "\""))
  753.     (if (<> username "")
  754.       (
  755.         (set options (cat "USER=\"" username "\""))
  756.         (set variable "EXPORT") (GETCONFIG)
  757.         (if (<> res 0)
  758.           (
  759.             (set variable "rfc.username") (GETCONFIG)
  760.             (if (<> res 0)
  761.               (
  762.                 (set data
  763.                   (askstring
  764.                     (prompt (cat #shortusername username))
  765.                     (help @askstring-help)
  766.                   )
  767.                 )
  768.                 (SETCONFIG)
  769.                 (run (cat "rx //rexx/AddAlias.rexx \"" sysopaccount "\" \""
  770.                           sysoppassword "\" \"" username "\" \"" data "\""))
  771.               )
  772.             )
  773.           )
  774.         )
  775.       )
  776.     )
  777.     (set n (+ n 1))
  778.   )
  779. )
  780.  
  781. (complete 50)
  782.  
  783. (set opts
  784.   (askoptions
  785.     (prompt #encoding)
  786.     (choices #mailquotedprintable #newsquotedprintable)
  787.     (default 0)
  788.     (help @askoptions-help)
  789.   )
  790. )
  791.  
  792. (complete 60)
  793.  
  794. (set options "GLOBAL")
  795. (set variable "rfc.mailencoding") (set data (if (in opts 0) 1 0)) (SETCONFIG)
  796. (set variable "rfc.newsencoding") (set data (if (in opts 1) 1 0)) (SETCONFIG)
  797.  
  798. (if (in protocols 0) ; UUCP
  799.   (
  800.     (message #confuucp)
  801.     (set uucpfeed
  802.       (askstring
  803.         (prompt #feedname)
  804.         (help @askstring-help)
  805.         (default "feed")
  806.       )
  807.     )
  808.     (set dumbhost
  809.       (askbool
  810.         (prompt #dumb)
  811.         (default 1)
  812.         (help @askbool-help)
  813.       )
  814.     )
  815.     (set deletedupes
  816.       (askbool
  817.         (prompt #deldupes)
  818.         (default 0)
  819.         (help @askbool-help)
  820.       )
  821.     )
  822.     (set dillon (exists "UULIB:config" (noreq)))
  823.  
  824.     (if dillon
  825.       (
  826.         (message #olddillon)
  827.       )
  828.       (
  829.         (set feedphone
  830.           (askstring
  831.             (prompt #telephone)
  832.             (help @askstring-help)
  833.             (default "08154711")
  834.           )
  835.         )
  836.         (set uucppassword
  837.           (askstring
  838.             (prompt #feedpw)
  839.             (help @askstring-help)
  840.             (default "secret")
  841.           )
  842.         )
  843.       )
  844.     )
  845.     (complete 65)
  846.     (set batch
  847.       (askoptions
  848.         (prompt #expmeth)
  849.         (default 2)
  850.         (help @askoptions-help)
  851.         (choices #mailbatch #newsbatch)
  852.       )
  853.     )
  854.     (if (in batch 0)
  855.       (
  856.         (set mailcompress
  857.           (askchoice
  858.             (prompt #mailcompress)
  859.             (default 0)
  860.             (help @askchoices-help)
  861.             (choices "none (\"rbsmtp\" command)"
  862.                      "compress (\"rcbsmtp\" command)"
  863.                      "compress (\"rbcsmtp\" command)"
  864.                      "freeze (\"rfbsmtp\" command)"
  865.                      "freeze (\"rbfsmtp\" command)"
  866.                      "gzip (\"rgbsmtp\" command)"
  867.                      "gzip (\"rbgsmtp\" command)" )
  868.           )
  869.         )
  870.         (
  871.           (set maxmailcompress
  872.             (asknumber
  873.               (prompt #maxbytes)
  874.               (default 65536)
  875.               (help @asknumber-help)
  876.             )
  877.           )
  878.         )
  879.       )
  880.     )
  881.  
  882.     (complete 70)
  883.  
  884.     (if (in batch 1)
  885.       (
  886.         (set newscompress
  887.           (askchoice
  888.             (prompt #newscompress)
  889.             (default 1)
  890.             (help @askchoices-help)
  891.             (choices "none"
  892.                      "compress"
  893.                      "freeze"
  894.                      "gzip (\"#! gunbatch\" header)"
  895.                      "gzip (\"#! zunbatch\" header)")
  896.           )
  897.         )
  898.         (
  899.           (set maxnewscompress
  900.             (asknumber
  901.               (prompt #maxbytes)
  902.               (default 65536)
  903.               (help @asknumber-help)
  904.             )
  905.           )
  906.         )
  907.       )
  908.     )
  909.     (if (= dillon 0)
  910.       (
  911.         (makedir (tackon @default-dest "networks/RFC/spool"))
  912.         (makedir (tackon @default-dest "networks/RFC/pub"))
  913.         (startup "UUCP"
  914.           (prompt #instassign)
  915.           (help @startup-help)
  916.           (command (cat "Assign UULIB: \"" (tackon @default-dest "networks/RFC/lib\"\n")))
  917.           (command (cat "Assign UUSPOOL: \"" (tackon @default-dest "networks/RFC/spool\"\n")))
  918.           (command (cat "Assign UUPUB: \"" (tackon @default-dest "networks/RFC/pub\"\n")))
  919.         )
  920.       )
  921.     )
  922.     (if (= dillon 0)
  923.       (
  924.         (textfile
  925.           (dest (tackon @default-dest "networks/RFC/lib/seq"))
  926.           (append "0000")
  927.         )
  928.         (textfile
  929.           (dest (tackon @default-dest "networks/RFC/lib/config"))
  930.  
  931.           (append "#\n")
  932.           (append "#  UULIB:config & S:UUConfig -- UUCP Configuration\n\n")
  933.           (append "#  Notes: - Copy this file to S:UUConfig\n")
  934.           (append "#         - UULIB:config and S:UUConfig must be the same file!\n")
  935.           (append "#\n\n")
  936.           (append "#  Node name\n")
  937.           (append "#  WARNING: some UUCP systems can't handle names longer than 7 characters!\n")
  938.           (append (cat "NodeName      " nodename "\n\n"))
  939.           (append "#  User name\n")
  940.           (append (cat "UserName      " shortusername "\n\n"))
  941.           (append "#  Log level\n")
  942.           (append "Debug         0\n\n")
  943.           (append "#  Processor for incoming packets (Default: Uuxqt)\n")
  944.           (append "#Uuxqt        uuxqt\n\n")
  945.           (append "#  Spool directory (Default: UUSPOOL:)\n")
  946.           (append "#UUSpool      UUSPOOL:\n\n")
  947.           (append "#  Config directory (Default: UULIB:)\n")
  948.           (append "#UULib        UULIB:\n\n")
  949.           (append "#  Public directory (Default: UUPUB:)\n")
  950.           (append "#UUPub        UUPUB:\n\n")
  951.           (append "#  Modem init string\n")
  952.           (append "#ModemInit    ATZ\n\n")
  953.           (append "#  Modem answer read timeouts in seconds (default 60)\n")
  954.           (append "#TimeOut      60\n\n")
  955.         )
  956.  
  957.         (textfile
  958.           (dest (tackon @default-dest "networks/RFC/lib/L.sys"))
  959.  
  960.           (append "#\n")
  961.           (append "#  UULIB:L.sys -- UUCP sites we connect to\n")
  962.           (append "#\n")
  963.           (append "# Node   Time Device Baudrate Number/     Expect-Send strings\n")
  964.           (append "#                             Dialstring\n")
  965.           (append "#\n")
  966.           (append (cat uucpfeed " Any  SER:   38400    ATD" feedphone))
  967.           (append (cat " ogin:-\\r-ogin: " nodename " ssword: " uucppassword "\\r\n"))
  968.         )
  969.       )
  970.     )
  971.  
  972.     (complete 75)
  973.  
  974.     (set cmd (cat "rx //rexx/MakeUser.rexx \"" sysopaccount "\" \""
  975.                   sysoppassword "\" \"uucp." uucpfeed "\" \"uucp.default\" "
  976.                   "EXPORTER "
  977.                   "READACCESS=\"~(fidonet.#?|maus.#?|zer.#?|qwk.#?)\" "
  978.                   "WRITEACCESS=\"#?\" IMPORT=\"#?\" "
  979.                   "EXPORT=\"~(#?@fidonet|#?.(un|%)maus|#?.zer|#?@qwk)\""))
  980.     (debug cmd)
  981.     (if (<> (run cmd) 0)  (abort #cannotcreate))
  982.  
  983.     (set options (cat "USER=\"uucp." uucpfeed "\""))
  984.  
  985.     (set variable "uucp.nodename") (set data nodename) (SETCONFIG)
  986.  
  987.     (if dumbhost
  988.       (
  989.         (set variable "uucp.envelope") (set data "1") (SETCONFIG)
  990.       )
  991.       (
  992.         (set variable "uucp.envelope") (set data "2") (SETCONFIG)
  993.       )
  994.     )
  995.     (if deletedupes
  996.       (
  997.         (set variable "uucp.keepdupes") (set data "N") (SETCONFIG)
  998.       )
  999.       (
  1000.         (set variable "uucp.keepdupes") (set data "Y") (SETCONFIG)
  1001.       )
  1002.     )
  1003.  
  1004.     (set variable "uucp.mailexport")
  1005.     (if (in batch 0)
  1006.       (
  1007.         (set data (cat
  1008.           (select mailcompress "rbsmtp,,Y,,,"
  1009.                                "rcbsmtp,,Y,compress,,"
  1010.                                "rbcsmtp,,Y,compress,,"
  1011.                                "rfbsmtp,,Y,freeze,,"
  1012.                                "rbfsmtp,,Y,freeze,,"
  1013.                                "rgbsmtp,,Y,gzip,,"
  1014.                                "rbgsmtp,,Y,gzip,,"
  1015.           )
  1016.           maxmailcompress)
  1017.         )
  1018.       )
  1019.       (
  1020.         (set data "rmail")
  1021.       )
  1022.     )
  1023.     (SETCONFIG)
  1024.  
  1025.     (set variable "uucp.newsexport")
  1026.     (if (in batch 1)
  1027.       (
  1028.         (set data (cat
  1029.           (select newscompress "rnews,,Y,,,"
  1030.                                "rnews,,Y,compress,cunbatch,"
  1031.                                "rnews,,Y,freeze,funbatch,"
  1032.                                "rnews,,Y,gzip,gunbatch,"
  1033.                                "rnews,,Y,gzip,zunbatch,"
  1034.           )
  1035.           maxnewscompress)
  1036.         )
  1037.       )
  1038.       (
  1039.         (set data "rnews,,N")
  1040.       )
  1041.     )
  1042.     (SETCONFIG)
  1043.  
  1044.     (textfile
  1045.       (dest (tackon @default-dest "bin/UUCPCall"))
  1046.  
  1047.       (append (cat "ums2uucp -h" uucpfeed "\n"))
  1048.       (append (cat "uucico -s" uucpfeed "\n"))
  1049.     )
  1050.     (protect (tackon @default-dest "bin/UUCPCall") 66)
  1051.     (message #useuucpcall "\"" (tackon @default-dest "bin/UUCPCall") "\"")
  1052.   )
  1053. )
  1054.  
  1055. (complete 80)
  1056.  
  1057. (if (in protocols 1 2 3) ; SMTP/NNTP/POP3
  1058.   (
  1059.     (set cmd (cat "rx //rexx/MakeUser.rexx \"" sysopaccount "\" \""
  1060.                   sysoppassword "\" \"rfc.default\" SMTP POP3 NNTP "))
  1061.  
  1062.     (if (not temporarydomainname)
  1063.       (
  1064.         (set cmd (cat cmd "SMTPD POP3D NNTPD "))
  1065.       )
  1066.     )
  1067.  
  1068.     (set cmd (cat cmd "EXPORT=\"~(#?@fidonet|#?.(un|%)maus|#?.zer|#?@qwk)\""
  1069.                   "READACCESS=\"~(fidonet.#?|maus.#?|zer.#?|qwk.#?)\" "
  1070.                   "WRITEACCESS=\"#?\" IMPORT=\"#?\" EXPORTER"))
  1071.     (debug cmd)
  1072.     (if (<> (run cmd) 0)  (abort #cannotcreate))
  1073.  
  1074.     (set options "USER=\"rfc.default\"")
  1075.  
  1076.     (if (in protocols 1) ; SMTP
  1077.       (
  1078.         (set smtpserver
  1079.           (askstring
  1080.             (prompt #smtpserver)
  1081.             (help @askstring-help)
  1082.             (default "postoffice.do.main")
  1083.           )
  1084.         )
  1085.       )
  1086.     )
  1087.  
  1088.     (complete 85)
  1089.  
  1090.     (if (in protocols 2) ; NNTP
  1091.       (
  1092.         (set nntpserver
  1093.           (askstring
  1094.             (prompt #nntpserver)
  1095.             (help @askstring-help)
  1096.             (default "news.do.main")
  1097.           )
  1098.         )
  1099.  
  1100.         (set options "USER=\"rfc.default\" QUOTED")
  1101.  
  1102.         (set data "*\"de.comm.software.ums\\nde.comp.sys.amiga.#?\\nde.newusers.#?*\"")
  1103.         (set variable "nntpget.groups" ) (SETCONFIG)
  1104.       )
  1105.     )
  1106.  
  1107.     (complete 90)
  1108.  
  1109.     (set poppoll "")
  1110.  
  1111.     (if (in protocols 3) ; POP3
  1112.       (
  1113.         (set popserver
  1114.           (askstring
  1115.             (prompt #popserver)
  1116.             (help @askstring-help)
  1117.             (default "postoffice.do.main")
  1118.           )
  1119.         )
  1120.  
  1121.         (set popaka "")
  1122.  
  1123.         (set res (run (cat "rx //rexx/UserList.rexx >T:umsusers \""
  1124.                            sysopaccount "\" \"" sysoppassword "\"")))
  1125.         (set n 1)
  1126.         (set username "start me up")
  1127.         (until (= username "")
  1128.           (
  1129.             (set res (run (cat "rx //rexx/LineAfterLine.rexx >ENV:umsuser "
  1130.                                "T:umsusers " n)))
  1131.             (set username (getenv "umsuser"))
  1132.             (if (= (substr username (- (strlen username) 1) 1) "\n")
  1133.               (
  1134.                 (set username (substr username 0 (- (strlen username) 1)))
  1135.               )
  1136.             )
  1137.  
  1138.             (debug (cat "found user #" n ": \"" username "\""))
  1139.             (if (<> username "")
  1140.               (
  1141.                 (set options (cat "USER=\"" username "\""))
  1142.                 (set variable "rfc.username") (GETCONFIG)
  1143.                 (if (= res 0)
  1144.                   (
  1145.                     (set popuser data)
  1146.                     (set popaka (cat popaka data "|" ))
  1147.  
  1148.                     (set poppasswd
  1149.                       (askstring
  1150.                         (prompt (cat #poppasswd data))
  1151.                         (help @askstring-help)
  1152.                         (default "secret")
  1153.                       )
  1154.                     )
  1155.                     (set poppoll (cat poppoll "umspop3 -h" popserver " -n"
  1156.                                       data " -i" poppasswd "\n"))
  1157.                   )
  1158.                 )
  1159.               )
  1160.             )
  1161.             (set n (+ n 1))
  1162.           )
  1163.         )
  1164.         (if temporarydomainname
  1165.           (
  1166.             (set options "USER=\"rfc.default\" QUOTED")
  1167.             (set variable "rfc.domainname") (set data popserver) (SETCONFIG)
  1168.             (set variable "rfc.noownfqdn") (set data "y") (SETCONFIG)
  1169.             (set variable "MSGID")
  1170.             (set data (cat "$serial *\"%" popuser "@" popserver "*\""))
  1171.             (SETCONFIG)
  1172.           )
  1173.         )
  1174.         (if (not (= popaka ""))
  1175.           (
  1176.             (run (cat "rx //rexx/AddAKAs.rexx \"" sysopaccount "\" \""
  1177.                       sysoppassword "\" \"(%|#?'%)("
  1178.                       (substr popaka 0 (- (strlen popaka) 1))
  1179.                       ")@" popserver "\""))
  1180.           )
  1181.         )
  1182.       )
  1183.     )
  1184.  
  1185.     (complete 95)
  1186.  
  1187.     (textfile
  1188.       (dest (tackon @default-dest "bin/IPCall"))
  1189.  
  1190.       (if temporarydomainname
  1191.         (
  1192.           (append (cat "SetUMSConfig.rexx \"rfc.default\" \"\" "
  1193.                        "\"rfc.privatehost\" `hostname`\n"))
  1194.         )
  1195.       )
  1196.       (if (in protocols 1)
  1197.         (
  1198.           (append (cat "umssmtp -h" smtpserver "\n"))
  1199.         )
  1200.       )
  1201.       (if (in protocols 2)
  1202.         (
  1203.           (append (cat "umsnntp -h" nntpserver "\n"))
  1204.           (append (cat "umsnntpget -h" nntpserver "\n"))
  1205.         )
  1206.       )
  1207.       (append poppoll)
  1208.     )
  1209.     (protect (tackon @default-dest "bin/IPCall") 66)
  1210.     (message #useipcall "\"" (tackon @default-dest "bin/IPCall") "\"")
  1211.   )
  1212. )
  1213.  
  1214. (if (not temporarydomainname)
  1215.   (
  1216.     (run (cat "rx //rexx/AddAKAs.rexx \"" sysopaccount "\" \""
  1217.               sysoppassword "\" \"#?@" domainname "\""))
  1218.   )
  1219. )
  1220.  
  1221. (exit)
  1222.