Lightweight email delivery for an Ubuntu server

Nobody really wants to deal with email deliv­ery bey­ond relay­ing it off to a remote host these days. I mean, c’mon! It’s 2011, not 2001! Even the more con­fig­ur­able MTAs like Exim and Post­fix are overkill when you just want a sys­tem 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 con­fig­ure sSMTP with at least the host­name of the remote serv­er to relay out­go­ing mail to, but oth­er­wise that’s it. Simple. 

Using the D‑Link DWA-125 with Ubuntu 10.04


This meth­od has only been tested under Ubuntu 10.04 (Lucid Lynx), but should work for any pre­vi­ous ver­sion of Ubuntu. Addi­tion­ally, the driver com­pile instruc­tions ref­er­enced should work for any mod­ern Linux dis­tri­bu­tion (2.6+ ker­nel). YMMV.


The default driver for the D‑Link DWA-125 wire­less 150 USB adapter cur­rently avail­able as part of the Ubuntu Linux dis­tri­bu­tion has errors. This art­icle offers a meth­od for fix­ing this issue. 


You will need a default Ubuntu install (ideally), a D‑Link DWA-125 wire­less USB adapter and access to an account on the machine in ques­tion that has super­user capabilities. 


Firstly, plug the device into a USB port and identi­fy it using the fol­low­ing command: 

lsusb | grep D-Link

This should return the fol­low­ing text as output: 

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

If the USB device ID is 07d1:3c0d, then con­tin­ue to the next step. If not, then the device is not the D‑Link we are look­ing for and is out of scope. 

The issue can be con­firmed by check­ing the sys­tem out­put using one of the fol­low­ing commands: 

  • grep rt2 /var/log/messages
    which should return some­thing like this:
    rt2800usb 1-6:1.0: firmware: requesting rt2870.bin
    ; or
  • dmesg | grep rt2
    which should return some­thing sim­il­ar to the above output.

The next step is to grab the most cur­rent Linux driver from D‑Link, com­pile it and install it. The GNU make pro­gram is needed for this step, but it should already be installed as part of a base Ubuntu install­a­tion. Run the fol­low­ing com­mands to down­load the cur­rent driver source, extract it, com­pile it and finally install it for use: 

wget --quiet*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 com­mands above com­plete suc­cess­fully, the new driver has been installed and the incor­rect driver has been pre­ven­ted from auto­mat­ic­ally load­ing. Restart the com­puter and the device will be avail­able for use.