I did it in lua bcs I had slightly more complex rules. Looks like what you have will work, it's just O(n) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20111012/95b0ec95/attachment.html>