procmail
[Top] [All Lists]

Re: Are two pipes allowed in recipe?

1999-09-10 09:59:22
Yes, you can have multiple pipes in an action; that isn't the problem.
A couple of points but I don't think I have the whole answer.

Martin Mokrejs wrote:
Hello,
  I'm trying to setup a filter for an e-mail list. The filter was working
int his way:

VERBOSE=off
PMSRC=/etc/procmail
PATH=/etc/procmail:/usr/bin:/usr/local/bin:/bin:/usr/sbin:/usr/local/sbin:
SHELL=/bin/sh
LOGFILE=/usr/majordomo/majordomo-procmail.log

INCLUDERC=/etc/procmail/pm-jamime-kill.rc

:0
| /usr/majordomo/wrapper resend -l $LIST $LIST-outgoing-*-*-*,$EXTRA

Note that this *delivered* the mail.

  The modified part - the actual recipe is here:
:0 bfw
| /usr/local/bin/sed -e 's/ =$//' -e 's/=20$//' | /usr/majordomo/wrapper 
resend -l $LIST $LIST-outgoing-*-*-*,$EXTRA

This one no longer delivers, but *filters* the body, replacing it
with the output of the pipes.  Did you want to replace the body with
the output of /usr/majordomo/wrapper?

This is enough to break everything. The log is below. What's wrong?

Since you only filtered, processing of messages now continues on to the
rest of your .procmailrc.  What does *that* do?

Another point... you had:
LOGFILE=/usr/majordomo/majordomo-procmail.log
but your log showed:
procmail: Assigning "LOGFILE=/usr/majordomo/procmail.log"

not quite the same.  Are you showing us the right .procmailrc?

[last in logfile]
From mmokrejs(_at_)prfdec(_dot_)natur(_dot_)cuni(_dot_)cz  Fri Sep 10 
14:48:11 1999
 Subject: test
  Folder: **Bounced**                                                       0
550 "|/usr/local/bin/procmail -m LIST='apis' EXTRA='' 
/etc/procmailrcs/procmailrc.lists"... Can't create output

Permissions?  (Noting the zero size on the Folder line, I deduce that
your filter put nothing back in the body.)

I have a feeling that what you intend is something like:
   :0 bfw
   | /usr/local/bin/sed -e 's/ =$//' -e 's/=20$//'
   :0
   | /usr/majordomo/wrapper resend -l $LIST $LIST-outgoing-*-*-*,$EXTRA
but I can't be sure.

Hope that helps at least some,
Stan

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