procmail
[Top] [All Lists]

procmail: Error while writing to "/dev/null" (was: Error while writing to ...)

2004-01-21 09:57:10
Dear People,

        Isn't this a misnomer?  How can procmail have trouble writing
to /dev/null ?  These messages have come up since changing to procmail
3.22.  I have _not_ noticed them before.

        I also get the message: "/bin/test: /dev/null: cannot create".

        Unfortunately, I cannot really include a log file here!  They
quickly grow to kilobytes, but the above error messages cannot be
localized.  Unfortuanely procmail mixes log streams together if
procmail has children processes.

        SUGGESTION: when doing VERBOSE logging have the children
processes identify individually identify their output.  Getting:

        procmail: Error while writing to "/dev/null"

without being able to identify it's preceding statement is quite
disconcerting.

        The only problem that I seem to have found deals with procmail
3.22.  This did not happen with 3.14!  I use various log files in a
normal procmail run.  In a procmail procedure I invoke them either
unconditionally or conditionally as follows:

:0
* VERBOSE ?? (yes|on)
{
   LOGFILE=$HOME/mail/log.debug
}

:0 E
* NOLOG ?? ^^^^
* SPAMLOG ?? (yes|on)
{
    SAVELOG=$LOGFILE
    SAVEABSTRACT=$LOGABSTRACT

    LOGFILE=$HOME/mail/log.spam
    LOGABSTRACT=yes
}

And if the procedure terminates by going off the end I terminate the
current logfile with:

:0
* NOLOG ?? ^^^^
* SPAMLOG ?? (yes|on)
{
    LOGABSTRACT=$SAVEABSTRACT
    LOGFILE="$SAVELOG"
}

        One problem that I ran into was not having the same exit
conditions as entry conditions.  This would cause LOGFILE and
LOGABSTRACT to be unset, which would cause an error message concerning
/dev/null as above.  For example, in the above excerpts, if VERBOSE is
set, then logging is set, but if the exit script resets LOGFILE and
LOGABSTRACT then a /dev/null error message appears.

        Is this a bug in procedure 3.22 ?

        Any help would be appreciated.  If somebody wants to peruse a
500k logfile then I could make it available on the web.

        Sorry, for having to be so terse.

        Happy New Year 2004,

        --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>