nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nmh-workers] INCing of email archives


From: Bakul Shah
Subject: [nmh-workers] INCing of email archives
Date: Wed, 24 Jul 2019 20:55:11 -0700

Once in a while I download email archives of some mailing list
and unpack them using "inc -file <archive-file>". But more
than once I have seen that inc gets confused and doesn't
unpack the whole thing. The cause seems to be a line starting
with From in some message body. Ideally inc should look that
a "From ..." line is immediately followed by header lines.
And if this is not the case, assume it is in the message body.

How do people deal with this?  I tried writing a quick hack
like the one below but surely there is a better way?

fix() {
        grep -n '^From .*[^0-9]$' $1 | sed 's/:.*/s|^|>|/' > ,$1
        if [ -s ,$1 ]; then echo wq >> ,$1; cat ,$1 | ed $1; fi
        rm ,$1
}

This prepends a > to any line beginning with "From "and not
ending with a digit.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]