At 12:56 PM 11/28/97 -0500, Jason Lixfeld wrote:
PATH=/bin:/usr/bin:/usr/bin
Why is /usr/bin twice in your path?
Also, I suggest SHELL=/bin/sh to be sure, but that's probably not
the problem.
MAILDIR=$HOME/mail #you'd better make sure it exists
LOGFILE=$MAILDIR/from #recommended
VERBOSE=yes
## IE: message comes in with subject of "BSDI: TEST"
:0 HDhc
*
## writes subject to $DETAILS variable: BSDI
| DETAILS=`formail -x Subject: | awk '{print $1}' | sed s/:/" "/`
You can avoid forking sed by using a slightly more complicated awk program.
(I think you can avoid awk too, but I always mangle the syntax in trying :)
:0c
## finds messages with BSDI in subject and copies to ~admin/mail/BSDI
* ^Subject:$DETAILS.*
Generally, you will find mail has a space after Subject:, but multiple spaces
and tabs are permitted; thus try:
* ^Subject:[ ]*$DETAILS
(space and a tab inside the []).
If, on the other hand, by "in subject" you meant anywhere, then use:
* ^Subject:.*$DETAILS
In either case, you don't need the trailing .* and it will slow processing
down a tiny bit, aside from being clutter.
Hope that helps. If it's not enough, try posting results of a test from
your log file as well; that will often show the source of problems more
easily than mere inspection of recipes.
Cheers,
Stan