On Sat, Feb 10, 2007 at 12:42:53AM -0300, Raul Dias wrote: > eval:check_rbl_sub('iadb-firsttrusted', '^127.2.255.1$') > > Doesn't this prevents the test if more than one A record is returned (^ > and $)??
No. They're not all in a string, the match happens against each response individually. > Or each check_rbl_sub is called for each A record returned?? No, just one call. > If this is set because it is an RE, doesn it need the / / too? Nope. The code does that for us. > If the last one is true, is the ^ $ really necessary? [...] > If it really is a RE, what preventes '127.0.0.1' to not match > 127.0.0.10? Or 127.1.0.1 to not match 127.120.1.1 ? You answered your own question. :) > Shouldn't the dots be escaped too? Arguably, yes. It works out that things like /^127.0.0.1$/ won't match any other valid IP though, so in the end it's ok, but technically the dots should be escaped. Note: I don't recall if the code escapes the dots for us, but I don't think so. -- Randomly Selected Tagline: "Integrity is doing the right thing when nobody is watching you." - Infonaut on Slashdot
pgp1shllGv5wM.pgp
Description: PGP signature