On Mon, 22 Mar 2004, 01:43 GMT+01 Dallman Ross wrote:
You write in your code:
# MATCH does not need to be unset since "MATCH="
# will automatically be assigned before the next \/
This is not true. You need to be careful; MATCH is not
deleted, and if your new match operation is not an absolute
certainty then the old values will be left over.
Hm, yes, I am aware that MATCH will not be unset after its assignment,
but my feeling has been (and still is) that it *will* be before
procmail comes to a new \/. Here is a part of my code (from version
0.6) where I'm using MATCH for the first time, with the corresponding
verbose log added as comments:
av_FILENAME
# procmail: Assigning "av_FILENAME"
:0
* $ av_MULTIPART ?? $TRUE
# procmail: Match on "^^(on|yes)^^"
* $ B ?? ^Content-Type:[$WSB]+\/[^/]+/[^;]+;[$WSB]+name[$WSB]*=[$WSB]*\
$DQ?[^$DQ]+[.]($av_BAD_EXT|zip)$DQ?[$WS]*$
# !!!!!!!!!!!!!!!!!!
# procmail: Assigning "MATCH="
# ^^^^^^^^^^^^^^^^^^
# procmail: Matched "application/x-zip-compressed; name="TextFile.zip"
# "
# procmail: Match on "^Content-Type:[
# ]+\/[^/]+/[^;]+;[
# ]+name[
# ]*=[
# ]*"?[^"]+[.](bat|cmd|com|exe|pif|scr|zip)"?[ ]*$"
{
av_CT_MATCH = $MATCH
# procmail: Assigning "av_CT_MATCH=application/x-zip-compressed;
name="TextFile.zip"
# "
:0
* $ av_CT_MATCH ?? name[$WSB]*=[$WSB]*$DQ?\/[^$DQ]+
# !!!!!!!!!!!!!!!!!!
# procmail: Assigning "MATCH="
# ^^^^^^^^^^^^^^^^^^
# procmail: Matched "TextFile.zip"
# procmail: Match on "name[
# ]*=[
# ]*"?\/[^"]+"
{
av_FILENAME = $MATCH
# procmail: Assigning "av_FILENAME=TextFile.zip"
:0
* av_FILENAME ?? [.]\/[^.]+$
# !!!!!!!!!!!!!!!!!!
# procmail: Assigning "MATCH="
# ^^^^^^^^^^^^^^^^^^
# procmail: Matched "zip"
# procmail: Match on "[.]\/[^.]+$"
{ av_EXT = $MATCH }
# procmail: Assigning "av_EXT=zip"
}
:0 A
* av_CT_MATCH ?? ^\/[^;]+
# !!!!!!!!!!!!!!!!!!
# procmail: Assigning "MATCH="
# ^^^^^^^^^^^^^^^^^^
# procmail: Matched "application/x-zip-compressed"
# procmail: Match on "^\/[^;]+"
{ av_MIME = $MATCH }
# procmail: Assigning "av_MIME=application/x-zip-compressed"
av_CT_MATCH
procmail: Assigning "av_CT_MATCH"
}
So can you please explain why it is not true when I am writing
# MATCH does not need to be unset since "MATCH="
# will automatically be assigned before the next \/
?
Thanks,
rob.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail