Gentoo ebuild for qmail with JMS1 combined patch

April 16th, 2009

In a previous post, I introduced a patch to add DKIM and DomainKeys support to Qmail with John Simpson’s combined patch. In this post I’ll introduce the ebuild I wrote (well, modified) to allow easily installing qmail-jms1 on a Gentoo system.

Though this ebuild makes installing qmail with John’s patch a little easier, it doesn’t make administering a qmail system child’s play. Before merging this ebuild, you should read through John’s website. You may also want to read about netqmail on Gentoo. While this ebuild has nothing to do with netqmail, it does borrow some the conventions presented in the Gentoo doc concerning starting, stopping and controlling qmail.

I didn’t include any of John’s run scripts or configuration files. Only the combined patch is applied to the base qmail image. I’ve also included some additional patches I’ve found useful. They are described in more detail on my qmail patches page. Most of my extra patches are controlled by use flags (dkim, ipv6) and not applied by default.

Gentoo , , , ,

Scan for Conficker with Nmap 4.85 beta5 Gentoo ebuild

March 31st, 2009

On Monday Dan Kaminsky, along with the Honeynet Project’s Tillmann Werner and Felix Lede announced they discovered the ability to detect if a machine is infected with the Conficker worm by scanning a network. See Dan’s post for more information. Shortly thereafter, version 4.85BETA5 of the nmap tool was released to allow remote scanning for the Conficker worm.

As April 1st is just a few hours away (I guess it’s already here in some parts of the world), I wanted to scan my network using the latest version of the nmap tool. As Gentoo doesn’t have an ebuild yet, I quickly created one and thought I’d share it.

This file contains everything you need:
Nmap 4.85BETA5 ebuild

Gentoo ,

DKIM and DomainKeys for qmail

March 19th, 2009

DomainKeys and its successor DomainKeys Identified Mail (DKIM) are technologies that allow organizations to take responsibility for a message. This is done by cryptographically signing an email as it leaves an organization in route to its destination. The signature can be verified using the DNS system to establish trust. In theory the technologies help cut down on spam by proving a message originated from the domain it says it does.

Support for DomainKeys in qmail has existed for a while thanks to a patch by Russel Nelson. Kyle Wheeler created a set of wrapper scripts that can be used to provide support for DKIM and DomainKeys. Mihai Secasiu has some wrapper scripts similar to Kyle’s that provide support for DKIM via the libdkim library instead of Perl’s Mail::DKIM module.

Server Admin , , , ,

Reloading reCAPTCHA with error via Javascript

February 20th, 2009

Today I needed to add a captcha to a web form used to send emails. Ordinarily this is pretty simple using the reCAPTCHA service. There was only one problem: the form was validated and submitted via AJAX rather than a regular HTTP post.

The reCAPTCHA client API provides a reload javascript method that will grab a new set of words for the user to decode. It was easy enough to display a small error message above the reCAPTCHA div and call this method when the user responds incorrectly.

In a typical setup, as described in the reCAPTCHA client API, the standard theme can display an error message when the user responds incorrectly. This is done by appending an error URL parameter to the challenge. The error message I was adding via javascript was showing up above the reCAPTCHA module rather than just above the text box. I wanted to display the error message included in the standard reCAPTCHA theme.

Web Applications , ,

Installing Gentoo 2008.0 amd64 on a Linode VPS

February 9th, 2009

Today I signed up for a Linode VPS. Linode appeared to have great reviews and very reasonable prices. I had originally looked at Host Virtual, primarily because they are planning to offer native ipv6 (something I’ve been wanting to play with) later this month.  I ended up with Linode because they have a Dallas datacenter which makes my connections from Austin pretty fast.

One advantage that Host Virtual provided was a more recent Gentoo image.  Linode only offers a Gentoo 2007.0 install, which it doesn’t even list as a current distribution.  No worries, in this post I describe the steps I took to install a fresh Gentoo 2008.0 amd64 image on my new Linode!

Update: On April 4 2009, Linode released a Gentoo 2008.0 x86_64 image, which somewhat obsoletes this post. I haven’t tried it, but if your looking to try 64-bit Gentoo on a Linode, try that image instead of these instructions.

Before we get started, some of the things I wanted on my system:

Gentoo , , ,

My first blog post

February 8th, 2009

I’ve decided to start a blog as an easy way to jot down thoughts and instructions on the various topics I come in to contact with everyday.  Perhaps as a direct result of Google and the vast amount of information available using only a few keystrokes, I’ve become very lazy in documenting the reasons behind some of what I do.  I’ve always been very deliberate in documenting code, but outside of that I write down very little.

Take Gentoo for example.  Gentoo is the best linux distribution for keeping up-to-date and tinkering (as well as anything else geek related).  But we all know the most painful part of Gentoo is setting it up.  The installation docs are great, and it’s relatively simple to get your 2nd Gentoo installation up and running in less than an hour, but the little things are a different story.  How did I get the back/forward buttons on my mouse to work in Firefox?  A year ago, why did I insist that I get a nVidia graphics card for running compiz on two monitors?  Sure I can use Google to search for howtos but the howtos never seem to cover my exact situation.  The loss of Gentoo’s unofficial wiki sure doesn’t help either.

Blog ,