procmail
[Top] [All Lists]

Re: Procmail filter for outgoing mail

1997-06-24 01:19:00
On Mon, 23 Jun 1997 you (Philip Guenther) wrote:
Chris Bidmead <bidmead(_at_)cbidmead(_dot_)demon(_dot_)co(_dot_)uk> writes:
I'm trying to write an outgoing filter that goes between my MUA
and a second filter written by Tim Luoma that in turn evokes
sendmail, and I'm not having much luck.

Well, before 3.11pre4, procmail didn't handle unquoted $@
correctly, so that's possibly part of the problem.

I'm running 3.11pre4, so if I understand you correctly I should be  
ok on this point.

That has to be one argument to sendmail, not three.

Point taken.  But Tim's filter takes care of that.  I just want to  
pass $@ intact to Tim.
| TimsFilter "$@"

OK, done that (see below).  "$@" still seems not to get filled with  
anything.


But what I want to do is set up DEFAULT to be TimsFilter -- ie, an
executable . Something along the lines of:

DEFAULT ="| TimsFilter"

Sorry, no can do. The recognition of the action type (pipe,
forward, or mailbox(es)) is done before variable expansion.

Oh dear, seems a shame.  However, I think I've taken care of that  
for the purposes of my simple filter by just falling through to a  
default action (see below).


Thanks very much for that swift response, Philip.  I've rejigged my  
filter so it looks like this:

=====cut here=========

SHELL=/bin/sh
# for diagnostics
TMPDIR=/tmp/procmailtest
VERBOSE=yes
LOGFILE=$TMPDIR/procmail.log

:0f
* ^To:.*Mag-Reader
| formail -I "Reply-To: chris-unix(_at_)cbidmead(_dot_)demon(_dot_)co(_dot_)uk" 
-s
{ }

:0
| /Users/bidmead/stopthatmail "$@"

=====cut here=========

But, alas, as I say I'm still not managing to fill $(_at_)(_dot_)  Could this  
be something to do with my use of hash-bang rather than evoking  
procmail in the shell?

el bid