Archive for November, 2006

SpamAssassin 3.1.7 – Too Many False Positives

Thursday, November 30th, 2006

I just updated SpamAssassin to 3.1.7 on my Fedora Core 6 (FC6) installation and started receiving too many False Positives – in fact, any email that contained a URL would generate a false positive. Each email starts with a rating of 5.5:


2.2 URIBL_PH_SURBL         Contains an URL listed in the PH SURBL blocklist
[URIs: ebayrtm.com ebayobjects.com]
3.3 URIBL_AB_SURBL         Contains an URL listed in the AB SURBL blocklist
[URIs: ebayrtm.com ebayobjects.com]

I am using OpenDNS as my DNS server and have enabled typo correction.

The problem is the typo correction interferes with URIDNSBL plugin. The method used to check if any of the URIs are from known spammers is to check the results of a DNS query of [uri].multi.surbl.org. If the URI is not blacklisted, a NXDOMAIN response would typically be returned; instead, with OpenDNS’s typo correction, an A record pointing back to one of the OpenDNS.com servers is returned. If the URI is blacklisted, an A record with a value of 127.0.0.x is returned (where x is a bitmask of the various types of blacklists). Since the OpenDNS response does not match 127.0.0.x, the new version of SpamAssassin decides the URI is blacklisted.

Here are two solutions:

  1. Turn off typo correction for the mail server. This is done by:
    1. Go to your account page on OpenDNS
    2. Sign in or create an account
    3. Select Manage for your Network
    4. Turn off Enable type correction.
  2. Revert back to an earlier version of URIDNSBL.pm. This is what I chose to do because I still want typo correction on my mail server. This is accomplished by:
    1. Download the earlier working version (Revision 392950) of URIDNSBL.pm. This can be done by right-clicking on the previous link and saving it to a file.
    2. Make a backup of URIDNSBL.pm and save the earlier version in the same location:
      [rick@chocolate ~] $ locate URIDNSBL.pm
      /usr/lib/perl5/venfor_perl/5.8.8/Mail/SpamAssassin/Plugin/URIDNSBL.pm
      [rick@chocolate ~] $ cd /usr/lib/perl5/venfor_perl/5.8.8/Mail/SpamAssassin/Plugin
      [rick@chocolate ~] $ sudo mv URIDNSBL.pm{,.orig}
      [rick@chocolate ~] $ sudo cp /tmp/URIDNSBL.pm .
    3. Restart sendmail, spamassassin, mimedefang or whatever is providing this service. My installation uses ClamAV and MIMEDefang so I do the following:
      [rick@chocolate ~] $ sudo /sbin/service mimedefang restart
      [rick@chocolate ~] $ sudo /sbin/service sendmail restart

Refer to Apache Subversion for history and information about the URIDNSBL.pm file.

Wireless Networking under Windows Vista RC1 on Core 2 Duo MacBook Pro

Saturday, November 18th, 2006

I’ve finally been able to get Vista RC1 installed on my new MacBook Pro. The installation was fairly straightforward:

  1. Run Apple Boot Camp
  2. Create Drivers Disk
  3. Partition Drive (I made a 20GB drive)
  4. Install Windows Vista RC1

… until installing the Macintosh drivers from the newly minted driver cd. Towards the end of the installation, it had an error and didn’t let me know what had happened. Then, unbeknownst to me at the time, it had uninstalled almost all of the drivers copied into C:\Program Files\Macintosh Drivers for Windows XP 1.1.2 directory, save:

  • ATI Graphics
  • realtek
  • SigmaTel

After everything was done, my Device Manager showed four devices for which there were not working/available drivers:

  • USB Human Interface Device
  • Network Device
  • Performance Counters
  • Built-in iSight

Most importantly, this affected wireless networking and made Vista unable to connect to a wireless network.

The solution was to run the Install Macintosh Drivers for Windows XP.exe program again, and after it had unpacked all of the files, temporarily copy the folder C:\Program Files\Macintosh Drivers for Windows XP 1.1.2 to another place (e.g. the Desktop). There will be a number of new drivers available including ones for the Wireless Network adapter and the Built-in iSight.

To install those drivers, go into the Device Manager, right-click on the device with the missing driver and select Update Driver Software… Click on Browse my computer for driver software and then select the location of the copy of the Macintosh drivers. It will scan that directory (assuming you leave Include subfolders checked) and install the driver for the device.

After installing the network drivers, two new adapters will appear in the Device Manager:

  • Atheros AR5008 Wireless Network Adapter
  • Marvell Yukon 88E8053 PCI-E Gigabit Ethernet Controller

After that, it is possible to connect to your wireless network.

scrAPI and redirects without complete URL

Friday, November 3rd, 2006

I’ve been using scrAPI and loving it to scrape web pages in ruby. Unfortunately, I got stuck for a while when trying to read a page with a 302 redirect to a URL not beginning with http (see careerbuilder.com for examples). Turns out it’s a straightforward fix. I’ve sent in a bug request, but I’m also providing a patch file and instructions until that gets done.

*** reader.rb.orig      2006-10-06 10:32:43.000000000 -0400
--- reader.rb     2006-10-06 10:32:30.000000000 -0400
***************
*** 159,163 ****
:redirect_limit=>redirect_limit-1)
when Net::HTTPRedirection
!         return read_page(response["location"],
:last_modified=>options[:last_modified],
:etag=>options[:etag],
--- 159,165 ----
:redirect_limit=>redirect_limit-1)
when Net::HTTPRedirection
!           loc = response["location"]
!           loc = url.to_s.split(/\//)[0..2].join('/') + loc if loc !~ /^https?:\/\//
!         return read_page(loc,
:last_modified=>options[:last_modified],
:etag=>options[:etag],

Copy the above code into a file; let’s call it scrapi.patch (alternatively, you can download it here). Then, type the following command (you’ll need write access to the file):

patch -bd /usr/lib/ruby/gems/1.8/gems/scrapi-1.2.0/lib/scraper/ < scrapi.patch

That should be it! A backup copy of reader.rb will be saved and the URL will be prepended with the appropriate path if the uri.scheme is missing.

Pixel not working on FC6

Friday, November 3rd, 2006

I just came across this fabulous image manipulation program called Pixel, but it does not want to run or install under Fedora Core 6 (and I believe FC5, too). Problem is selinux is getting in the way. Pixel needs execmem privileges to install/run. Easiest thing to do now is to allow execmem with the following command:

sudo setsebool allow_execmem=1

You can always turn that off after running Pixel.

stop spam with honeypot!