I'm writing a small Perl script (which would probably be more apropos in Lisp, but I'm not good at Lisp) to cleanup Berkeley mbox format mailboxes for Gnus after they've been edited by other mailreaders like Alpine and Mutt. Sometimes I find this is necessary even when other mailreaders haven't done anything to the mailbox, as when copying a message into an nnfolder within Gnus that came from elsewhere in Gnus, like copying a message from a Usenet newsgroup or a different nnfolder, using the gnus-summary-move-article or gnus-summary-copy-article commands (B m or B c). The problem seems to be that if a message doesn't have the X-Gnus-Article-Number header in a mailbox where all the preceeding messages before it all _did_ have that header, the message that's missing it and all messages after that will be invisible in Gnus. This also seems to happen if a message somehow gets a X-Gnus-Article-Number that's out of sequence, lower in number than its preceeding messages in the same mailbox. The Xref header seems to be correlated here too. Using 'B m' or 'B c' seems to have a very high likelyhood of messages retaining their old metadata in the destination, and becoming invisible in the destination folder because the old header contains data that's now inapplicable or wrong in the new one. I've been trying to figure out what to do to repair mailboxes like this so Gnus will see all of them again. Using sed to completely get rid of all X-Gnus-Article-Number and/or Xref lines and then doing meta-g on the group seems to work, but also seems a little brutal. All of this makes it very hazardous to move messages around between mailboxes, especially if copying into an existing nnfolder, even within Gnus, with no involvement from any other mailreaders. It becomes necessary to do header cleanup afterward to make all messages visible again. What do you think would be the recommended way to hammer a mailbox's Gnus metadata back into shape in situations like these? -- + Brent A. Busby + "We've all heard that a million monkeys + Sr. UNIX Systems Admin + banging on a million typewriters will + University of Chicago + eventually reproduce the entire works of + James Franck Institute + Shakespeare. Now, thanks to the Internet, + Materials Research Ctr + we know this is not true." -Robert Wilensky