Lightweight email delivery for an Ubuntu server

Nobody really wants to deal with email delivery beyond relaying it off to a remote host these days. I mean, c’mon! It’s 2011, not 2001! Even the more configurable MTAs like Exim and Postfix are overkill when you just want a system to be able to send email out.

That’s why these days, I just install mailx and sSMTP.

sudo apt-get install bsd-mailx ssmtp

You’ll need to configure sSMTP with at least the hostname of the remote server to relay outgoing mail to, but otherwise that’s it. Simple.

Using the D-Link DWA-125 with Ubuntu 10.04

Caveat

This method has only been tested under Ubuntu 10.04 (Lucid Lynx), but should work for any previous version of Ubuntu. Additionally, the driver compile instructions referenced should work for any modern Linux distribution (2.6+ kernel). YMMV.

Overview

The default driver for the D-Link DWA-125 wireless 150 USB adapter currently available as part of the Ubuntu Linux distribution has errors. This article offers a method for fixing this issue.

Requirements

You will need a default Ubuntu install (ideally), a D-Link DWA-125 wireless USB adapter and access to an account on the machine in question that has superuser capabilities.

Method

Firstly, plug the device into a USB port and identify it using the following command:

lsusb | grep D-Link

This should return the following text as output:

Bus 001 Device 003: ID 07d1:3c0d D-Link System

If the USB device ID is 07d1:3c0d, then continue to the next step. If not, then the device is not the D-Link we are looking for and is out of scope.

The issue can be confirmed by checking the system output using one of the following commands:

  • grep rt2 /var/log/messages
    which should return something like this:
    rt2800usb 1-6:1.0: firmware: requesting rt2870.bin
    ; or
  • dmesg | grep rt2
    which should return something similar to the above output.

The next step is to grab the most current Linux driver from D-Link, compile it and install it. The GNU make program is needed for this step, but it should already be installed as part of a base Ubuntu installation. Run the following commands to download the current driver source, extract it, compile it and finally install it for use:

wget --quiet ftp://www.dlinkla.com/pub/drivers/DWA-125/*LINUX*DWA-125*.tar.gz --directory-prefix=/tmp ;
tar -xzf /tmp/*LINUX*DWA-125*.tar.gz ;
cd /tmp/*RT3070*Linux* ;
make && sudo make install ;
echo "blacklist rt2800usb" | sudo tee --append /etc/modprobe.d/blacklist.conf

If the commands above complete successfully, the new driver has been installed and the incorrect driver has been prevented from automatically loading. Restart the computer and the device will be available for use.