Groupcheck Version 0.8

This program reports inconsistencies between the Groups file and
Spool directories in !Newsdir.MsgServe. It also checks for duplicate
group numbers in the Groups file.

It requires Martin Avison's ArmSort module available at
http://www.avisoft.force9.co.uk/ArmSort.htm

The filer must have seen your !Newsdir application.

If you have more than 200 groups you should edit the maxgrps% value
in !RunImage.

The program runs in a task window and reports all Spool directories
and Groups file entries, indicating any mismatches. Note that a
match means that the full name of the group in the Groups file
matches the contents of the Group file in the Spool directory AND
the group number in the Groups file (i.e. the number following 'G'
at the end of the line) matches the calculated spool file number.
For example Spool.0.3.25 would be (0*77+3)*77+25 = G256.

N.B. Queue does not have a matching Spool directory.

To run the program double-click on the application.

!GroupChck will report the number of discrepancies found at the
end of the report.

To save the report press F3 and drag the text file to somewhere
sensible before closing the task window.

The program is supplied as is and no claim is made about its safety
or usefulness. It will only read files within !Newsdir so should be
safe with !Messenger running.

To reinstate an orphan group (i.e. one marked "not in Groups")
proceed as follows:

1. Make a backup copy of your !Newsdir.MsgServe.Groups file.
   I accept no responsibility if this goes wrong!
2. If there is also a line for the same group but tagged "no spool
   dir." then go to step 5 and change the group number in the Groups
   file to the correct one as shown on the "not in Groups" line.
3. In Messenger Pro create a new folder with the name shown. A new
   spool directory is created at the end of the list.
4. Run !Groupchck and note both the group number of the new group
   and the group number of the orphan spool directory.
5. Quit Messenger Pro and open the Groups file in an editor.
6. Find the line corresponding to the group and change the group
   number to that of the orphan directory.
7. Delete the newly created directory (it should contain only a
   Group file) and reset the lastgroup number at the top of the
   Groups file to what it was before (If you can't remember run
   !Groupchck again and it will tell you at the end of the report).
   It doesn't actually matter if you don't reset the lastgroup number.
8. Save the Groups file and run Messenger Pro. Open the group window
   for the reinstated group. This should normally list all the
   messages, but if there is a problem just repair the group using
   Choices > Group Management > Select the group > Repair.

As far as I can work it out the format of the Groups file is as follows:
"group"
Full name of the group beginning with "Folder.", "Email.", a newsgroup
  name with no prefix or "Queue" on its own. Incoming mail will just
  be named Email.username. Spaces are hard spaces (Alt-space).
F followed by ? First message number (often 1).
S followed by ? (a bit larger than the F value)
N followed by Number of messages held
E followed by Expiry time in days (-1 means never, 0 means default)
M followed by 0 or 4 - looks like 0 for news, 4 for mail.
R followed by ? (always 0)
T followed by date and Time the group was created.
O followed by ? (usually 0 but sometimes a high number)
L followed by ? (always 0)
B followed by ? (large number) could be bytes.
U followed by ? (middleish number, sometimes 0)
A followed by ? (always 0)
G followed by group number (see above)

NB Queue has everything set to zero except the date and time.

Tip: to make it easier to read, edit a copy of the Groups file
changing all soft spaces to tabs, then load it into a spreadsheet
or DTP program, or just expand tabs in the editor.

This is work in progress and may be updated at any time.

Richard Porter rich@richardporter.me.uk