SetFolder 1.3 - Documentation ***************************** Copyright ********* SetFolder (C) 1994-95 kMel, Klaus Melchior This program is freely distributable, but copyrighted by me. This means you may freely copy it as long as you do not charge more than a nominal fee for copying. This program may be put on PD disks, especially on Fred Fish's AmigaLibDisks and Fred's CDROMs. If you want to distribute this program you MUST keep this document with it. The program and the documents must be distributed in their original unmodified form. This program cannot be used for commercial purposes without written permission by the author. The author can not be made responsible for any damage which is caused by using this program. Send comments, suggestions or bug reports, and the gifts to: Klaus Melchior, Schulstrasse 17 D-52156 Monschau, Germany Phone: +49 (0)2472 4710 DE: kmel@eifel.tng.oche.de ADSP: kmel@eifel.adsp.sub.org FIDO: 2:242/158.2@fidonet DE: kmel@cwg.fido.de What is SetFolder ? ******************* SetFolder is an UMS tool, which scans the message base for non-foldered mails, checks their contents and if necessary set them to a folder. * fast algorithm is used to check the conditions, indexed fields are known * large UMS fields can be cut (check text of huge mails is slow) * setable age of mails, which should be foldered * mails of mailinglists are recognized and automatically set * ReplyName & ReplyAddr can be adjusted * the folder of the parent mail can be set * a report can be sent * config is stored in 'ums.config' Background: I subscribed over 10 mailinglists and sort them to folders with 'sumsfolder', but this takes a lot of time. Many of them are recognized using a pattern, so every new mail must be read, the text or comments must be checked. This procedure is started again and again for each mailinglist :-C So I decided to write SetFolder. After SetFolder is started, it knows all UMS fields with an index, the mails with this fields are checked quickly. Then it checks the other mails by reading mail after mail, but only one time. To do this fast, it isn't going from folder to folder. It is possible to look for mailinglist mails. When the FromName or ReplyName of mails matches the pattern "mailinglist '#?'", which is used by several mailinglists, the mailinglist name is stripped and used as folder name (see Arguments). It works like "mlist2folder.rexx". The mailinglist mails can be checked before the indexed scan begins. If no folder of a message is found, the parent one can be read to copy it's folder name, like "Child2Folder" (see Arguments). Several mailinglists don't set the right or no reply name and address. SetFolder can repair this. When setting the folder, you can define ReplyName and ReplyAddr. CLI arguments ************* TEMPLATE: NAME=USER/A,PASSWORD/A,SERVER/K, AGE/K/N,CHECKLEN/K/N,MLIST/S,MLISTFIRST/S,PARENT/S,NOTOWNER/S, TEST/S,NOINDEXED/S,DELAY/K/N,NOPROGRESS/S,QUIET/S AGE/K/N mails which age is younger than the defined number of days are checked, default: 0 days, only the new ones CHECKLEN/K/N the UMS fields are cut, set here the number of bytes, which are checked with MatchPattern(), sometimes useful with MsgText or Comments DELAY/K/N use SetFolder as background task, all actions are delayed, low task priority, set here the time for Delay() in 1/50 sec MLIST/S mailinglist mails are recognized MLISTFIRST/S check mailinglist mails at first NOINDEXED/S the indexed look for folders isn't started NOPROGRESS/S the progress indicator isn't shown NOTOWNER/S only mails are checked, which UMS owner flag isn't set PARENT/S if no folder is found, the parent mail is checked PASSWORD/A password of the user QUIET/S no output text SERVER/K name of the server, optional TEST/S switches SetFolder into test mode, no folders are set USER=NAME/A user name UMS Fields ********** These names of UMS fields are checked by SetFolder: MsgText FromName FromAddr ToName ToAddr MsgID Subject Comments Organization ReplyName ReplyAddr LogicalToName (UMSV11) LogicalToAddr (UMSV11) Check your config! SetFolder gives you a warning if an UMS field isn't recognized (see Installation). What you need ! *************** - Kickstart >= 2.0 - Workbench >= 2.0 - UMS (Universal Message System) >= v10 (see: References) - Several additions in 'ums.config' (see: Installation) How to install ************** Binaries ======== Copy the "bin/" files to a place where all the executables of UMS are stored, normally this is "UMS:bin/" or "Mail:bin/". copy bin/#? Mail:bin/ UMS config ========== These UMS config variables must be set: SetFolder.Folder It could contain several lines with the folder name, the UMS field, which is checked (see: UMS Fields), the data and an optional reply. One condition per line, four arguments seperated with at least one space. [,] A ; in front of the FolderName marks the line as comment. SetFolder.Prefix (optional) A prefix which is used in front of all folder names. SetFolder.ReportUser (optional) Specify the user to whom the report is sent. Only if this variable is set a report is generated. SetFolder.ReportFolder (optional) The report mail is put into the defined folder. SetFolder.Suffix (optional) This suffix is added at the end of each folder name. Example ======= UMS v10 ------------------------------------------ SetFolder.ReportUser = "sysop" SetFolder.ReportFolder = "report" SetFolder.Prefix = "list." SetFolder.Folder = " mui Comments *"#?(To|Cc):#?mui@taloa.unice.fr#?*" *"mui,mui@taloa.unice.fr*" aminet FromAddr *"aminetd@wuarchive.wustl.edu*" meeting ReplyName *"Mailinglist 'Meeting'*" ; comment music.paperlate MsgText *"#?(To|Cc):#?paperlate@atom#?*" trash Subject *"Point-Beitrag*" " -------------------------------------------------- UMS v11 ------------------------------------------ ( SetFolder.ReportUser syops ) ( SetFolder.ReportFolder report ) ( SetFolder.Prefix "list." ) ( SetFolder.Folder "mui Comments \"#?(To|Cc):#?mui@taloa.unice.fr#?\" \"mui,mui@taloa.unice.fr\"\n" "aminet FromAddr \"aminetd@wuarchive.wustl.edu\"\n" "meeting ReplyName \"Mailinglist 'Meeting'\"\n" "; comment\n" "music.paperlate MsgText \"#?(To|Cc):#?paperlate@atom#?\"\n" "trash Subject \"Point-Beitrag\"\n" ) -------------------------------------------------- Startup ======= I start SetFolder like this: SetFolder sysop "" Delay 5 CheckLen 2000 Parent History of SetFolder ******************** 27.08.94 * initial * first working version + busy ascii routines 28.08.94 + documentation 0.1 * beta to [ah] [mh] 30.08.94 + documentation changed 0.2 * beta to [cr] [fd] [op] 05.09.94 + NOPROGRESS/S implemented, progress indicator can be switched off [op] + AGE/K/N implemented, old mails can be checked [op] + documentation changed 0.3 07.09.94 * beta to [cv] [op] 06.10.94 * first feedback :-C 08.10.94 + CHECKLEN/K/N implemented 11.10.94 + NOTOWNER/S added [ah] 1.0 12.10.94 * release to aminet 10.11.94 + mailinglist recognition, MLIST/S added [ms] b1 * beta to [ms] 12.11.94 - fixed bug in mailinglist name routine [ms] + CTRL-C works now b2 * beta to [ms] 19.11.94 - fixed bug in folder routine 21.11.94 + insert ReplyName, ReplyAddr (option) [ss] b3 * beta to [ss] [ah] 23.11.94 - fixed bug after reading corrupt message [ms] b4 * beta to [ms] 06.12.94 - fixed bug in mlist routine [ms] b5 * beta to [ms] 1.1 13.12.94 * release to aminet 09.03.95 + MList handling changed [hg] b1 * beta to [hg] 24.03.95 + MLISTFIRST/S implemented [hg] [bf] - MList output bug fixed [hg] b2 * beta to [hg] [bf] 25.03.95 - change CLI template [op] + ability to write a report + change archive structure b3 27.03.95 * beta to wowbagger 01.04.95 + change archive structure, now with "UMS/" - MListFirst/MList fixed [hg] 08.04.95 - output bug of MListFirst fixed + PARENT/S implemented (idea from Child2Folder [op]) + NOINDEXED/S added b4 09.04.95 * beta to Mailinglist 12.04.95 + use own linklib, this reduced size about 2 KByte 14.04.95 - check parent only if no folder is found + additions/changes to documentation 1.2 * release to aminet 23.04.95 + changed return values - SetFolder.Folders variable not global only [ms] 24.04.95 - enforcer hit, field recognition routine, fixed [kb] 25.06.95 + SetFolder.Prefix, SetFolder.Suffix [hh] 1.3 * release to aminet What is to do in future ? ************************* - nothing... ? References ********** UMS UMS - Universal Message System (c) Copyright 1992-95 by Martin Horneffer Aminet: comm/ums/ *Note* v11 is only available as public beta Thanks are going to ... *********************** - Martin Horneffer [mh] for UMS - Andreas Harrenberg [ah], Christian Rütgers [cr], Olaf Peters [op], Frank Duerring [fd], Christoph Viethen [cv], Matthias Scheler [ms], Stefan Stuntz [ss], hartmut Goebel [hg], Boris Folgmann [bf], André Schenk [as], Kai Bolay [kb], Henning Hucke [hh] - and all I forgot to mention ... Index ***** Arguments Arguments Authors address Copyright Background Description Binaries Installation Bug reports Copyright Changes in 'ums.config' Installation CLI arguments Arguments Comments Copyright Copyright Copyright Credits Credits Description Description Distribution Copyright eMail Copyright Example Installation History History Installation Installation References References Requirements Requirements SetFolder Description Startup Installation Template Arguments Thanks Credits ToDo ToDo UMS config Installation UMS fields UMS Fields UMS variables Installation