I need some help in debugging a context expression.  I create intercept 
zones in my recursive DNS configurations in a somewhat automated 
manner.  Conversely, I would like to know when the zones expire, and 
take action on the expiring zone.  I think I can cause a SEC calendar 
event to extract the zone name and expiration details out of the 
configurations and a Single RegExp2 rule to parse those zones looking 
for candidates.

Would any of you kind souls be willing to debug the below for me?  I am 
having problems in particular with the context expression and comparison 
against %alnum variables.


type=Single
desc=Set variables and things on startup or restart of sec (core)
ptype=RegExp
pattern=SEC_(STARTUP|RESTART|SOFTRESTART)
context=[ SEC_INTERNAL_EVENT ]
action=eval %YY ( `/bin/date +%y` ; ); \
        eval %MM ( `/bin/date +%m` ; ); \
        eval %DD ( `/bin/date +%m` ; ); \
        logonly "date %{MM}/%{DD}/%{YY}"

type=Calendar
time=47 * * * *
desc=zone expirations
action=spawn /bin/egrep -i "intercept|zone" /exemplar/named.conf.intercept

# //
# // DNS Intercept expire 11/17/2011 TicketNNNNN
# zone "fresh-phish.com" {
#         type forward;
#         forward only;
#         forwarders {
#                 1.2.3.4;  //my authoritative server 1
#                 2.1.3.4;  //my authoritative server 2
#         };
# };


type=Single
ptype=RegExp2
pattern=DNS Intercept expire (\d+)/(\d+)/(20)?(\d+) (\S+)\nzone "(\S+)"
desc=zone expiration zone $6 ticket $5 date $1/$2/$4
action=logonly XXXXX expires today %s XXXXXX
context= =("$1" eq "%{MM}" && "$2" eq "%{DD}" && "$4" eq "%{YY}" )

Regards,
Tim Peiffer

-- 
Tim Peiffer
Network Support Engineer
Office of Information Technology
University of Minnesota/NorthernLights GigaPOP

+1 612 626-7884 (desk)


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to