Roundcube Community Forum

 

Support for the HTTP:BL API

Started by OB1, March 25, 2011, 04:51:05 AM

Previous topic - Next topic

OB1

Hi there, tried searching the forums to see if this was already discussed, but I didn't find anything so here I am

My request is about a roundcube plugin or something along those lines to allow supporting the "project honeypot" HTTP:BL API (Http:BL Application Programming Interface (API) | Project Honey Pot) the basic idea is having a plugin like the "dnsbl" one with support with the API; basically the lookup method is the same as the one used for regular DNSBLs but, with a tweak, that is, the request against the HTTP:BL should be prefixed with a "key" (which can be freely obtained after signing up to the "Project Honeypot" site), this also means that to use the API the code should be slightly changed

The idea is that HTTP:BL may be quite useful to avoid bots (bruteforcers, harvesters..) to "rattle" at the roundcube webmail doorknob by checking the incoming requests against the "honeypot" list and refusing access from listed IP addresses

rosali

I will modify the DNSBL plugin, so that it will be possible to prepend the required access key before the reversed IP. That's not a big thing. Remind me, if it is not available in next myroundcube plugins bundle release.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

OB1

#2
Quote from: rosali;34166I will modify the DNSBL plugin, so that it will be possible to prepend the required access key before the reversed IP. That's not a big thing. Remind me, if it is not available in next myroundcube plugins bundle release.

Thanks !! See, I'm not a PHP coder, but I thought at that; I mean, I tried to figure out how to add a syntax like foobar.$IP.somebldomain.ext so that the $IP if present would be expanded to contain the reversed IP address (while if not present, the regular BL lookup approach would be used)... but after scratching my head for a while I wasn't able to figure out how to do that, so... THANKS !

[edit]

Had a further look at the code for your dnsbl plugin; so... well, allow me to post a couple notes; first of all, it sounds like it's spawning "nslookup" to run checks against each DNSBL, now, not that it's bad, but since PHP seems to have its own built-in DNS lookup functions

Using PHP to Perform DNS Lookups :: v-nessa.net :: Programming is Sexy

and since the overhead of using them (and call directly the OS libraries) is lower than the one from a "spawn", I think changing the code to leverage such calls may be a good idea; next, and since we're at it, the default config for the plugin, carries some DNSBLs which may be perfectly ok in case you want to filter incoming SMTP hosts but which aren't so effective when it comes to webmail "rattlers", so, I'd suggest changing the default lists as follows

/* Services to check */
$rcmail_config['dnsblacklists'] = array(
  "httpbl.abuse.ch",
  "virbl.dnsbl.bit.nl",
  "drone.abuse.ch",
  "bogons.cymru.com"
  );

for details, please see the "www" sites related to the above domains ;)

thanks again

rosali

Please test ...

http://mail4us.net/plugins/dnsbl.zip

... and let me know.

It is quickly tested on Windows OS. It should work on *NIX aswell.

Release is scheduled for next Sunday.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)