home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / vmsnet / sources / 484 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  21.5 KB

  1. Path: sparky!uunet!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources
  2. Newsgroups: vmsnet.sources
  3. From: duck@pembvax1.pembroke.edu
  4. Subject: mailserver - can be run from regular account, part01/01
  5. Message-ID: <10032477@MVB.SAIC.COM>
  6. Date: Mon, 11 Jan 1993 11:11:21 GMT
  7. Organization: Pembroke State University
  8. Lines: 499
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: duck@pembvax1.pembroke.edu
  12. Posting-number: Volume 4, Issue 38
  13. Archive-name: mailserver/part01
  14.  
  15. This package is a mailserver written in DCL code that can easily be custom
  16. modified. It is designed to run from a single user account such that the 
  17. subject line is scanned for certain text (usually a subject line of MAILSER).
  18. It also supports binary sends via uuencode and brief documentation on setup is
  19. included. The ability to subscribe to a mailing list (mag.dis in the workdir)
  20. is also provided for.
  21.  
  22. - Craig Taylor   - 919-521-3814   All Relevant Disclaimers Apply!!!
  23.         duck@pembvax1.pembroke.edu (Pembroke State University)
  24.  
  25. $! ------------------ CUT HERE -----------------------
  26. $ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
  27. $!
  28. $! This archive created by VMS_SHARE Version 8.1
  29. $!   On 11-JAN-1993 03:03:30.32   By user BERRYMAN    
  30. $!
  31. $! The VMS_SHARE software that created this archive
  32. $!    was written by  Andy Harper, Kings College London UK
  33. $!    -- September 1992
  34. $!
  35. $! Credit is due to these people for their original ideas:
  36. $!    James Gray, Michael Bednarek 
  37. $!
  38. $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
  39. $! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
  40. $!
  41. $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
  42. $!       1. AAAREADME.1ST;1
  43. $!       2. DOMAIL.COM;44
  44. $!       3. SCAN.COM;5
  45. $!
  46. $set="set"
  47. $set symbol/scope=(nolocal,noglobal)
  48. $f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID"))
  49. $e="write sys$error  ""%UNPACK"", "
  50. $w="write sys$output ""%UNPACK"", "
  51. $ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
  52. $ ve=f$getsyi("version")
  53. $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
  54. $ e "-E-OLDVER, Must run at least VMS 4.4"
  55. $ v=f$verify(v)
  56. $ exit 44
  57. $unpack: subroutine ! P1=filename, P2=checksum, P3=attributes
  58. $ if f$search(P1) .eqs. "" then $ goto file_absent
  59. $ e "-W-EXISTS, File ''P1' exists. Skipped."
  60. $ delete 'f'*
  61. $ exit
  62. $file_absent:
  63. $ if f$parse(P1) .nes. "" then $ goto dirok
  64. $ dn=f$parse(P1,,,"DIRECTORY")
  65. $ w "-I-CREDIR, Creating directory ''dn'"
  66. $ create/dir 'dn'
  67. $ if $status then $ goto dirok
  68. $ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped."
  69. $ delete 'f'*
  70. $ exit
  71. $dirok:
  72. $ w "-I-UNPACK, Unpacking file ''P1'"
  73. $ n=P1
  74. $ if P3 .nes. "" then $ n=f
  75. $ if .not. f$verify() then $ define/user sys$output nl:
  76. $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='n'
  77. PROCEDURE GetHex LOCAL x1,x2;x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,
  78. ERASE_CHARACTER(1))-1;RETURN 16*x1+x2;ENDPROCEDURE;
  79. PROCEDURE SkipPartsep LOOP EXITIF INDEX(ERASE_LINE,"-+-+-+-+-+-+-+-+")=1;
  80. ENDLOOP;ENDPROCEDURE;
  81. PROCEDURE ExpandChar CASE CURRENT_CHARACTER FROM ' ' TO 'z' ["`"]
  82. :ERASE_CHARACTER(1);COPY_TEXT(ASCII(GetHex));[" "]:ERASE_CHARACTER(1);[
  83. OUTRANGE,INRANGE]:MOVE_HORIZONTAL(1);ENDCASE;ENDPROCEDURE;
  84. PROCEDURE ProcessLine s:=ERASE_CHARACTER(1);LOOP EXITIF CURRENT_OFFSET>=LENGTH(
  85. CURRENT_LINE);ExpandChar;ENDLOOP;IF s="V" THEN APPEND_LINE;ENDIF;ENDPROCEDURE;
  86. PROCEDURE AdvanceLine MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);
  87. ENDPROCEDURE;PROCEDURE Decode POSITION(BEGINNING_OF(b));LOOP EXITIF MARK(NONE)=
  88. END_OF(b);IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;
  89. ELSE ProcessLine;AdvanceLine;ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,
  90. "UNPACK");SET(SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=
  91. GET_INFO(COMMAND_LINE,"file_name");b:=CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,
  92. GET_INFO(COMMAND_LINE,"output_file"));QUIT;
  93. $ if p3 .eqs. "" then $ goto dl
  94. $ open/write fdl &f
  95. $ write fdl "RECORD"
  96. $ write fdl P3
  97. $ close fdl
  98. $ w "-I-CONVRFM, Converting record format to ", P3
  99. $ convert/fdl=&f &f-1 &P1
  100. $dl: delete 'f'*
  101. $ if P2 .eqs. "" then $ goto ckskip
  102. $ checksum 'P1'
  103. $ if checksum$checksum .nes. P2 then $ -
  104.   e "-E-CHKSMFAIL, Checksum of ''P1' failed."
  105. $ exit
  106. $ckskip: e "-W-CHKSUMSKIP, checksum validation unavailable for ''P1'"
  107. $ endsubroutine
  108. $start:
  109. $!
  110. $ create 'f'
  111. XThis`20package`20is`20a`20mailserver`20written`20in`20DCL`20code`20that`20can
  112. V`20easily`20be`20custom
  113. Xmodified.`20It`20is`20designed`20to`20run`20from`20a`20single`20user`20account
  114. V`20such`20that`20the`20
  115. Xsubject`20line`20is`20scanned`20for`20certain`20text`20(usually`20a`20subject
  116. V`20line`20of`20MAILSER).
  117. XIt`20also`20supports`20binary`20sends`20via`20uuencode`20and`20brief`20documen
  118. Vtation`20on`20setup`20is
  119. Xincluded.`20The`20ability`20to`20subscribe`20to`20a`20mailing`20list`20(mag.di
  120. Vs`20in`20the`20workdir)
  121. Xis`20also`20provided`20for.
  122. X
  123. X-------
  124. XBasically`20I`20wrote`20it`20because`20the`20system`20admin's`20here`20at`20sc
  125. Vhool`20wouldn't`20let`20me
  126. Xuse`20their`20mailserver`20software.`20:-)`20I`20asked`20'em`20if`20I`20could
  127. V`20write`20my`20own`20and`20use
  128. Xit`20and`20they`20looked`20at`20me`20in`20suprise`20and`20say`20yeah,`20sure
  129. V`20-`20so`20here's`20the`20result.
  130. X
  131. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20Mail-Server`20Documen
  132. Vtation`20Release`20010393
  133. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
  134. V`20`20`20`20`20`20by`20Craig`20Taylor
  135. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
  136. V`20duck@pembvax1.pembroke.edu
  137. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
  138. V`20`20`20`20`20`20`20`20`20`20(c)`201993
  139. X
  140. X
  141. XThe`20following`20two`20files:`20domail.com`20and`20scan.com`20make`20up`20a
  142. V`20mail-server`20program
  143. Xwhich`20can`20be`20run`20in`20a`20user`20account`20with`20regular`20privlages.
  144. V`20The`20only`20logicals
  145. Xor`20symbols`20that`20need`20to`20be`20changed`20are`20in`20the`20file`20domai
  146. Vl.com`20and`20are:
  147. X
  148. X`20workdir`20-`20this`20is`20a`20definition`20that`20reflects`20where`20in`20y
  149. Vour`20account`20the
  150. X`20`20`20`20mailserver`20program`20is`20running`20from.`20A`20mailserver.log
  151. V`20file`20should`20also`20be
  152. X`20`20`20`20created`20initially`20with`20a`20blank`20line.`20Failure`20to`20do
  153. V`20so`20will`20cause`20the
  154. X`20`20`20`20program`20to`20abort`20with`20an`20error`20when`20run.
  155. X
  156. X`20bindir`20-`20an`20equate`20which`20reflects`20where`20files`20that`20are
  157. V`20binary`20that`20require
  158. X`20`20`20`20uuencode`20to`20be`20sent.`20A`20file`20called`20temp.txt`20will
  159. V`20be`20generated`20in`20this
  160. X`20`20`20`20directory`20`20from`20the`20uuencode`20comand`20before`20being`20s
  161. Vent.
  162. X
  163. X`20txtdir`20-`20an`20equate`20which`20reflects`20where`20all`20files`20that
  164. V`20can`20be`20sent`20without
  165. X`20`20`20`20uuencode`20are.`20The`20catalog.txt`20(for`20the`20command`20"cata
  166. Vlog")`20and
  167. X`20`20`20`20"documentation.txt"`20(for`20the`20command`20"help")`20and`20statu
  168. Vs.txt`20(for`20the
  169. X`20`20`20`20command`20"status")`20are`20assumed.`20If`20you`20wish`20to`20chan
  170. Vge,`20disable`20or`20remove`20any
  171. X`20`20`20`20of`20these`20modify`20the`20scan.com`20file`20as`20appropriate.
  172. X
  173. XTo`20install`20the`20mailserver`20mofidy`20the`20above`20definitions`20and`20e
  174. Vquates`20in
  175. Xdomail.com,`20create`20a`20mailserver.log`20with`20a`20blank`20line`20in`20the
  176. V`20workdir.`20Then`20make
  177. Xsure`20that`20the`20system`20manager`20has`20installed`20uuenccode`20or`20that
  178. V`20you`20have`20n`20equate`20
  179. Xsetup`20in`20your`20login.com.`20
  180. X
  181. XIn`20addation`20there`20is`20a`20command`20called`20"subscribe"`20which`20adds
  182. V`20the`20user's`20name`20to
  183. Xa`20file`20called`20mag.dis.`20To`20change`20the`20file`20name`20requires`20mo
  184. Vdifying`20the`20scan.com
  185. Xfile.`20
  186. X
  187. XModifying`20scan.com`20is`20fairly`20easy`20for`20a`20user`20with`20moderate
  188. V`20experience`20in`20VAX
  189. XDCL`20language.`20Those`20who`20are`20not`20famaliar`20with`20DCL`20should`20b
  190. Ve`20able`20to`20understand
  191. Xwhat`20is`20going`20on`20upon`20careful`20reading.
  192. X
  193. XThe`20mailserver`20works`20by`20first`20deleting`20any`20previous`20files,`20g
  194. Voing`20into`20mail`20and
  195. Xextracting`20all`20mail`20messages`20that`20begin`20with`20a`20subject`20line
  196. V`20of`20"mailser"`20into`20a
  197. Xfile`20in`20the`20workdir`20directory`20called`20requests.txt.`20This`20is`20d
  198. Vone`20in`20domail.com.
  199. XNote`20that`20it's`20recommended`20that`20the`20following`20is`20added`20to
  200. V`20your`20login.com`20file:
  201. X
  202. X$`20if`20f$interactive()
  203. X$`20then
  204. X.`20.`20.`20`5Bnoormal`20login.com`20file`5D
  205. X$`20else
  206. X$`20mail
  207. Xselect`20newmail
  208. Xselect/subject="mailser"
  209. Xmove/all`20mail
  210. Xexit
  211. X$`20endif
  212. X
  213. XThis`20will`20make`20sure`20that`20all`20new`20requests`20are`20in`20your`20ma
  214. Vil`20directory.`20If`20you
  215. Xwish`20to`20preview`20them`20before`20they`20are`20processed`20then`20do`20not
  216. V`20add`20the`20above`20lines.
  217. X
  218. XAlso`20you`20will`20need`20to`20create`20a`20folder`20in`20mail`20callled`20ol
  219. Vdmail.`20I`20chose`20to`20have
  220. Xthe`20mailserver`20put`20all`20the`20commands`20in`20that`20folder`20after`20i
  221. Vt`20finished`20processing
  222. Xthem`20instead`20of`20deleting`20them`20so`20that`20I`20could`20back-check`20w
  223. Vith`20them`20against`20the
  224. Xlogs`20if`20any`20errors`20cropped`20up.`20You'll`20want`20to`20periodically
  225. V`20go`20in`20there`20and
  226. Xdelete`20all`20the`20messages`20but`20one`20(if`20you`20delete`20them`20all
  227. V`20then`20the`20folder`20will
  228. Xcease`20to`20exist).
  229. X
  230. XI've`20tried`20to`20make`20this`20documentation`20as`20complete`20as`20possibl
  231. Ve`20-`20be`20sure`20to`20read
  232. Xeach`20paragraph`20fully`20and`20follow`20the`20instructions`20within.`20I'm
  233. V`20also`20interested`20in
  234. Xany`20comments`20you`20may`20have`20concerning`20it.`20One`20note`20'tho`20-
  235. V`20if`20you`20send`20me`20mail
  236. Xmake`20sure`20that`20it`20doesn't`20have`20the`20"mailser"`20subject`20line
  237. V`20or`20else`20the
  238. Xmailserver`20I'm`20running`20will`20flag`20it`20as`20a`20bunch`20of`20errors
  239. V`20(oh!`20-`20the`20error.txt
  240. Xis`20the`20file`20that`20contains`20a`20message`20stating`20that`20an`20error
  241. V`20exists).`20Use
  242. X"mail-server"`20instead.
  243. X
  244. XFor`20any`20questions`20or`20comments`20feel`20free`20to`20contact`20me`20as
  245. Xduck@pembvax1.pembroke.edu.
  246. XAnyway`20hope`20this`20helps,`20the`20documentation`20file`20is`20included`20b
  247. Velow:
  248. X
  249. X-`20Craig`20Taylor`20`20`20-`20919-521-3814`20`20`20All`20Relevant`20Disclaime
  250. Vrs`20Apply!!!
  251. X`20`20`20`20`20`20`20`20duck@pembvax1.pembroke.edu`20(Pembroke`20State`20Unive
  252. Vrsity)
  253. X
  254. X"Always`20try`20to`20do`20things`20in`20chronological`20order;`20it's`20less
  255. V`20confusing
  256. Xthat`20way."
  257. $ call unpack AAAREADME.1ST;1 219362806 ""
  258. $!
  259. $ create 'f'
  260. X$`20goto`20start
  261. X
  262. XMail-Server`20by`20Craig`20Taylor`20(duck@pembvax1.pembroke.edu)`20`20`20`20
  263. V`20`20`20`20`20`20(c)`201993
  264. X-`20written`20in`20VAX/DCL`20code`20consisting`20of`20three`20files:
  265. X`20`20`20`20`20mailserver.com`20-`20this`20file`20that`20is`20submitted`20to
  266. V`20a`20queue
  267. X`20`20`20`20`20scan.com`20`20`20`20`20`20`20-`20generates`20.com`20file`20base
  268. Vd`20on`20requests
  269. X`20`20`20`20`20doit.com`20`20`20`20`20`20`20-`20this`20is`20the`20actual`20fil
  270. Ve`20that`20is`20used`20to`20do`20the
  271. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20requests.
  272. V`20-`20regenerated`20each`20time.
  273. X
  274. XRelease`20010393
  275. X
  276. X$start:
  277. X$`20define`20workdir`20stud$disk:`5Bduck.mailserv`5D`20`20`20`20`20`20`20`20!
  278. V`20running`20directory
  279. X$`20txtdir`20:==`20"stud$disk:`5Bduck.mailserv.text`5D`20`20`20`20`20`20!`20al
  280. Vl`20the`20send`20files
  281. X$`20bindir`20:==`20"stud$disk:`5Bduck.mailserv.binary`5D`20`20`20`20!`20all
  282. V`20the`20psend`20files
  283. X$`20!
  284. X$`20set`20default`20workdir
  285. X$`20set`20noon
  286. X$`20`20`20del`20requests.txt;*`09`09`09`09`20`20!`20delete`20all`20the`20files
  287. V
  288. X$`20`20`20del`20doit.com;*
  289. X$`20set`20on
  290. X$`20!
  291. X$`20mail`09`09`09`09`09`09`20`20!`20go`20into`20mail`20and`20extract
  292. Xselect`20mail
  293. Xselect/subject="mailser"
  294. Xextract/all`20requests.txt
  295. Xmove/all`20oldmail
  296. Xquit
  297. X$`20if`20(f$search("requests.txt")`20.eqs.`20"")`20then`20goto`20endsub
  298. X$`20`20`20@scan.com`09`09`09`09`09`20`20!`20scan`20and`20generate`20files
  299. X$`20`20`20@doit.com`09`09`09`09`09`20`20!`20and`20send`20the`20files....`20
  300. X$`20endsub:
  301. X$`20wait`2000:10:00`20`20`20`20`20`20`20`20`20`20`20`20`20`20!`20make`20sure
  302. V`20time`20has`20passed`20before`20re-submitting
  303. X$`20submit/restart/nolog/after="tomorrow+2"/queue=sys$large`20workdir:domail.c
  304. Vom
  305. $ call unpack DOMAIL.COM;44 659241511 ""
  306. $!
  307. $ create 'f'
  308. X$!scan.com`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20(c)`201993`20by`20Craig
  309. V`20Taylor`20(duck@pembvax1.pembroke.edu)
  310. X$!`20-`20Scan`20and`20generate`20.com`20file`20for`20mail-server....
  311. X$!`20release`20010393
  312. X$!
  313. X$!`20parses`20requests.txt
  314. X$!
  315. X$`20set`20default`20workdir
  316. X$`20!
  317. X$`20open/read`20infil`20workdir:requests.txt
  318. X$`20open/write`20outfil`20workdir:doit.com
  319. X$`20open/append`20logfil`20workdir:mailserv.log
  320. X$`20!
  321. X$`20!`20write`20initialization`20stuff...
  322. X$`20write`20outfil`20"$`20!generated`20by`20t.com`20"`20`20!`20be`20sure`20to
  323. V`20create`20a`20new`20version.
  324. X$`20write`20logfil`20"%%-Started`20"+f$time()
  325. X$`20!`20
  326. X$`20!`20States`20->`200`20=`20looking`20for`20from
  327. X$`20!`20`20`20`20`20`20`20`20`20`20`201`20=`20skipping`20subjects`20(local)
  328. X$`20!`20`20`20`20`20`20`20`20`20`20`202`20=`20skipping`20subjects`20(far)
  329. X$`20!`20`20`20`20`20`20`20`20`20`20`203`20=`20skipping`20blanks`20/`20looking
  330. V`20for`20commands.
  331. X$`20!`20`20`20`20`20`20`20`20`20`20`204`20=`20looking`20for`20commands
  332. X$`20!`20`20`20`20`20`20`20->>>`20then`20back`20to`200.
  333. X$`20!
  334. X$`20state`20=`200
  335. X$`20whofrom`20=`20""
  336. X$`20loop:
  337. X$`20`20`20read/end=endrun`20infil`20line
  338. X$`20`20`20line=f$edit(line,"compress,`20lowercase")
  339. X$`20`20`20if`20(line`20.eqs.`20"`0C")`20
  340. X$`20`20`20then
  341. X$`20`20`20`20`20state`20=`200
  342. X$`20`20`20`20`20goto`20loop
  343. X$`20`20`20endif
  344. X$`20`20`20if`20(state`20.eqs.`203)`20.and.`20(f$length(line)`20.eqs.`200)`20th
  345. Ven`20goto`20loop
  346. X$`20`20`20if`20(state`20.eqs.`200)`20.and.`20(line`20.eqs.`20"")`20then`20goto
  347. V`20loop
  348. X$`20`20`20if`20(state`20.eqs.`200)`20.and.`20(f$locate("from:",line)`20.eqs.
  349. V`200)`20
  350. X$`20`20`20then
  351. X$`20`20`20`20`20state`20=`201
  352. X$`20`20`20`20`20num`20=`20f$length(line)-f$locate("mx%",line)-3
  353. X$`20`20`20`20`20temp`20=`20f$extract(f$locate("mx%",line),num,line)
  354. X$`20`20`20`20`20whofrom`20=`20f$extract(0,f$locate("`20",temp),temp)
  355. X$`20`20`20`20`20goto`20loop
  356. X$`20`20`20endif
  357. X$`20`20`20if`20(state`20.gt.`202)`20then`20goto`20a2
  358. X$`20`20`20if`20(line`20.nes.`20"")`20then`20goto`20loop`20`20`20`20`20`20!stat
  359. Ves`201`20and`202
  360. X$`20`20`20`20`20`20state`20=`20state+1
  361. X$`20`20`20`20`20`20goto`20loop
  362. X$`20!`20now`20=`20state`203>=`20`20->`20write`20output`20until`20null
  363. X$`20a2:
  364. X$`20state`20=`204`20`20`20
  365. X$`20`20`20if`20(line`20.eqs.`20"")`20
  366. X$`20`20`20`20`20then
  367. X$`20`20`20`20`20`20`20state`20=`200`20`20`20!`20go`20back`20to`20looking`20for
  368. V`20"from"
  369. X$`20`20`20`20`20`20`20goto`20loop
  370. X$`20`20`20`20`20else
  371. X$`20`20`20`20`20`20`20if`20(f$locate("send`20",line)`20.eqs.`200)`09`09!`20hha
  372. Vndle`20send`20command
  373. X$`20`20`20`20`20`20`20`20then
  374. X$`20`20`20`20`20`20`20`20`20`20num`20=`20f$length(line)-f$locate("send`20",lin
  375. Ve)-5
  376. X$`20`20`20`20`20`20`20`20`20`20temp`20=`20txtdir`20+`20f$extract(5,num,line)
  377. X$`20`20`20`20`20`20`20`20`20`20if`20(f$search(temp)`20.nes.`20"")`20
  378. X$`20`20`20`20`20`20`20`20`20`20`20`20then
  379. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  380. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+temp
  381. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  382. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20REQU
  383. VEST:"+line
  384. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  385. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  386. X$`09`20`20`20`20`20`20`20write`20logfil`20"SENT:`20`20`20`09`09"+line+"`09"+wh
  387. Vofrom
  388. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  389. X$`20`20`20`20`20`20`20`20`20`20`20`20else
  390. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  391. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+txtdir+"
  392. Verror.txt"
  393. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  394. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20FILE
  395. V`20NOT`20FOUND:"+line
  396. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  397. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  398. X$`09`20`20`20`20`20`20`20write`20logfil`20"%%-SEND-ERROR:`09"+line+"`09"+whofr
  399. Vom
  400. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  401. X$`20`20`20`20`20`20`20`20`20`20`20`20endif
  402. X$`20`20`20`20`20`20`20`20endif
  403. X$`20`20`20`20`20`20`20if`20(f$locate("psend`20",line)`20.eqs.`200)`09`09!`20ha
  404. Vndle`20psend`20command
  405. X$`20`20`20`20`20`20`20`20then
  406. X$`20`20`20`20`20`20`20`20`20`20num`20=`20f$length(line)-f$locate("psend`20",li
  407. Vne)-6
  408. X$`20`20`20`20`20`20`20`20`20`20temp`20=`20bindir+f$extract(6,num,line)
  409. X$`20`20`20`20`20`20`20`20`20`20if`20(f$search(temp)`20.nes.`20"")`20
  410. X$`20`20`20`20`20`20`20`20`20`20`20`20then
  411. X$`09`20`20`20`20`20`20`20write`20outfil`20"uuencode`20"+temp+"`20"+bindir+"tem
  412. Vp.txt"
  413. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  414. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+bindir+"
  415. Vtemp.txt"
  416. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  417. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20REQU
  418. VEST:"+line
  419. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  420. X$`09`20`20`20`20`20`20`20write`20outfil`20"$`20del`20"+bindir+"temp.txt;"
  421. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  422. X$`09`20`20`20`20`20`20`20write`20logfil`20"PSENT:`20`20`20`09`09"+line+"`09"+w
  423. Vhofrom
  424. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  425. X$`20`20`20`20`20`20`20`20`20`20`20`20else
  426. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  427. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+txtdir+"
  428. Verror.txt"
  429. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  430. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20FILE
  431. V`20NOT`20FOUND:"+line
  432. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  433. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  434. X$`09`20`20`20`20`20`20`20write`20logfil`20PSEND-ERROR:`09"+line+"`09"+whofrom
  435. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  436. X$`20`20`20`20`20`20`20`20`20`20`20`20endif
  437. X$`20`20`20`20`20`20`20`20endif
  438. X$`20`20`20`20`20`20`20`20if`20(f$locate("status",line)`20.eqs.`200)`20`09`09!
  439. V`20send`20file
  440. X$`20`20`20`20`20`20`20`20then
  441. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  442. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+txtdir+"
  443. Vstatus.txt"
  444. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  445. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20STAT
  446. VUS:"+line
  447. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  448. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  449. X$`09`20`20`20`20`20`20`20write`20logfil`20"STATUS`09`20`09`09`09"+whofrom
  450. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  451. X$`20`20`20`20`20`20`20`20endif
  452. X$`20`20`20`20`20`20`20`20if`20(f$locate("help",line)`20.eqs.`200)`20`09`09!
  453. V`20send`20help`20file
  454. X$`20`20`20`20`20`20`20`20then
  455. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  456. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+txtdir+"
  457. Vdocumentation.txt"
  458. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  459. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20HELP
  460. V:"+line
  461. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  462. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  463. X$`09`20`20`20`20`20`20`20write`20logfil`20"HELP`09`20`09`09`09"+whofrom
  464. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  465. X$`20`20`20`20`20`20`20`20endif
  466. X$`20`20`20`20`20`20`20`20if`20(f$locate("catalog",line)`20.eqs.`200)`20`09`09!
  467. V`20send`20catalog`20file
  468. X$`20`20`20`20`20`20`20`20then
  469. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  470. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+txtdir+"
  471. Vcatalog.txt"
  472. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  473. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20CATA
  474. VLOG:"+line
  475. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  476. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  477. X$`09`20`20`20`20`20`20`20write`20logfil`20"CATALOG`09`09`09`09"+whofrom
  478. X$`20`20`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  479. X$`20`20`20`20`20`20`20`20endif
  480. X$`20`20`20`20`20`20`20`20if`20(f$locate("subscribe",line)`20.eqs.`200)`09!`20a
  481. Vdd`20"from"`20name`202`20list
  482. X$`20`20`20`20`20`20`20`20then
  483. X$`20`20`20`20`20`20`20`20`20`20`20`20open/append`20temp_file`20workdir:mag.dis
  484. V
  485. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20temp_file`20whofrom
  486. X$`20`20`20`20`20`20`20`20`20`20`20`20close`20temp_file
  487. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20mail`20"
  488. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"send`20"+txtdir+"subscr
  489. Vibed.txt"
  490. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20whofrom
  491. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"MAILSERVER`20SUBSCRIBED
  492. V:"+line
  493. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"quit"
  494. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20outfil`20"$`20!`20"+line
  495. X$`20`20`20`20`20`20`20`20`20`20`20`20write`20logfil`20"SUBSCRIBED`09`09`09`09"
  496. V+whofrom
  497. X$`20`20`20`20`20`20`20`20`20`20`20`20goto`20loop
  498. X$`20`20`20`20`20`20`20`20endif
  499. X$`20`20`20`20endif
  500. X$`20goto`20`20loop
  501. X
  502. X$`20endrun:
  503. X$`20`20`20`20write`20logfil`20"%%-END-OF-RUN`20"+f$time()+"`20%%"
  504. X$`20`20`20`20close`20logfil
  505. X$`20`20`20`20close`20outfil
  506. X$`20`20`20`20close`20infil
  507. $ call unpack SCAN.COM;5 557998421 ""
  508. $ v=f$verify(v)
  509. $ exit
  510.