nmh-workers
[Top][All Lists]
Advanced

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

[nmh-workers] Fixed! I Could Have Sworn that the inc Command used to wor


From: Martin McCormick
Subject: [nmh-workers] Fixed! I Could Have Sworn that the inc Command used to work.
Date: Sun, 02 Jun 2019 08:20:38 -0500

        Thank you to everybody who responded both on and off the
list.   The problem is correctly solved and here is what
happened.

        This is a good example of how long an incomplete
configuration can work perfectly until 0 Day when the right set
of circumstances make it glaringly obvious that something is
terribly wrong. Particulars follow.

        It all started 4 years ago when I retired after 25 years
in IT and I am embarrassed to say that I was supposed to have
known something about unix.  In the environment where I worked,
.mh_profile didn't need a line like:

Local-Mailbox: "Martin McCormick" <address@hidden>

because any system we were using had a FQDN on the okstate.edu
network.  

        I still wanted to use nmh from home with our ISP, a cable
TV provider which meant a somewhat different setup in that our
home network is the typical  private number-space situation with
a meaningless reverse DNS lookup reference and a mail smarthost
that must make internet email work for each subscriber and it
does so once one's own system authenticates with the pop3 server
which is the reason for the local-mailbox declaration.

        After getting that setup, it has worked perfectly but
only because I also used procmail which did the job of catching
any message that landed in /var/mail/martin before it hit the
ground so to speak.

        Recently, I had to do some work on the system that
handles mail and procmail was temporarily indisposed due to the
normal home directory being absent.  nmh could still run but one
needed to use inc to grab the accumulating messages from the mail
spool.

        I also had put nmh on a Raspberry Pi plus 
other aging PC's that run Linux but don't send mail in to the
network.  none of them would do inc either.

        The proper fix was to remove the local-mailbox
declaration I had unwittingly copied from the system that does
send internet mail to the ones that don't and on the one that
does, I now set the $MAILDROP environment variable and, so far,
all is peace and bliss now.

        Putting a 

       MailDrop: .mail

line in .mh_profile did not change the wrong lookup but,
according to the man pages for mh-tailor.conf and mts.conf, the
environment variable MAILDROP supersedes .mh_profile settings
and that is what happened.

        Hints:

the strace program is your true and dear friend.  You don't even
need unincorporated mail for testing. Just

strace -e trace=file -o output inc

will tell you when it is good.  

Bad looks like

stat64("/var/mail/martin.m", 0xbfabfd70) = -1 ENOENT (No such file or directory)

Good looks like

stat64("/var/mail/martin", {st_mode=S_IFREG|0660, st_size=0, ...}) = 0

You can see that there was nothing there but it is referencing
the correct mail file.

        Again thanks, everybody.

Martin McCormick   WB5AGZ



reply via email to

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