%vars% in rules

Chuck Foster chuck.foster at STREAMSHIELD.COM
Fri May 13 14:55:19 IST 2005


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Having pondered over this for a while in the source, it would seem that you
can't do something like this:

        From:   blah at somewhere.com and To: %mydir%/ruleinfo
%myotherdir%/message.txt

Reason I was looking at this is several customer details are compiled
together, and where they have multiple domains I was considering one regexp
file for them instead individual lines, but as the location of the rules
might vary from MailScanner implementation to another using a percent var
seemed a handy way to do this ...


Would it break things absolutely horribly to do variable expansion before
any other rule processing, something like:

        sub Store1Rule {
                $_ = shift;

                ...

                chomp;
                s/\%([^%]+)\%/$PercentVars{lc($1)}/g;
                s/\${?(\w+)\}?/$ENV{$1}/g;
                s/#.*$//;
                etc etc etc

which would in principle allow some items to be set up in MailScanner.conf
which can then be reflected in rulesets later on?

Maybe that's too dangerous ... !

Chuck


This message should be regarded as confidential. If you have received this
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy
by an authorized signatory.


--
This message has been scanned for viruses and potentially
harmful content by StreamShield Protector.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list