home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / ntmgr99p.zip / NETMGR.CFG < prev    next >
Text File  |  1994-10-22  |  14KB  |  440 lines

  1. ; ======================================================================
  2. ;
  3. ;  NetMgr -  copy, move, delete, change and bounce netmail. (+ more :-)
  4. ;
  5. ;            (c) 1992,93,94  Gerard van Essen (2:281/527)
  6. ;
  7. ; ======================================================================
  8. ;
  9. ;
  10. ; For 'debugging' purposes you can start netmgr with the
  11. ; -d command line switch. This will send NetMgr's interpretation
  12. ; of your config file to stdout.
  13. ; While scanning your netmail area, it will also send some info
  14. ; about the headers of the messages to stdout.
  15. ; You can easily redirect it to a file (netmgr -d > debug.txt)
  16. ; for inspection.
  17. ;
  18. ; ------
  19. ;
  20. ; NetMgr will exit as soon as an error is detected in the
  21. ; configuration (for the same reason: safety first). So if
  22. ; you change anything in the config, you should first give
  23. ; it a 'test run'.
  24. ;
  25. ; ------
  26. ;
  27. ; First your primary address.
  28. ; The zone is used as a default value for 'zoneless'
  29. ; messages...
  30. ;
  31. ; This *must* be a full 4D address (as all addresses in
  32. ; netmgr.cfg should be..). This is a bit 'strict checking',
  33. ; but with actions like 'delete' I want to take no risks.
  34.  
  35. Home 2:281/527.0
  36.  
  37. ;
  38. ; If you have a Hudson base, you can specify where it is located with the
  39. ; following keyword. Do *not* use this keyword if you don't have a Hudson
  40. ; base!
  41. ;
  42.  
  43. HudsonPath d:\msgs\hudson
  44.  
  45. ;
  46. ; If you are using Squishmail together with Binkley, you may
  47. ; want to specify the follwoing keyword.
  48. ; READ THE DOCS REGARDING THIS KEYWORD!
  49. ;
  50.  
  51. ;NoFlags
  52.  
  53. ;
  54. ; An originline, will be used for EchoCopy and EchoMove.
  55. ;
  56.  
  57. Origin   NetMgr, (c) 1992,93,94  Gerard van Essen
  58.  
  59. ;
  60. ; The location and name of your logfile. Leave this
  61. ; keyword out if you don't want a logfile.
  62. ;
  63.  
  64. Log c:\tc\netmgr\netmgr.log
  65.  
  66.  
  67. ;
  68. ; The directories to scan, usually your primary netmail dir, I guess..
  69. ;
  70. ; A '$' in front of an area indicates a Squish style area.
  71. ;
  72. ; A '!' in front of an area indicates a JAM style area.
  73. ;
  74. ; A '#' in front of an area indicates a Hudson style area.
  75. ;
  76. ; You can have as many of these as you like, NetMgr will scan
  77. ; all of them.. (watch it! You may end up moving messages to the
  78. ; area you are currently scanning, which will cause PROBLEMS!).
  79. ;
  80. ; It will scan for the masks following the ScanDir statement(s),
  81. ; until a new ScanDir statement is encountered. (And will then
  82. ; scan that new ScanDir for Masks following *that* ScanDir).
  83. ;
  84.  
  85. ScanDir c:\fd\netmsgs
  86.  
  87. ScanDir $c:\msgs\netmail
  88.  
  89. ; ===========================================================
  90. ;
  91. ; Now for the real work:
  92. ;
  93. ; Always specify both one or more 'masks' and one or more
  94. ; corresponding 'actions' for those masks.
  95. ;
  96. ; A MASK consists of six parts:
  97. ;
  98. ; fromname, fromaddress, toname, toaddress, subject, attributes
  99. ;
  100. ; -=-
  101. ;
  102. ; A 'name' is just a string, leading and trailing spaces are
  103. ; stripped, space *in* a string are allowed.
  104. ;
  105. ; A leading tilde (~) indicates you are looking for a substring.
  106. ;
  107. ; A leading exclamationmark (!) means you are looking for msgs where
  108. ; that string is *not* present.
  109. ;
  110. ; See the accompanying documentation for details.
  111. ;
  112. ; -=-
  113. ;
  114. ; An address is *always* full 4D, write a '*' for any part
  115. ; you don't care about:
  116. ;
  117. ; 60:*/*.*     -   all messages coming from zone 60
  118. ; 2:281/527.*  -   msg from any point from 281/527, or .0
  119. ; *:500/*.*    -   all msgs from nodes/points in net 500, any zone
  120. ; 2:281/527.0  -   only messages from 2:281/527 (the node, not points)
  121. ;
  122. ; Just one exception: specifying just a '*' only for the address,
  123. ; is allowed (strictly speaking, it is not full 4D :-), and is the
  124. ; same as *:*/*.*.
  125. ;
  126. ; -=-
  127. ;
  128. ; Attributes can be one or more of the following:
  129. ;
  130. ; p = private
  131. ; c = crash
  132. ; r = received
  133. ; s = sent
  134. ; a = attach
  135. ; i = forward/intransit
  136. ; o = orphan
  137. ; k = kill
  138. ; l = local
  139. ; h = hold
  140. ; f = file request
  141. ; n = scaNned
  142. ; d = Direct
  143. ; u = Update request
  144. ; q = return receipt reQuest
  145. ; y = return receipt
  146. ; m = iMmediate
  147. ; t = TFS
  148. ; e = KFS (erase)
  149. ; z = Archive sent
  150. ;
  151. ;
  152. ; A '+' in front of an attribute means: must be present (or for a rewrite:
  153. ; must be added), a '-' means must *not* be present (or: must be removed
  154. ; for a rewrite).
  155. ;
  156. ;
  157. ; -=-
  158. ;
  159. ; An ACTION can be one of the following:
  160. ;
  161. ; COPY  <destination area>    - Copy msg to area
  162. ; MOVE  <destination area>    - Move msg to area
  163. ; DELETE                      - Delete message
  164. ; FILE  <output text file>    - Write message to file.
  165. ; HDRFILE  <output text file> - Write message header to file.
  166. ; SEMAPHORE <path+filename>   - Generate/touch a semaphore (0 byte file)
  167. ;
  168. ; REWRITE  <mask>             - Rewrite header
  169. ; UUCPREWRITE                 - Rewrite header, add TONAME in the body
  170. ;                               as 'TO: <toname>'. Useful for Usenet gating.
  171. ;
  172. ; A rewrite mask may contain the wildcard token ('*') as well.
  173. ; All fields where a '*' is specified will be left unchanged.
  174. ;
  175. ; ECHOCOPY <address> <area> <seenby>   - Copy, add origin, and (optionally)
  176. ;                                        SEEN-BY: line. Leave SEEN-BY: info
  177. ;                                        out if you don't want it. The text
  178. ;                                        put here is just duplicated in the
  179. ;                                        SEEN-BY line, so you can put more
  180. ;                                        than one address here.
  181. ;                                        <address> is the origination address.
  182. ;
  183. ; ECHOMOVE <address> <area> <seenby>   - Move and add origin, SEEN-BY..
  184. ;
  185. ; BOUNCE  <address> <bounce text file> - Return msg to sender, add bounce text
  186. ;                                        at the top. <address> is the origina-
  187. ;                                        tion address. This returns bouncetext
  188. ;                                        + header + body.
  189. ;
  190. ; HDRBOUNCE  <addr> <bounce text file> - Return msg to sender, add bounce text
  191. ;                                        at the top. <address> is the origina-
  192. ;                                        tion address. This returns bouncetext
  193. ;                                        + header.
  194. ;
  195. ; EMPTYBOUNCE <addr> <bounce txt file> - Return msg to sender, add bounce text
  196. ;                                        at the top. <address> is the origina-
  197. ;                                        tion address. This returns bouncetext
  198. ;                                        only.
  199. ;
  200. ; FORWARD <mask>                       - This action will forward the
  201. ;                                        message (showing both header and
  202. ;                                        body, like 'bounce' does) to
  203. ;                                        someone else. The header of the
  204. ;                                        message will be constructed using
  205. ;                                        the mask you specify.
  206. ;
  207. ; MAKEMSG <file for body> <mask>       - This will generate a new message,
  208. ;                                        using the Mask you specify as the
  209. ;                                        header, and the contents of a file
  210. ;                                        you specify as the body.
  211. ;
  212. ; CHANGEPATH <new path>                - This action replaces the path of
  213. ;                                        files found in the subject line.
  214. ;                                        It makes sense to only use this
  215. ;                                        for file attach messages, as you
  216. ;                                        will get a terribly messed up
  217. ;                                        subject line otherwise :-)
  218. ;
  219. ;
  220. ; ===========================================================
  221. ;
  222. ; This will delete all messages addressed to Harry Twit.
  223. ; It doesn't matter who sent it, from what address,
  224. ; what node it is addressed to, or what attributes it has,
  225. ; it will be lost forever :-)
  226. ;
  227. ; -----------------------------------------------------------
  228.  
  229. Mask *, *, Harry Twit, *, *, *
  230.  
  231. Action Delete
  232.  
  233. ; ===========================================================
  234. ;
  235. ; This will move all mail to a zone 60 address to a secondary
  236. ; (Squish style) netmail area..
  237. ;
  238. ; -----------------------------------------------------------
  239.  
  240. Mask *, *, *, 60:*/*.*, *, *
  241.  
  242. Action Move $c:\bink\msgs\net2
  243.  
  244. ; ===========================================================
  245. ;
  246. ; This will move all msgs addressed to me, that have the
  247. ; 'received' status, and *without* the L)ocal bit set, to
  248. ; another area (*.MSG style).
  249. ;
  250. ; And it will also do that with messages *from* me, that have
  251. ; the 'sent' and 'local' bits set.
  252. ;
  253. ; So, when *any* of the two masks is matched, the action
  254. ; is performed.
  255. ;
  256. ; -----------------------------------------------------------
  257.  
  258. Mask *, *, Gerard van.Essen, 2:281/527.0, *, +r-l
  259. Mask Gerard van.Essen, 2:281/527.0, *, *, *, +s+l
  260.  
  261. Action Move c:\msgs\rec_msg
  262.  
  263. ; ===========================================================
  264. ;
  265. ; This will take all msgs, coming from any point of 281/527,
  266. ; addressed to UUCP on 281/527, and set the point number to 0.
  267. ; It will also set the L)ocal and P)rivate bits ON, and strip
  268. ; any present C)rash attributes.
  269. ;
  270. ; I do this to fool my UUCP gate into thinking messages from
  271. ; my points are locally generated messages.
  272. ;
  273. ; After the rewrite, the message will be moved to a JAM style
  274. ; netmail areas.
  275. ;
  276. ; So, when the mask is matched, *two* actions will be performed
  277. ; on the message.
  278. ;
  279. ; -----------------------------------------------------------
  280.  
  281. Mask *, 2:281/527.*, uucp, 2:281/527.0, *, *
  282.  
  283. Action Rewrite *, *:*/*.0, *, *, *, +l+p-c
  284. Action Move !c:\fd\netfred
  285.  
  286.  
  287. ; ===========================================================
  288. ;
  289. ; This will bounce all messages addressed to 'John Doe' on
  290. ; 281/527, and put 'nojoe.txt' at the top of the message,
  291. ; that tells the sender that Joe's modem blew up :-)
  292. ; The origination address of the bounce-message is 2:281/527.
  293. ;
  294. ; -----------------------------------------------------------
  295.  
  296. Mask *, *, John Doe, 2:281/527.0, *, *
  297.  
  298. Action Bounce 2:281/527.0 nojoe.txt
  299.  
  300. ;
  301. ; Note that this will not DELETE the bounced message (This is
  302. ; on purpose, curious SysOps do a move after they bounced
  303. ; the message :-)
  304. ; They would do that like this:
  305. ;
  306.  
  307. Mask *, *, John Doe, 2:281/527.0, *, *
  308.  
  309. Action Bounce 2:281/527.0 nojoe.txt
  310. Action Move !c:\msgs\saved
  311.  
  312. ; ===========================================================
  313. ;
  314. ; This will take all messages coming from mailer@list at
  315. ; 2:281/527 and to list@receiver at 281/527, and copy them
  316. ; to an echomail area (a Hudson area, board 102), adding
  317. ; an origin and a seen-by line containing "281/527 528"
  318. ; (note that seen-by lines are 2D!). This prevents export
  319. ; of the message to 281/527 and 528.
  320. ;
  321. ; This is just treated as a 'text string', so be careful
  322. ; (NetMgr will happily add 'Howdy' if that's what you
  323. ; specify (not recommended :-)
  324. ;
  325. ; The 'local' bit will be set, and a newly generated MSGID
  326. ; will be added.
  327. ; The address used for origin & msgid is 2:281/527
  328. ;
  329. ; -----------------------------------------------------------
  330.  
  331. Mask mailer@list, 2:281/527.0, list@receiver, 2:281/527.0, *, *
  332.  
  333. Action EchoCopy 2:281/527.0 #102 281/527 528
  334.  
  335. ;
  336. ; The following will take messages addressed to a name
  337. ; that contains 'essen' (so messages to me, even with small
  338. ; misspellings) on 2:281/527.
  339. ; It will move those messages to a JAM netmail area.
  340. ;
  341.  
  342. Mask *, *, ~essen, 2:281/527.0, *, *
  343.  
  344. Action Move !c:\fd\netjam
  345.  
  346. ;
  347. ; The following will take all messages that are *not* written
  348. ; by 'Gerard van Essen', but are coming from 2:281/527 (my address,
  349. ; so probably one of my BBS users) and have the 'sent' status.
  350. ; Those messages will be moved to the special 'sent messages'
  351. ; area for BBS users.
  352. ;
  353.  
  354. Mask !Gerard van Essen, 2:281/527.0, *, *, *, +s
  355.  
  356. Action Move $c:\fd\usersent
  357.  
  358. ;
  359. ; This will generate a semaphore if any messages addressed to
  360. ; 'Areafix' are found. Together with:
  361. ; 'if exist c:\sems\areafix.sem areafix.exe'
  362. ; this can be used to run Areafix ONLY when there is actually a
  363. ; message waiting for it!
  364. ;
  365.  
  366. Mask *, *, Areafix, 2:281/527.0, *, *
  367.  
  368. Action Semaphore c:\sems\areafix.sem
  369.  
  370. ;
  371. ; This will take any message addressed to a name with a '@'
  372. ; somewhere in the string (usually an Internet address!) and
  373. ; add that name to the body of the message (TO: <address>).
  374. ; In addition it will rewrite the TO: name to 'postmaster',
  375. ; ready for processing by the Internet gate.
  376. ;
  377.  
  378. Mask *, *, ~@, 2:281/527.0, *, *
  379.  
  380. Action UUCPRewrite *, *, postmaster, *, *, *
  381.  
  382. ;
  383. ; This will write all local messages addressed to 1:138/211
  384. ; to a file called outusa.txt.
  385. ;
  386.  
  387. Mask *, *, *, 1:138/211.0, *, +l
  388.  
  389. Action File c:\msgs\outusa.txt
  390.  
  391. ;
  392. ;  ----- === ----- === ----- === ----- === ----- === -----
  393. ;
  394. ;  End of first section, now we specify another ScanDir, that
  395. ;  will be scanned for the masks that follow.
  396. ;
  397. ;  ----- === ----- === ----- === ----- === ----- === -----
  398. ;
  399.  
  400. ;
  401. ;  Spefify another ScanDir. NetMgr will close the other areas
  402. ;  and start scanning this one..
  403. ;  Here we specify a Hudson area, board number 21:
  404. ;
  405.  
  406. ScanDir #21
  407.  
  408. ;
  409. ; And we scan that area (board #21) for the following masks(s):
  410. ;
  411.  
  412.  
  413. ;
  414. ; Take messages addressed to 'Pietje Puk' on 2:281/527, bounce it to
  415. ; the sender, write it to file, forward it to Pietje Puk on 2:300/1
  416. ; and then delete the original.
  417. ;
  418.  
  419. Mask *, *, Pietje Puk, 2:281/527.0, *, *
  420. Action Bounce 2:281/527.0, c:\txt\newaddr.txt
  421. Action File c:\msgs\pietje.txt
  422. Action Forward Art, 2:281/527.0, Pietje Puk, 2:300/1.0, Readdressed mail, *
  423. Action Delete
  424.  
  425.  
  426. ;
  427. ; This will look for a message addressed to 'freqnow' and with
  428. ; 'password' as the subject.
  429. ; It will then genrate a file-request message (+f attribute) to
  430. ; 1:138/211, with the contents of 'freq.txt' as it's body.
  431. ;
  432.  
  433. Mask Remote SysOp, 2:281/527.1, Freqnow, 2:281/527.0, password, *
  434. Action Makemsg freq.txt SysOp, 2:281/527.0, SysOp, 1:138/211.0, files, +c+l+f
  435.  
  436. ;
  437. ; // End of sample config file..
  438. ;
  439.  
  440.