Prior Art: Representing Queries in a DNSBL Lookup

Spam: DNS blocklists are a well-established, low-latency way to query a database of IP addresses for info. If you need to query a database over the internet quickly and in a connectionless manner, they’re ideal.

Declude have a page called how ip4r (DNSBL-style) DNS lookups work, which describes the general method:

  • input: the DNS zone for the DNSBL (e.g. ’sbl.spamhaus.org’)
  • input: IP address to query about (e.g. ‘1.2.3.4′)
  • perform A, or TXT query to retrieve data: ‘dig
    4.3.2.1.sbl.spamhaus.org. TXT’
  • output: data (waves hands… not important right now)

All well and good, if all you have is a single IP address as input. But what if you want to attach more query parameters — such as your user ID, or some numeric value to set a ’sensitivity’ level, like the SpamAssassin threshold system?

Easy-peasy: encode it in the looked-up hostname. Assuming you want to pass
a user ID number of ‘9583495′ and a threshold value of ‘7′ along with the query above, here’s one way to do it:

  • ‘dig threshold.7.uid.9583495.4.3.2.1.sbl.spamhaus.org. TXT’

Note that to avoid charset issues, marshalling into an ‘-a-z0-9.’ namespace is probably safest. Of course, a dynamic DNS server is required to process these. But the protocol itself, at least, will support it.

(Just brain-dumping here so I have an URL to point to in future, and to get it into archive.org etc…)

Tags: , , , , , , , , , ,

Comments

sleep(1) in Berkeley DB?

Code: Berkeley DB, the de-facto std for open-source high-performance database files on UNIX, is displaying some odd behaviour — it appears to be sleeping for 1 second inside the database library code, under load, for some versions of libdb. If you’re curious, there’s More info here.

Tags: , , , , , , , , ,

Comments

The Windows Find Setup Wizard

Joel writes about a canonical Windows UI mistake: ‘unequivocally the most moronic ‘wizard’ dialog in the history of the Windows operating system. This dialog is so stupid that it deserves some kind of award. A whole new category of award.’ It is, of course, the Find Setup Wizard dialog:

The first problem with this dialog is that it’s distracting. You are trying to find help in the help file. You do not, at that particular moment, give a hoot whether the database is small, big, customized, or chocolate-covered. In the meanwhile, this wicked, wicked dialog is giving you little pedantic lectures that it must create a list (or database). There are about three paragraphs there, most of which are completely confusing. There’s the painfully awkward phrase ‘your help file(s)’. You see, you may have one or more files. As if you cared at this point that there could be more than one. As if it made the slightest amount of difference. But the programmer who worked on that dialog was obviously distressed beyond belief at the possibility that there might be more than one help file(s) and it would be incorrect to say help file, now, wouldn’t it?

It’s a great article; there’s also some fantastic examples of stupid UI tricks that shouldn’t be possible, like detachable menu bars. Read it here.

Tags: , , , , , , , , ,

Comments