Fix broken-in-queue messages predating CHUNKING fix
util/chunking_fixqueue_finalnewlines.pl walks the queue, fixing any
affected messages; see README.UPDATING.
We're extremely cautious about operation failure.
We do one check without locking messages, so that we can quickly skip
past before trying to lock and contending with an actual delivery. Then
we lock and do another fix.
Note that we use flock, not fcntl, because that's what Perl makes
readily available; we use an OS-guard to barf if the OS is not handled.
(cherry picked from commit
7dc5f827a629b06afcba5a1a52184084c5214c98)
Signed-off-by: Phil Pennock <pdp@exim.org>