MAILOPS Operations for Looking at and Scavenging Mail Folders/Files Documentation: [Phylum]MAILOPS.Tedit/press Program: [Phylum]MAILOPS.dcom Revised: Aug 17, 1984 by JonL White MAILSCAVENGE(FOLDER ERRORMSGSTREAM TEMPHOST) will "scavenge" the mail folder by updating the length fields of any message header that seems to be garbaged, so that Laurel/Lafite/... will be able to parse it. FOLDER is the file name of a mail folder (extension will default to .MAIL). It will actually copy the mail file first, and work on the copy; after finishing, it will ask if you want to replace the original file, with the "No" answer meaning to simply store it as a new version. It prints out on ERRORMSGSTREAM the message numbers of any that had to be corrected, including whether a simple correction of the length was satisfactory, or whether the entire header-line had to be reconstructed. The interim copy is stored on the same host as the mail folder, but this can be overridden with TEMPHOST. MAILSCAVENGE.IN.PLACE(FOLDER ERRORMSGSTREAM) -- self-explanatory. SEEMSG(FOLDER FOLDERFILEPTR SCANFLG OUTFILE) will print out the message from the mail folder which begins a file position FOLDERFILEPTR. If FOLDERFILEPTR is not the position of the beginning of a message, then either an error occurs or, if SCANFLG is non-null, a scan is begun (first in the "forwards" direction from FOLDERFILEPTR, and then in the "backwards" direction) to find a valid mesage beginning. PARSENMSGS(FOLDER FOLDERFILEPTR N SCANFLG NOERRORFLG) Assuming that FOLDERFILEPTR and SCANFLG specify some message beginning (as described under SEEMSG above), it will "move" forward N messages and return the file position for the beginning of that message. If N is negative, it will "move" backwards; N = 0 is useful for finding a message beginning "somewhere near" a given some random file position. GACHA Ô HELVETICAÔ HELVETICAÔGACHA ; TIMESROMAN GACHA Ô HELVETICAÔ HELVETICA'GACHA HELVETICAÔ HELVETICA HELVETICA GACHAÔ HELVETICAGACHAÔ HELVETICAGACHA ,GACHA ¦GACHA GACHA ?GACHA GACHA àGACHA GACHA GACHA GACHA GACHA GACHA ,GACHA GACHA GACHA ,GACHA OGACHA GACHA GACHA GACHA WGACHA GACHA FGACHA GACHA KGACHA GACHA 5GACHA GACHA GACHA GACHA GACHA 4GACHA GACHA üGACHA GACHA GACHA qFz¸