On Tue, 7 Nov 1995, Karl E. Vogel wrote:
On Tue, 7 Nov 1995 12:43:31 -0600 (CST),
Vladimir Shekhovtsov <shekvl(_at_)sncac(_dot_)snc(_dot_)edu> said:
Could anybody help me, because I cannot pipe mail to filter
Add these lines to the top of your .procmailrc file:
# Search path (configure to suit yourself).
PATH=/usr/local/bin:/bin:/usr/bin:$HOME/bin
# Default shell.
SHELL=/bin/sh
When piping an entire message to a filter or program, try :HBhbf for your
flags instead of just :0. When I get mail addressed to the procmail
list, I pipe the message to a script which filters the headers and writes
the filtered message to stdout. Here is the recipe:
:HBhbf
* ^(From|Resent-Sender).*procmail-request
| procmaillist
Thank you very much, almost all is working now, but...
This is a part of my updated .procmailrc
---------------------------------------------------------------------
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
SHELL=/bin/sh
MAILDIR=$HOME/mail/incoming
DEFAULT=$MAILDIR/other.inbox
LOGFILE=$HOME/from
LOCKFILE=$HOME/.lockmail
:0 HBhbf
* ^From.*shekvl
| /bin/awk '/Series/{exit};{print}' >>$MAILDIR/tonite.inbox
When I receive the mail, I get this message:
---------------------------------------------------------------------
procmail: Error while writing to " /bin/awk '/Series/{exit};{print}'
$MAILDIR/tonite.inbox"
procmail: Rescue of unfiltered data succeeded
From shekvl Tue Nov 7 20:00:07 1995
Folder: /usr2/users/students/shekvl/mail/incoming/other.inbox 71068
---------------------------------------------------------------------
The message now is filtered in tonite.inbox as I want, but I receive also
full (not filtered) message in other.inbox
Vladimir A. Shekhovtsov (shekvl(_at_)sncac(_dot_)snc(_dot_)edu)