procmail
[Top] [All Lists]

Re: Are two pipes allowed in recipe?

1999-09-10 10:13:49
On Fri, 10 Sep 1999, Stan Ryckman wrote:

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?

So is the output after filtering being delivered? I don't have
$HOME/.procmailrc, but procmail is in /etc/sendmail.cf, so it should be
used to deliver.



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?

Well, I used procmail VERBOSE=yes 
LOGFILE=/usr/majordomo/-majordomo-procmail.log ./procmailrc.lists
or somethoing like that. The LOGFILE is anyway defined in the rcfile
itself, but pointing to different logfile. But I showed you the right-one,
/usr/majordomo/procmail.log. But sorry for confusing, it also fooled me
but than I rrealized, but I should edit the results before posting them,
you are right.

 So the problem is not in any hidden .procmailrc nor in other LOGFILE.

BTW: There's system-wide installed pm-jamime-kill module or whats the
name, which kill text/html attachments, vcards, quoted-printable etc.
That's what you can see in the log also, but this doesn't affect anyhow
this result - it was always installed like it is.


[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.)

/etc/procmailrcs/procmailrc.lists is (root,system, 0644)


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.

Oh yes, if the output - the filtered body from first part is being resent
to second part, than it's what I wanted. The second part will resend it
and deliver to outgoing queue. I'll try after collecting all other
responses and summarize the final approach.



Hope that helps at least some,

For sure it helps! Thank you.

--
Martin Mokrejs - PGP 5.0i key at: finger://mail.natur.cuni.cz/mmokrejs
<mmokrejs(_at_)natur(_dot_)cuni(_dot_)cz> Faculty of Science, The Charles 
University

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