[Classiccity-pm] perl, procmail and early closed pipes..

Darrell Golliher darrell at golliher.net
Fri Nov 7 14:31:43 CST 2003


Hi Gang,

  I have this procmail recipie:

#
# If the previous rule caused the X-Spam-Status header to be yes, then the 
#  message must have scored a 10 or higher so we rewrite the subject
#  to indicate a high SA score.
#
:0fw
* ^X-Spam-Status: Yes
| perl -ne '$search = quotemeta("*****SPAM*****"); s/$search/*****UBERSPAM*****/o;print;'


 and occasionally I get errors like so..

procmail: Error while writing to " perl -ne '$search =
quotemeta("*****SPAM*****"); s/$search/*****UBERSPAM*****/o;print;'"

 The procmail manpage mentions the i condition:

      i    Ignore any write errors on this recipe (i.e., usually due
      to an early closed pipe).

 Which makes me thing the problem with with the little bit of perl.
 Does anybody see why perl would be closing the pipe early in this
case?  I'd like to find the problem with the perl code and fix it
rather than use the i condition (if at all possible).


-Darrell



More information about the Classiccity-pm mailing list