mail me, no really me!It was starting to get irritating. Here I am, with these perpetually accurate, super-cute dynamic hostnames for my workshop, courtesy of the ever-reliable dyndns.org, and yet no functioning mailserver. Oh the shame!
Why would I want my own mailserver? I hear half of you ask (you two really need to think more!) Well, for starters, you can send emails directly, missing out your ISP altogether. Many people don't trust their ISP, and with good reason. You could also pretend to be Bill Gates and send emails from email@example.com, though this probably isn't recommended if you want to keep your internet access.
A more valid reason is so you can post email addresses onto the world-wide web, one-time addresses, or perhaps time-dependant, valid for just a day or a week. I have a whole domain solely for this purpose! You can also implement your own spam-protection measures, or better yet, authenticated reception, and so on, and so on, and so on, a million good reasons!
But for some reason, when I installed the latest (at the time, it's had an update since) Slackware, I didn't install Sendmail (at least not the full-blown thing, There's a binary in there somewhere, of course). My plan, if I remember, was to dabble with Postfix, because I'm so often told that it's "easy to use", which I figured might be a real timesaver in the long-run.
Anyways, at the weekend I decided to get this whole Postfix thing sorted out, and got stuck in. Six hours, and a lot of sweat, service restarts, and frenzied manpage/tutorial/forum reading later (not to mention one actual physical attack on my Linux rig, sorry Pengy!), I still have no mailserver! Bloody thing!
To cut a very long story short, the whole experience became so frustrating, I decided to delete the whole lot and grab the latest Sendmail package from Slackware software central. Less than five minutes later, I am sending mail over the internet. Sure, Sendmail may be a devil to configure, but it's a devil I know.
Of course I'll have to compile the beast from scratch if I want to get a "real" setup (why oh why can't Sendmail packagers leave the m4 config stuff where it bloody belongs?!?) but it works great, and is happily sending and receiving mail for my .ath.cx, .mine.nu and other dynamic domains. Mission accomplished, for now.
You see, I discovered that my router has a DDNS client built in, so my ISP can mess about all they like, and my dynamic hostname remains current, the router updates it automatically on every new PPP connexion. neat!
One crazy limitation of the router is that it can only keep three hosts updated; crazy when you consider that dyndns.org have been giving away five free domains for years. I thought I might see if there was such a thing as a ddns update script, something I could run as a cron job on me Linux box, no way am I installing one of those damn DUC things for the sake of two "back-up" hosts.
This search led me to the most enjoyable software installation I have ever experienced..
I found a likely script, a perl ddns script. It stated that it required the services of the "LWP" library, which I recognise from my server logs as being a all-things-www suite of tools for perl, that weird and wonderful scripting language that lives somewhere on most serious computers, and is even available for Windows®, along with loads of other "unix" software. I avoid it, generally, preferring the simplicity and power of PHP for web-side stuff, and plain bash in my shell.
When I found the LWP page, it states that it relies upon the services of a whole bag of other libraries and I could almost see myself, three hours later, trying to google-walk some crazy dependency tree, downloading and ./configuring and making and I'd almost given up on the whole thing when I discovered the LWP Bundle page with this funny wee perl command on it..
perl -MCPAN -e 'install Bundle::LWP'
which I duly entered into my shell..
OMFG!These guys rock! perl fired into action, contacted the CPAN site, and after a few logical and amazingly straightforward questions, went on to automatically install, configure and TEST every single package I would need to get LWP working, and work it does! I realise other software distributions systems exhibiting similar intelligent behaviour do exist, but they are still too few and far between!
I altered the perl script slightly so it would run from a cron job, and accept multiple hosts (or rather, accept them on the command line) and TADA! Five free and permanently updated dynamic hostnames!I'll likely chuck the cron/cli variant into the public archives sometime soon, once I add notes!
So the router handles my main three hosts (which must be updated immediately if there is any break in my ISP link), and the perl script handles the two back-up hosts at some yet-to-be finalised interval. Daily seems reasonable.
Why am I telling you all this? No reason.
So until I can track down that picture of a food that looks like a vagina to post under the pretence that I'd like someone to help identify it for me, here's a strange thing..
<- click it!