Kubuntu 11.04 Email Package Updates

I’ve just built myself a new ITX based system to use as an integration server (amongst other things) for work. I hit a few bumps along the way so as usual I’ll let you know what they were.

Email Package Updates

Since I won’t be logging the desktop on this system on a regular basis I won’t get the usual nagging for package upgrades which will mean the system will slowly but surely get more and more out of date. That isn’t good so I want the machine to nag me daily to tend to its needs. The first part of the puzzle for solving this is to install a mail server so that the machine can send out emails. There are other lighter weight ways to do this but this machine has some grunt and it will only be a couple of emails a day so I don’t mind burning a few processor cycles on a full mail server. My mail server of choice is PostFix as it’s the Ubuntu default and well supported by Webmin.

sudo apt-get install postfix

Once that’s done you have a working mail server on your system and it’s time to install the nagging package. I quite like apticron which is just a fairly simple script run by cron each day.

sudo apt-get install apticron

You can run it from a command line to test it works. Note that it does a package update so be patient when running it by hand – it often looks like it’s hung. If you don’t get an email you’ll need to start digging into your mail server. The first thing to check is aliases. You’ll probably find that postmaster is aliased to root but in order to receive email at a useful address you need to alias root to a real email address e.g. me@example.com.

If you have set up your own internal DNS you will most likely also have PostFix complaining about “mail for example.com loops back to myself”. This is because you haven’t added the required MX records that tell PostFix where to send email. In my case I want to send example.com email through the Google Apps mail servers since they are configured to handle example.com email. A record like this in the internal DNS zone for example.com solves the problem.

example.com. IN    MX    10 ASPMX.L.GOOGLE.COM.

Note that it’s important that both of these URLs end with a dot.

Posted in Linux and tagged , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *