procmail
[Top] [All Lists]

Case-insensitive Subject $KEWWORD autoresponder

1997-05-12 04:58:00
If I use:
     KEYWORD="send formail example"
And, then, in the recipe below:
     * $ ^Subject:.*$KEYWORD
The autoresponder works, but, I lose the case-insensitivity of the matching.

Anyone know a good way to improve the file responder below so that
I can make the subject match a case-insensitive variable?

# ----------------------------------------------------------------------------
REQUESTOR=`formail -rtzx To:`
REQUEST=`formail -zx"Subject:"|sed -e 's/ /-/g'`
MYDIR=/myApplicationNotes
MYFILE=how.to.write.a.procmail.formail.autoreply.script
MYSUBJECT="Here is a working formail example"
DATE=`date +%d%h%y`
AUTOLOG=autoreply.log
:0
* $ ^Subject:.*send formail example
* !X-Loop: jjg(_at_)cadence(_dot_)com
* !Subject:.*Re:
* !FROM_DAEMON
{
:0 c:myAutoLockFile
| (formail -rt -A "X-Loop: jjg(_at_)cadence(_dot_)com" \
-I "Subject: Automatic $REQUEST $REQUESTOR - $MYSUBJECT";\
cat $MYDIR/$MYFILE) | $SENDMAIL -oi -t

:0
| echo "On $DATE, $REQUESTOR asked $REQUEST; sent $MYFILE" >> $AUTOLOG
}
REQUESTOR=
REQUEST=
MYDIR=
MYFILE=
MYSUBJECT=
DATE=
AUTOLOG=
KEYWORD=
# -------------------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>
  • Case-insensitive Subject $KEWWORD autoresponder, John Gianni <=