nmh-workers
[Top] [All Lists]

[Nmh-workers] refile handling of corrupt .mh_sequences

2013-02-28 10:11:06

I frequently have corrupt .mh_sequences files, most likely due
to interaction between procmail (using rcvstore) and claws-mail
(which updates .mh_sequences, but seems to ignore rcvstore locks,
unsurprisingly).

Regardless of the cause, I often end up with a .mh_sequences file that
has a line break between message numbers and looks like:

#########################
cur: 123
unseen: 1 2 3 4 
5 6 7 8
#########################

This results in the error from rcvstore "is poorly formatted" and causes
the procmail rule to be skipped. If the broken line is very long, then
refile complains that the field name (in the example above "5 6 7 8")
exceeds 997 bytes.

Issuing the error and refusing to refile may indeed be the best way to
handle a "poorly formatted" file, but here are some possible alternatives:

[1] Perhaps there could be an option (yet-another-nmh-option!) to always
re-write poorly formatted files (delete lines that do not begin with a
sequence name ie., string without whitespace, terminated by a colon).

[2] Perhaps refile (and other things that read sequences files) could
treat lines that do NOT begin with a string terminated with a colon and
consist only of [0-9 -] as if they were a continuation of the previous
sequence.

Mark

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>