procmail
[Top] [All Lists]

Re: | vs. ? And another basic question

2003-01-09 14:43:54
On Thu, 09 Jan 2003 15:31:20 -0500 (EST), dman(_at_)nomotek(_dot_)com wrote:
=> procmail(_at_)deliberate(_dot_)net wrote:
=> > # IP ranges are for example only
=> > OR="2147483647^0"  # defined in initialization
=> > :0
=> > * $ $OR ^Received:.*[[(]209\.163\.100\.$OCTET[])]
=> > * $ $OR ^Received:.*[[(]000\.000\.000\.$OCTET[])]
=> > * $ $OR ^Received:.*[[(]000\.000\.000\.$OCTET[])]
=> >  { some spam variable or action set here }
        <snip>
=> you put the ^0-part into your variable definition itself.

        Actually, as another example of the ease and power of
variables, one could have included more variable usage and
written it as:

OR="2147483647^0"       # defined in initialization

# IP ranges are for example only
TESTIP="$OR ^Received:.*[[(]"
:0
* $ ${TESTIP}209\.163\.100\.$OCTET[])]
* $ ${TESTIP}000\.000\.000\.$OCTET[])]
* $ ${TESTIP}000\.000\.000\.$OCTET[])]
 { some spam variable or action set here }

        This has the advantage of eliminating typos on individual
lines such as "Recieved:" ...

        My only concern with having lots of variable usage is
their possible impact on the overall resources used and any
unknown overhead limits. So far, no problems encountered.

        Cheers,

        - Don

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail