home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pcboard / ntmgr95.zip / NETMGR.DOC < prev    next >
Text File  |  1993-05-20  |  12KB  |  476 lines

  1.  
  2. ==============================================================
  3.  
  4.    NetMgr -  copy, move, delete, change and bounce netmail..
  5.  
  6.          (c) 1992,93  Gerard van Essen (2:281/527)
  7.  
  8. ==============================================================
  9.  
  10.  
  11.  
  12. !  NetMgr uses the Squish MSGAPI by Scott Dudley.
  13.  
  14. !  Squish is a trademark of Scott J. Dudley
  15.  
  16.  
  17.  
  18. ┌──────────────┬─────────────────────────────────────────────────
  19. │ Introduction │
  20. └──────────────┘
  21.  
  22. NetMgr is a program that will scan the messages in one area (usually the
  23. netmail area), and analyse the headers of those messages.
  24.  
  25. NetMgr will check if any of the headers meet the criteria specified in the
  26. configuration file (a 'mask'), created by the user. If any of those
  27. headers are found, NetMgr can perform several actions on that message,
  28. like moving or copying it to another message area, deleting it, changing
  29. it etc.
  30.  
  31.  
  32. ┌────────────────────────────────────┬─────────────────────────────
  33. │ A 'MASK', NetMgr's driving force.. │
  34. └────────────────────────────────────┘
  35.  
  36.  
  37. A MASK consists of five parts:
  38.  
  39. fromname, fromaddress, toname, toaddress, attributes
  40.   (1)        (2)         (3)      (4)       (5)
  41.  
  42. So 5 parts, seperated by a comma. In the config file you use the keyword
  43. MASK to specify a mask:
  44.  
  45.  
  46. MASK fromname, fromaddress, toname, toaddress, attributes
  47.  
  48.  
  49. -=-
  50.  
  51. NAME : fromname, toname.
  52.  
  53.  
  54. A 'name' is just a string, leading and trailing spaces found in the config
  55. file are stripped, spaces *within* a string are allowed.
  56.  
  57. So writing "   Gerard van Essen  " will be the same as "Gerard van Essen".
  58. (Note that leading and trailing spaces are stripped, while the space
  59. between "Gerard" and "van" is still there...
  60.  
  61.  
  62. -=-
  63.  
  64. ADDRESS: fromaddress, toaddress.
  65.  
  66.  
  67. An address is *always* full 4D, write a '*' for any part you don't care
  68. about:
  69.  
  70.  
  71. 60:*/*.*     -   all messages coming from zone 60
  72. 2:281/527.*  -   msg from any point from 281/527, or .0
  73. *:500/*.*    -   all msgs from nodes/points in a net 500, any zone
  74. 2:281/527.0  -   only messages from 2:281/527.0
  75.  
  76. Just one exception (to the "always 4D rule): specifying just a '*' only
  77. for the address, is allowed (strictly speaking, it is not full 4D :-), and
  78. is the same as *:*/*.*.
  79.  
  80.  
  81. -=-
  82.  
  83. ATTRIBUTES.
  84.  
  85.  
  86. Attributes can be one or more of the following:
  87.  
  88. p = private
  89. c = crash
  90. r = received
  91. s = sent
  92. a = attach
  93. i = forward/intransit
  94. o = orphan
  95. k = kill
  96. l = local
  97. h = hold
  98. f = file request
  99. n = scaNned
  100.  
  101.  
  102. Every attribute must have a '+' or a '-' in front of it.
  103.  
  104. A '+' means: must be present.
  105. A '-' means: must *not* be present.
  106.  
  107. An example:
  108.  
  109. +l+p
  110.  
  111. A message only matches this, if the L)ocal bit, and the P)rivate bits are
  112. set. The other (possible) attributes are not important.
  113.  
  114. -f+l
  115.  
  116. A message matches this, if it is *not* a F)ile request, and the L)ocal bit
  117. is present.
  118.  
  119. +c+l+p-s
  120.  
  121. A message matches this, if the C)rash bit is set, the L)ocal bit is set
  122. and the P)rivate bit is set. Apart the that, the message must *not* be
  123. S)ent already..
  124.  
  125.  
  126. -=-
  127.  
  128. Some examples of a complete 'MASK'.
  129. -----------------------------------
  130.  
  131.  
  132. Mask Gerard van Essen, *, *, *, +s
  133.  
  134. All messages, coming from "Gerard van Essen" on any address (*), written
  135. TO: anyone (*) on any address (*), that are already flagged as S)ent.
  136.  
  137. IE: all messages written by me that have already been packed/sent.
  138.  
  139. --
  140.  
  141. Mask *, 2:281/527.*, uucp, 2:281/527.0, +l-h-p-k
  142.  
  143. Message written by anyone (any name: '*'), on node 2:281/527 (.* so it can
  144. be the NODE 2:281/527 or any of its points, like 2:281/527.40).
  145. Written TO: a guy named "UUCP" on node 2:281/527.
  146. The L)ocal bit must be set, and the H)old, P)rivate and K)ill bits must
  147. *not* be set.
  148.  
  149. --
  150.  
  151. Mask *, 2:281/527.*, postmaster, 2:281/527.0, *
  152.  
  153. Message written by anyone (any name: '*'), on node 2:281/527 (.* so it can
  154. be the NODE 2:281/527 or any of its points, like 2:281/527.40).
  155. Written TO: a guy named "Postmaster" on node 2:281/527.
  156. The message attributes that are (not) present are not important.
  157.  
  158. --
  159.  
  160. Mask *, *, raid, 2:281/527.0, *
  161.  
  162. All messages, coming from anyone on any address, but addressed to RAID on
  163. 2:281/527. The message attributes don't matter.
  164.  
  165.  
  166. ┌────────────────────────┬─────────────────────────────────────────────
  167. │ MASK's partner: ACTION │
  168. └────────────────────────┘
  169.  
  170. A MASK is never alone, it is always accompanied by an ACTION statement.
  171. This ACTION statement tells NetMgr what should be done with messages that
  172. MATCH a certain MASK.
  173.  
  174. The following ACTIONs are valid:
  175.  
  176. COPY  <destination area>   - Copy msg to area
  177. MOVE  <destination area>   - Move msg to area
  178. DELETE                     - Delete message
  179. BOUNCE  <bounce text file> - Return msg to sender, add bounce text at
  180.                              the top.
  181. REWRITE  <mask>            - Rewrite header
  182.  
  183. A rewrite mask may contain the wildcard token ('*') as well.
  184. All fields where a '*' is specified will be left unchanged.
  185.  
  186. ECHOCOPY <area> <seenby>   - Copy, add origin, and (optionally)
  187.                              SEEN-BY: line. Leave SEEN-BY: info out if
  188.                              you don't want it. The text put here is
  189.                              just duplicated in the SEEN-BY line, so
  190.                              you can put more than one address here.
  191. ECHOMOVE <area> <seenby>   - Move and add origin, SEEN-BY..
  192.  
  193.  
  194. In the config file, you specify an action using the ACTION keyword.
  195.  
  196. Some examples:
  197.  
  198.  
  199. Action Delete
  200.  
  201. Delete the message
  202.  
  203. --
  204.  
  205. Action Move $c:\bink\msgs\net2
  206.  
  207. Move a message to the Squish style (leading $) area c:\bink\msgs\net2.
  208.  
  209. --
  210.  
  211. Action Move c:\msgs\rec_msg
  212.  
  213. Move a message to the *.MSG style (no leading $) area c:\msgs\rec_msg\.
  214.  
  215. --
  216.  
  217. Action Rewrite *, *:*/*.0, *, *, *
  218.  
  219. Change a message header.
  220. Any field that has a '*' will be left untouched (in this case the
  221. Fromname, the fromaddress zone, net and node parts), the toname, the
  222. toaddress and the attributes.
  223.  
  224. So, the be more precise: only the pointnumber of the message sender will
  225. be changed. Messages coming from 2:281/527.40, for example, will be
  226. changed to a message coming from 2:281/527.0.
  227.  
  228. --
  229.  
  230. Action ReWrite *, *, Pietje Puk, *, *
  231.  
  232. This will rewrite the 'toname' part of a message, it will put "Pietje Puk"
  233. in the TO: name-field.
  234.  
  235. --
  236.  
  237. You can also tell NetMgr to change the attributes of a message. Again, any
  238. attributes must be preceded by a '+' or '-'.
  239.  
  240. A '+' in this case means: set this bit.
  241. A '-' in this case means: turn this bit off.
  242.  
  243. so..
  244.  
  245. +p+l+k-c-f
  246.  
  247. .. will turn ON the P)rivate, L)ocal and K)ill bits, and turn OFF the
  248. C)rash and F)ile request bits. Other attributes are left untouched.
  249.  
  250. Example:
  251.  
  252. Action *, *, *, *, -c+p
  253.  
  254. Turn off the crash bit for that message. Turn ON the P)rivate bit.
  255.  
  256.  
  257. --
  258.  
  259. Action Bounce nojoe.txt
  260.  
  261. This will write a bounce-message (a message that is addressed to the
  262. sender of that message), the message body will be the same as the original
  263. message.
  264.  
  265. However, NetMgr will add the contents of a textfile at the top of the
  266. body. In this case the contents of the file 'nojoe.txt' will be added.
  267. The contents could be:
  268.  
  269. -=- <begin> -=-
  270.  
  271. Sorry, but Joe's modem had a heart attack, so he is currently not
  272. available. The message you wrote will remain 'on hold' until he has a new
  273. modem.
  274.  
  275. The original text of your message:
  276.  
  277. ::::
  278.  
  279. -=- <end> -=-
  280.  
  281. And that will be added at the top.
  282.  
  283. The original message will NOT be deleted. If that is what you want, you
  284. must add the same MASK again, but with a DELETE action. NetMgr will keep
  285. on searching for matching MASKs, so if you specify a certain MASK twice,
  286. you could first specify a bounce action for it, and later a delete action.
  287.  
  288. You can also, for example, first rewrite a message, and then move it, etc.
  289.  
  290. --
  291.  
  292. Action EchoCopy $c:\local\contrast 281/527 528
  293.  
  294. This will copy a message to the Squish style area C:\local\contrast, and
  295. add 281/527 528 to the SEEN-BY. The text listed will be copied leterally,
  296. so be VERY CAREFUL what you specify here! Test it thoroughly (together
  297. with any downlinks) before using it!!
  298.  
  299.  
  300. ┌───────────────────────────────┬────────────────────────────────────
  301. │ MASK and ACTION in NetMgr.cfg │
  302. └───────────────────────────────┘
  303.  
  304. A MASK must *always* have one (and only one) corresponding ACTION in
  305. netmgr.cfg. NetMgr will NOT run if anything is wrong in the config.
  306.  
  307. So there are always 'pairs':
  308.  
  309.  
  310. Mask *, *, Harry Twit, *, *
  311. Action Delete
  312.  
  313. Any message that matches the MASK will be deleted.
  314.  
  315. --
  316.  
  317. Mask *, *, *, 60:*/*.*, *
  318. Action Move $c:\bink\msgs\net2
  319.  
  320. Any message addressed to a zone 60 address will be moved.
  321.  
  322. --
  323.  
  324. Mask *, *, *, *, +r
  325. Mask Move $c:\msgs\received
  326.  
  327. All received messages will be moved.
  328.  
  329. etc.
  330.  
  331.  
  332. Please see the sample configuration file for more (complete) examples.
  333.  
  334.  
  335. ┌──────────────────────────────┬────────────────────────────────────
  336. │ Other keywords in netmgr.cfg │
  337. └──────────────────────────────┘
  338.  
  339.  
  340. HOME
  341. ====
  342.  
  343. Example:
  344.  
  345. Home 2:281/527.0
  346.  
  347. Your address, used as orig-address for bounce messages. The zone is also
  348. used as a default value for 'zoneless' messages (only *.MSG style
  349. areas)...
  350.  
  351. This address is also used for EchoCopy and EchoMove, as the address to be
  352. used in the origin, and to generate the MSGID with.
  353.  
  354. This *must* be a full 4D address (as all addresses in netmgr.cfg should
  355. be..). This is a bit 'strict checking', but with actions like 'delete' I
  356. want to take no risks.
  357.  
  358. NetMgr will exit as soon as an error is detected in the configuration (for
  359. the same reason: safety first). So if you change anything in the config,
  360. you should first give it a 'test run'.
  361.  
  362.  
  363. SCANDIR.
  364. ========
  365.  
  366. Example:
  367.  
  368. ScanDir c:\fd\netmsgs
  369.  
  370.  
  371. The directories to scan, at least your primary netmail dir, I guess..
  372.  
  373. A '$' in front of an area indicates a Squish style area.
  374.  
  375. You can have as many of these as you like, NetMgr will scan each and every
  376. one of them..
  377.  
  378.  
  379. ORIGIN.
  380. =======
  381.  
  382. Origin   NetMgr, (c) 1992,93  Gerard van Essen
  383.  
  384.  
  385. An originline, will be used for EchoCopy and EchoMove.
  386.  
  387.  
  388. LOG.
  389. ====
  390.  
  391. Log c:\tc\netmgr\netmgr.log
  392.  
  393.  
  394. The location and name of your logfile. Leave this keyword out if you don't
  395. want a logfile.
  396.  
  397.  
  398.  
  399. ┌─────────────────────────┬─────────────────────────────────────────
  400. │ Command line parameters │
  401. └─────────────────────────┘
  402.  
  403. There are only two:
  404.  
  405. -D
  406.  
  407. For 'debugging' purposes you can start netmgr with the -d command line
  408. switch. This will send NetMgr's interpretation of your config file to
  409. stdout.
  410. While scanning your netmail area, it will also send some info about the
  411. headers of the messages to stdout.
  412. You can easily redirect it to a file (netmgr -d > debug.txt) for
  413. inspection.
  414.  
  415. --
  416.  
  417. -C
  418.  
  419. Here you can specify the name of an alternative Config file. For example:
  420.  
  421. NetMgr -Cc:\netmgr\mycfg.txt
  422.  
  423.  
  424. ┌─────────────┬─────────────────────────────────────────────────────────
  425. │ Errorlevels │
  426. └─────────────┘
  427.  
  428. Three possibilities:
  429.  
  430. 0   : No errors, no work done.
  431. 1   : No errors, something done (move, copy, bounce or whatever. Anything.)
  432. 254 : Error occurred (outa mem, config error etc).
  433.  
  434.  
  435. ┌───────────────┬───────────────────────────────────────────────────────
  436. │ What's left.. │
  437. └───────────────┘
  438.  
  439. Several things, I guess. But right now I don't have any time to make
  440. decent docs. This will have to do for now. Just experiment, it's not that
  441. difficult.
  442. As soon as you have problems, use the -D command line switch.
  443.  
  444. Don't get confused by all the '*' tokens in the Mask and Action lines :-)
  445.  
  446.  
  447.  
  448. Some bits and pieces..:
  449.  
  450. * NetMgr was compiled using Borland C++, v3.1 (DOS version) and Borland
  451.   C++ for OS/2, v1.00 (OS/2 version).
  452.  
  453. * NetMgr is Freeware, anyone can use it without paying me.
  454.  
  455. * Noboby may SELL NetMgr, or otherwise make money out of it.
  456.  
  457. * NetMgr source code is not and will not be available.
  458.  
  459.  
  460.  
  461. The author can be reached...
  462.  
  463. Gerard van Essen
  464. FidoNet: 2:281/527
  465. Contrast BBS, 31-70-3234903 (V32bis max.)
  466.  
  467.  
  468. I'm always available for bugs, comments and suggestions. Right now I
  469. hardly have any time, so don't expect too much (apart from a short reply).
  470. But there's always the future with lots of time (I hope!), and because I
  471. save all suggestions/comments, they will probably be very useful to me in
  472. the future!
  473.  
  474. Have fun.
  475.  
  476.