SSMTP Local MTA Using Google Apps Account

While there are plenty of MTAs out there, I find it quite handy to have SSMTP installed locally; it’s quick to install and configure and lacks some of the overhead of a more enterprise MTA such as Sendmail, Postfix, Exim etc.  The following assumes you have a “Google Apps for Domains” user account — ssmtp_user@domain.com — through which you will relay all email.  Additionally, the steps below work on Ubuntu 10.10, similar steps should work on other distributions.

Install SSMTP

sudo apt-get install ssmtp

Edit configuration in /etc/ssmtp/ssmtp.conf

# Backup the original first
sudo cp /etc/ssmtp/ssmtp.conf /etc/ssmtp/ssmtp.conf.out
# Truncate the file and add the following
mailhub=smtp.gmail.com:587
hostname=ssmtp_user@domain.com
root=ssmtp_user@domain.com
AuthUser=ssmtp_user@domain.com
AuthPass=
UseSTARTTLS=yes
UseTLS=yes
FromLineOverride=yes

Edit revaliases map in /etc/ssmtp/revaliases.conf

# Add a line for each local user who should be able to send email
root:smtp_user@domain.com:smtp.gmail.com:587
max:smtp_user@domain.com:smtp.gmail.com:587

Send Email!
You should now be able to send email, e.g. from the shell using

echo "Testing" | mail -s "Test Email" someone@example.com

The Highland Fling 2011 – Web Standard In Scotland

July 8th 2011 saw the welcome and eagerly anticipated return of “The Highland Fling — Web Standards in Scotland”.  Set up and organised by Alan White in 2007 to increase awareness of web standards and best practice, it’s the only conference of it’s kind in Scotland.  I’ve been fortunate enough to have been able to attend each conference, although there was a hiatus in 2009/2010.  The inaugural event really set the bar high for what could be achieved by a dedicated developer passionate about his work.

Continue reading

Parisian Honeymoon

Monday 30 May 2011

Our flight was scheduled to leave Edinburgh at 13:50 BST, arriving at Paris Charles de Gaulle at 16:40 GMT+1.  It was my first flight abroad, and Jo hadn’t been abroad since she was a lot younger.  We were a little nervous about getting things right at the airports, and unfortunately things didn’t go quite as smoothly as we had hoped; neither the airport signs nor staff were particularly helpful for the first-time traveller.  We’d gone through security: I had a rucksack and a small wheeled suitcase; Jo had her handbag and a small wheeled suitcase.

Continue reading

Our Wedding

May 28th 2011.  A day I’ll never forget; the day Jo and I got married.  It’s always difficult finding the time to write new posts, but I’d be remiss if I didn’t at the very least make sure I wrote something about, cliché as it may be, the happiest day of my life.  We’d originally planned the wedding for 10th October 2010: of course that date was nothing to do with the fact that 10-10-10 is easy to remember; not was it in any way related to the fact that 101010 in binary represents 42 in decimal — “the answer to life, the universe, and everything”!  That date wasn’t to be, due in no small part to a severe lack of funds and planning.  Fast forward to May 28th 2011 and having spent a not-exorbitant sum of money on eBay enjoyed a perfectly planned and executed wedding day in Edinburgh.  The weather was even good to us – it only rained when we were inside!  A massive thanks to Jo’s bridesmaids, Jess and Mip for supporting and helping her; my best man Sally for her support and help; my dad for doing a wonderful job of the photography and of course my beautiful wife Jo for doing me the greatest honour of marrying me!

Continue reading

Automating Internet Explorer VPC Images On VirtualBox

In order to facilitate testing of websites in different browsers, Microsoft have released what they call their ‘Application Compatibility Virtual PC Images‘.  These time-limited V12n solutions are great for quickly bringing up a VM for a particular version of Internet Explorer but they are built for Microsoft’s Virtual PC (VPC) software.

I work predominantly with Linux and use Virtual Box as my V12n application of choice.  Later versions of Virtual Box support VPC’s VHD disk image format.  This means it’s possible to run these VPC images under VirtualBox, but it involves downloading and extracting files from the win32 executables; downloading drivers for the ethernet adapter and other time consuming steps that I’d rather not repeat every time my IE VM expires.  I’m a programmer, therefore I’m lazy and don’t like doing things more than once; I’d rather script something to do it for me.  In keeping with this virtue, I’ve written msie2vbox to automate this stuff for me.  It’s on Github with a GPLv3 license.  There’s some outstanding todo items but it does the job for me, and I thought it might be of use to others.