[Mod_log_sql] LogSQLMassVirtualHosting and mod_vhost_alias

Bob Apthorpe apthorpe+sa at cynistar.net
Sun Jan 22 01:37:33 EST 2006


Hi,

Dice R. Random wrote:
> On 1/21/06, Dice R. Random <dicerandom at gmail.com> wrote:
> [...]
> Is there some ICANN documentation or something that will guarentee
> this is correct?  I didn't see anything when I took a cursory glance
> at their site.
> 
> It's not that I don't trust that what you said is true, Günther, I
> just want to be sure there's actually a policy in place so that this
> will work for all domains :)

Attached is a bit of perl to generate regexes to identify TLDs, 2LDs,
3LDs, and 4LDs from a recent (3.x) version of Mail::SpamAssassin.

The results should be PCRE-compatible so you should be able to use them
without perl. I originally used this script to generate code for a PHP
application to create DNSBLs from web probes, attacks, and blog spam but
it should be applicable to mod_log_sql as well.

Basically, if you match an xLD (top, second, third, fourth-level
domain), /(([^.]+\.)(xLD))$/ should match the base domain where you'd
store the log entry. www.example.co.uk and example.co.uk would match the
2LD '.co.uk' giving a base domain of example.co.uk for both. Similarly,
www.example.austin.ci.tx.us and example.austin.ci.tx.us would end up
under austin.ci.tx.us.

hth,

-- Bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_tld_regexes.pl
Type: text/x-perl
Size: 2228 bytes
Desc: not available
Url : http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20060122/9034318e/attachment.bin 


More information about the Mod_log_sql mailing list