Barius:I have had similar corruption problems with heirarch.pm. I usually keep a backup so I can replace when necessary, but I would like to suggest to the developer(s) that Pmail create it's own backup anytime a change is about to be written out, it could save alot of trouble.
Making HIERARCH.PM even *more* robust is a priority for v5, as is providing a "hierarchy cleanup" facility in the program (for weeding out entries that are no longer used).
In truth, I don't understand why people seem to have trouble with this file - in the thirteen years since mine was created, it has never needed to be rebuilt once, and I've never had a problem. I've repeatedly invested time in adding bulletproofing code to it, to the extent that the code that manages hierarch.pm is now some of the most heavily checked code in the program.
A lot of the problem is that nobody has ever been able to tie down a repeatable situation that leads to the file becoming damaged: in the absence of being able to reproduce a problem, it's staggeringly difficult to fix it.
About the best I can do is tell you that I will look further into it (again), and see if I can deduce any more precautions I might be able to take.
Cheers!
-- David --