[Top][All Lists]

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

[Nmh-workers] slocal(1) with /dev/null Writes Line.

From: Ralph Corderoy
Subject: [Nmh-workers] slocal(1) with /dev/null Writes Line.
Date: Mon, 11 Sep 2017 11:18:02 +0100


I don't use slocal(1).  I prodded it recently and then observed some
strange behaviour from inc(1) that, given I'm running
1.7-RC3-4-g3dfc049a, had me worried, but it's not an RC3 problem.

Here's it condensed.

    $ wc /var/spool/mail/ralph
    0 0 0 /var/spool/mail/ralph
    $ /usr/lib/nmh/slocal </dev/null
    $ wc /var/spool/mail/ralph
    1 0 1 /var/spool/mail/ralph

I've gained a single empty line.  I didn't notice this at the time of
prodding slocal.  Later, I fetched lots of email.

    $ mail ralph <<<foo
    $ mail ralph <<<bar
    $ mail ralph <<<xyzzy
    $ wc /var/spool/mail/ralph
      43  144 1395 /var/spool/mail/ralph

And was surprised after seeing it all be fetchmail(1)'d that only one
email was inc'd.

    $ inc
    Incorporating new mail into inbox...

    42+ 09-11* me     From address@hidden Mon Sep 11 10:59:14 2017 Return-Path:

The blank line meant the mbox format couldn't be determined so
m_getfld() took the whole file of three emails as a single email.

    $ grep -n '^From' `mhpath .`
    2:From address@hidden  Mon Sep 11 10:59:14 2017
    12:From: address@hidden (Ralph Corderoy)
    16:From address@hidden  Mon Sep 11 10:59:16 2017
    26:From: address@hidden (Ralph Corderoy)
    30:From address@hidden  Mon Sep 11 10:59:18 2017
    40:From: address@hidden (Ralph Corderoy)

I don't know if slocal is at fault, or whether I got what it promises
given empty input.  I do think I'd have preferred inc and m_getfld() to
die early on rather than push for the finish line.

Cheers, Ralph.

reply via email to

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