On Wed, 30 Sep 1998, Adam Bailey wrote:
:0 c
* ^Subject: SEND ISSUE [0-9a-z]
You don't need casesensitiv matching here.. :-)
* ^Subjecy: (send *|issue *|send issue)*\/[0-9a-z]+-[0-9]+$
* !^X-Loop: odn(_at_)main-net(_dot_)com
* !^Subject:.*Re:
* !^FROM_DAEMON
# * !^Subject: SEND ISSUE .*[/.]\.
{
MAILDIR=$HOME/webpgs/issues
:0 fhw
* ^Subject: SEND ISSUE \/[^ ]*
| formail -rA "X-Loop: odn(_at_)main-net(_dot_)com"
:0 fhw
| formail -rA "X-Loop: odn(_at_)main-net(_dot_)com"
FILE="$MATCH"
volume_1/
issue_1.txt
FILE=`echo "$MATCH" |\
sed 's:^\([0-9a-z]*\)-\([0-9a-z]*\)$:volume_\1/issue_\2.txt:`
:0 ah
| cat - ./$FILE 2>&1 | $SENDMAIL -oi -t
}
:0 a:
requests.log
(As a side note, despite having commented out 6th line of the recipe,
security appears to remain intact [I couldn't request files that were in
a higher directory than MAILDIR]. Although if I'm missing something, I'd
appreciate someone pointing it out.)
That's cause your matching on [0-9a-z] and that doesn't contain \. :-)
Very good indeed..
: :0
: * STRING ?? -\/[0-9]+
* FILE ?? -\/[0-9]+
I think it could be so anyway..
: { ISSUE=$MATCH
{ ISSUE=$MATCH }
: STRING=$MATCH
: :0
: * STRING ?? ^^\/[0-9]+
Like here :-)
: { VOL=$MATCH }
--
/Emil