procmail
[Top] [All Lists]

LOGFILE troubles and /bin/test: /dev/null: cannot create

2003-12-05 12:29:30
Hello People,

        It has been quite some time since I last posted a message to
this mailing list.

        Going through my procmail mail logs I recently noticed this
most unusual of cryptic error messages:

                /bin/test: /dev/null: cannot create

So, something is being set to NULL and procmail is trying to create
it?

        I use various log files at different points in my mail
analysis. Normally, a procmail procedure saves the current setting on
entry.  Then it possibly updates those settings.  And at the end, it
restores the previous settings.  This has been running smoothly for
over a year.  But recently I have discovered the above error meesage
that has crept into my logs.  Suspiciously, only few mails tickle this
bug.

        Here is an excerpt from a procmail procedure:

# at the beginning
SAVELOG=$LOGFILE
SAVEABSTRACT=$LOGABSTRACT

# ...

:0
* NOLOG ?? ^^^^
* LOGFILE ?? ^^^^
{
    LOGFILE=$HOME/mail/log.spam
    LOGABSTRACT=yes
}

# which sets LOGFILE

# reestablish context

LOGABSTRACT=$SAVEABSTRACT
LOGFILE="$SAVELOG"

dummy = "subroutine: pm-junk-spam.rc: junk that SPAM end."

The log that I get for this tail is:

procmail: Assigning "LOGABSTRACT=no"
procmail: Assigning "LOGFILE="
procmail: Opening "/dev/null"
procmail: Error while writing to "/dev/null"
procmail: Assigning "dummy=subroutine: pm-junk-spam.rc: junk that SPAM end."

        This is hard to debug, since the debugging output *is* interfering
with the log generation itself.  The problem may be more pervasive
than I think.  Initially, the /dev/null message came from a trailing
formail filter that caused the death of certain messages:

#---------------- remove stupid Spam-Assassin headers
:0fw
* 9876543210^0 ^X-Spam-(Score|Status|Level):
* 9876543210^0 ^X-Scanned-By:
| formail -I X-Spam-Score: -I X-Spam-Status: -I X-Spam-Level: -I X-Scanned-By: 

# end of .procmailrc

        Having forgotten to add the `f', caused the same message to
occur here.  The log would show the number of bytes written, but no
file was written.

        Thanks to all,

        --Ralph

Ralph P. Sobek, PhD               Disclaimer: The above ruminations are my own.
Ralph.Sobek @ irit.fr                                     http://www.sobek.org/
sobek @ irit.fr                   Wi-Fi:  http://www.irit.fr/~Ralph.Sobek/wifi
Ph:(+33)[0]561556356   FAX:(+33)[0]561556847   http://www.irit.fr/~Ralph.Sobek/
===============================================================================
Impeach George W. Bush for squandering US resources for his own priv. business!
  SPAMMERS Beware: http://www.irit.fr/~Ralph.Sobek/welcome.shtml#Mail-Warning

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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