<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bluebottle</title>
	<atom:link href="http://www.bluebottle.net.au/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bluebottle.net.au/blog</link>
	<description>a technical log</description>
	<lastBuildDate>Sat, 19 Dec 2009 14:13:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tarsnap backups on Windows and Linux</title>
		<link>http://www.bluebottle.net.au/blog/2009/tarsnap-backups-on-windows-and-linux</link>
		<comments>http://www.bluebottle.net.au/blog/2009/tarsnap-backups-on-windows-and-linux#comments</comments>
		<pubDate>Sat, 12 Dec 2009 05:58:59 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.bluebottle.net.au/blog/?p=404</guid>
		<description><![CDATA[For the past month or so I&#8217;ve been running Tarsnap to backup my home desktop and remote servers. Tarsnap is an online (payware) backup system that&#8217;s written by Colin Percival, and is probably the most technically impressive backup system I&#8217;ve seen. As well as that, it&#8217;s damn cheap.
What&#8217;s so great about Tarsnap? Here&#8217;s three things:

Snapshot [...]]]></description>
			<content:encoded><![CDATA[<p>For the past month or so I&#8217;ve been running <a href="http://www.tarsnap.com/">Tarsnap</a> to backup my home desktop and remote servers. Tarsnap is an online (payware) backup system that&#8217;s written by <a href="http://www.daemonology.net/blog/">Colin Percival</a>, and is probably the most technically impressive backup system I&#8217;ve seen. As well as that, it&#8217;s damn cheap.</p>
<p>What&#8217;s so great about Tarsnap? Here&#8217;s three things:</p>
<ul>
<li><strong>Snapshot backups.</strong> Every backup you create with tarsnap is a standalone &#8217;snapshot&#8217; of your data, totally independent of all other snapshots.</li>
<li><strong>Backup deduplication.</strong> So your backup includes a 300mb log file that gets a few megs of data written to it every day. Tarsnap recognises this, and for each new snapshot only the changed data has to be uploaded and stored.</li>
<li><strong>Crazy Ass Security.</strong> While mild-mannered Colin Percival works on Tarsnap during the day, by night he&#8217;s the <a href="http://security.freebsd.org/#sec">FreeBSD Security Officer</a>. He&#8217;s been there <a href="http://lists.freebsd.org/pipermail/freebsd-security/2005-August/003115.html">since 2005</a>, so must be doing <em>something</em> right. Plus, <a href="http://www.tarsnap.com/crypto.html">check out this page</a>. How can something with that many mentions of AES, SHA and RSA be insecure?! :-)</li>
</ul>
<p>This post isn&#8217;t a HOWTO on setting up Tarsnap, there&#8217;s a <a href="https://www.tarsnap.com/gettingstarted.html">comprehensive tutorial</a> on the subject already. This post is just to document how I use Tarsnap, on both Linux and Windows.</p>
<h2>Linux</h2>
<p>My Linux servers perform a simple daily backup of everything in certain folders. Technically, I could simply backup &#8220;/&#8221; and exclude the directories I don&#8217;t want, but smaller archives are faster to restore from, and there&#8217;s no monetary penalty for having more snapshots. This is my script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">dir</span> <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>tarsnap-dirs<span style="color: #7a0874; font-weight: bold;">&#41;</span> ; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #c20cb9; font-weight: bold;">nice</span> tarsnap <span style="color: #660033;">-c</span> <span style="color: #660033;">-f</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span> -s<span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> <span style="color: #660033;">-u</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>H<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$dir</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'/'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">--one-file-system</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #007800;">$dir</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Delete backups more than n days old</span>
<span style="color: #666666; font-style: italic;"># n=10</span>
<span style="color: #666666; font-style: italic;"># tarsnap --list-archives | sort | cut -d- -f1-2 | uniq | tail -n +$n &amp;gt; /tmp/temp.$$</span>
<span style="color: #666666; font-style: italic;"># tarsnap --list-archives | fgrep -f /tmp/temp.$$ | while read archive ; do</span>
<span style="color: #666666; font-style: italic;">#     echo Deleting $archive</span>
<span style="color: #666666; font-style: italic;">#     tarsnap -d -f $archive</span>
<span style="color: #666666; font-style: italic;"># done</span>
<span style="color: #666666; font-style: italic;"># rm /tmp/temp.$$</span>
&nbsp;
tarsnap <span style="color: #660033;">--print-stats</span></pre></div></div>

<p>(This script runs from crontab, so the output gets mailed to me daily. The email is sent to the address specified as the MAILTO variable in /etc/crontab.)</p>
<p>My .tarsnaprc looks like this:</p>
<pre>keyfile /root/tarsnap-key-abraxo.key
cachedir /root/tarsnap-cache/
exclude /root/tarsnap-cache/
humanize-numbers</pre>
<p>Each day, a backup of each folder listed in the file &#8216;tarsnap-dirs&#8217; is created, with names like: &#8216;bluebottle-20091209-200001-homeaj&#8217;. There&#8217;s commented out support for deleting old archives too, but my monthly costs are so low I keep everything.</p>
<h2>Windows</h2>
<p>My Windows setup is basically identical, but since there&#8217;s no native Windows (or msys) support for Tarsnap, you have to make do with Cygwin. Explaining how to install Cygwin is far beyond the scope of this document, <a href="http://jamesoff.net/site/2009/09/10/tarsnap-under-cygwin/">but it&#8217;s pretty simple</a>. Apart from the standard Tarsnap dependancies, you will probably also want to install &#8217;ssmtp&#8217;, which will let you email Tarsnap&#8217;s output to yourself like Unix cron does.</p>
<p>(You can generate ssmtp&#8217;s config file by running &#8217;ssmtp-config&#8217;.)</p>
<p>Again, my script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">log</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>tarsnap.log.<span style="color: #007800;">$$</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #007800;">$log</span>
From: Alex Jurkiewicz 
Subject: tarsnap run $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #7a0874; font-weight: bold;">&#41;</span>
To: Alex Jurkiewicz 
&nbsp;
EOF
&nbsp;
tarsnap <span style="color: #660033;">-c</span> <span style="color: #660033;">-f</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>H<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #7a0874; font-weight: bold;">&#41;</span>-homeaj <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span> aj <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #007800;">$log</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">1</span>
tarsnap <span style="color: #660033;">-c</span> <span style="color: #660033;">-f</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>H<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #7a0874; font-weight: bold;">&#41;</span>-CUsersAlex <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>cygdrive<span style="color: #000000; font-weight: bold;">/</span>c<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span> Alex <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #007800;">$log</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">1</span>
tarsnap <span style="color: #660033;">--print-stats</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #007800;">$log</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$log</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ssmtp.exe alex<span style="color: #000000; font-weight: bold;">@</span>bluebottle.net.au
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$log</span></pre></div></div>

<p>Because I want to exclude a lot of directories on Windows, I put these in my ~/.tarsnaprc file:</p>
<pre>exclude Desktop/
exclude AppData/Local/Temp/</pre>
<p>And so on. So there you have it. Simple, painless backups with my favourite new toy, Tarsnap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/tarsnap-backups-on-windows-and-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 nvidia-settings &#8211; xorg.conf save fail</title>
		<link>http://www.bluebottle.net.au/blog/2009/ubuntu-9-10-nvidia-settings-xorg-conf-save-fail</link>
		<comments>http://www.bluebottle.net.au/blog/2009/ubuntu-9-10-nvidia-settings-xorg-conf-save-fail#comments</comments>
		<pubDate>Wed, 18 Nov 2009 05:39:19 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.bluebottle.net.au/blog/?p=386</guid>
		<description><![CDATA[Ubuntu 9.10 creates a (relatively) minimal xorg.conf file compared to what older Ubuntus have. This causes the nvidia-settings app to be unable to parse the file (and therefore save a new version), specifically because of this missing line from the &#8220;Screen&#8221; section:
Device         "Default Device"
If you add this [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 9.10 creates a (relatively) minimal xorg.conf file compared to what older Ubuntus have. This causes the nvidia-settings app to be unable to parse the file (and therefore save a new version), specifically because of this missing line from the &#8220;Screen&#8221; section:</p>
<pre>Device         "Default Device"</pre>
<p>If you add this line to your default screen configuration in /etc/X11/xorg.conf, nvidia-settings should be happy again.</p>
<p>Gripe: didn&#8217;t <em>anyone</em> pick this up during testing?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/ubuntu-9-10-nvidia-settings-xorg-conf-save-fail/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripted FreeBSD reimaging</title>
		<link>http://www.bluebottle.net.au/blog/2009/scripted-freebsd-reimaging</link>
		<comments>http://www.bluebottle.net.au/blog/2009/scripted-freebsd-reimaging#comments</comments>
		<pubDate>Thu, 05 Nov 2009 16:01:26 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.bluebottle.net.au/blog/?p=370</guid>
		<description><![CDATA[Recently at work I&#8217;ve been working on a system to automatically revert FreeBSD systems to a known good state &#8211; something like a VM snapshot, but for physical machines too. The system is reasonably fast, portable across different hardware configurations and very easy to use. It&#8217;s turned out that this system has worked quite well, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently at work I&#8217;ve been working on a system to automatically revert FreeBSD systems to a known good state &#8211; something like a VM snapshot, but for physical machines too. The system is reasonably fast, portable across different hardware configurations and very easy to use. It&#8217;s turned out that this system has worked quite well, and although reasonably simple is the result of much research and time, so I&#8217;m posting some pointers here.</p>
<h2>The Problem</h2>
<p>The push for this came from a need to improve the testing environments our developers have been using. The old testing environments were VMs, more or less handmade at some point in the distant past to provide a rough approximation of our live environment. Since that time the developers had mostly looked after them themselves, tweaking, fixing and forking the VMs as they saw fit. New developers would copy an existing developer&#8217;s VM, and branch off from there.</p>
<p>This system was bad. There were problems ranging from minor version differences all the way up to entirely missing subsystems, not to mention the total lack of documentation. Every developer changed their VM slightly differently, so troubleshooting problems was as much exploration and discovery as debugging. Worse, the slowly growing number of environments made keeping them in sync (or something approximating that) with the live environment increasingly difficult. Something had to be done.</p>
<h2>The Solution</h2>
<p>What I&#8217;ve ended up going with is a very basic system that builds on as much of our previous infrastructure as possible. The key component is our &#8216;live environment image&#8217;, an OS image that we base all our live servers off. The new development environments are also based off this image, and the solution consists of a set of scripts that automate the conversion of the live environment image into a development environment. So that&#8217;s the high-level concept, how do the nitty gritty details work?</p>
<p>The system is made up of two separate installs of FreeBSD on one disk. The first install is a 5gb disk slice, containing a minimal install of FreeBSD. This is the <em>Reimaging OS</em>. The second install is on another slice taking up the rest of the disk and is the actual <em>Development Environment</em>.</p>
<h4>The Reimaging OS</h4>
<p>This copy of FreeBSD isn&#8217;t just a fresh install. There are a few changes, the most important are the installation of bash and these two lines added to the machine&#8217;s <em>/etc/rc.local</em> file, which start the magic:</p>
<pre>scp -i /root/key reimageuser@fileserver:dev-environment-reimage.sh /tmp/
/usr/local/bin/bash /tmp/dev-environment-reimage.sh</pre>
<p>And what does this script do? Well, in short:</p>
<ol>
<li>Format the partitions making up the Development Environment.</li>
<li>Restore the base &#8216;live environment image&#8217; into the Development Environment.</li>
<li>Modify the fresh Development Environment to actually be suitable for use as a Development Environment, rather than a live server.</li>
<li>Change the default boot slice to the second slice, and reboot the machine.</li>
</ol>
<p>So now the machine reboots, and when the bootloader starts up, it loads&#8230;</p>
<h4>The Development Environment</h4>
<p>Remember step three above? The hand-wavey &#8220;turn the live environment into a dev. environment&#8221; step? Well, you can&#8217;t fully complete that step from the Reimaging OS. There are some things you just don&#8217;t know. What hostname should you set for the machine? What email address should all outgoing mail be redirected to? It turns out that the first time a dev. environment boots, the developer has to answer some questions. After developers reimage their machine, the final step is to run a script on first login: <em>dev-environment-rechristen.sh</em>. This script goes through and makes all the changes to the system that require user input, plus a few workplace specific changes.</p>
<p>Of course, the developer also needs to be able to kick off a reimage of their environment at some point in the future. How do they do that? Another script sets the default boot OS to the Reimaging OS and reboots the machine. Developer goes away for a coffee and comes back to a fresh machine.</p>
<h2>The Scripts</h2>
<p>So that&#8217;s how it works, how about some sample code? Please note that these are edited versions of the scripts I run with anything even vaguely revealing about our configuration/infrastructure stripped out. They&#8217;re a starting point for you, but you still need to do a fair amount of work to get these scripts working for you.</p>
<ul>
<li><a href="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/11/reimage-setup.txt">reimage-setup.txt.</a> This is a short script I wrote to help quickly deploy the Reimaging OS to new machines. Put it on a thumbdrive with a FreeBSD <a href="http://www.freebsd.org/cgi/man.cgi?query=dump&amp;sektion=8">dump(8)</a> image, then boot off a FreBSD install CD, and select <em>Fixit -&gt; Live CD Filesystem</em>. Mount the USB key at /mnt (something like <em>mount /dev/da0s1 /mnt</em>) and then run the script like so: <em>/mnt/reimage-setup.sh /dev/ad0</em> (where /dev/ad0 is the drive you want to use for the dev. environment. The script (or something like it) has worked well for me across a number of heterogeneous systems, but, of course, YMMV. For the record, the rest of these scripts are written in bash, so make sure that&#8217;s available in your OSes.</li>
<li><a href="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/11/reimage-do.txt">reimage-do.txt.</a> This script is the basic skeleton of our dev-environment-reimage.sh script. It shares many of the assumptions the previous script makes: what the partitions are, where they are located and so on. I&#8217;ve excised the more site-specific customisation, but it&#8217;s ready to go otherwise.</li>
<li><a href="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/11/reimage-begin.txt">reimage-begin.txt.</a> This script completes the trio. It&#8217;s what you run from within the development environment to kick off the reimaging process. Nice and simple, and again shares all the assumptions the previous two scripts made.</li>
<li>Bonus: a starting point for your <a href="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/11/reimage-rechristen.txt">reimage-rechristen.sh script</a>. A couple of functions that ours does. Most of the rest of our script does site-specific work, like checking some files out of an SVN repository, changing the hostname in a few config files, and so on.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/scripted-freebsd-reimaging/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HOWTO: Wordpress pretty URLs with Nginx 0.6 (the proper way)</title>
		<link>http://www.bluebottle.net.au/blog/2009/howto-wordpress-pretty-urls-with-nginx-the-proper-way</link>
		<comments>http://www.bluebottle.net.au/blog/2009/howto-wordpress-pretty-urls-with-nginx-the-proper-way#comments</comments>
		<pubDate>Fri, 09 Oct 2009 11:21:43 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://www.bluebottle.net.au/blog/?p=359</guid>
		<description><![CDATA[A lot of guides around the net for Nginx + Wordpress suggest something like this:
if (!-e $request_filename) { rewrite ^/blog /blog/index.php?q=$1 last; }
This is Bad. Try this:
if (!-e $request_filename) { rewrite ^/blog /blog/index.php last; }
What&#8217;s the difference? Well, the latter form doesn&#8217;t set a GET variable. Why is that better? wp-super-cache, should you choose to [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of guides around the net for Nginx + Wordpress suggest something like this:</p>
<pre>if (!-e $request_filename) { rewrite ^/blog /blog/index.php?q=$1 last; }</pre>
<p>This is Bad. Try this:</p>
<pre>if (!-e $request_filename) { rewrite ^/blog /blog/index.php last; }</pre>
<p>What&#8217;s the difference? Well, the latter form doesn&#8217;t set a <a href="http://au2.php.net/manual/en/reserved.variables.get.php">GET variable</a>. Why is that better? wp-super-cache, should you choose to use it, refuses to create supercache files when the GET URL has variables in it. If you turn on the debug log, you see errors like these stream past:</p>
<pre>Supercache caching disabled. Non empty GET request.
Supercache disabled: GET or feed detected or disabled by config.</pre>
<p>You can find a full example of the required Super Cache config <a href="http://tech.nocr.at/tech/how-to-speed-up-wordpress-with-nginx-and-wp-super-cache/">here</a>.<br />
&nbsp;<br />
&nbsp;<br />
<strong>Update:</strong><br />
For nginx &gt;0.6.36 you can use the try_files directive instead:</p>
<pre>location /blog { try_files $uri $uri/blog.index.php; }</pre>
<p>There&#8217;s a full example with this new method in <a href="http://marc.info/?l=nginx&amp;m=125387258408141&amp;w=2">this mailing list post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/howto-wordpress-pretty-urls-with-nginx-the-proper-way/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 (64-bit) on Dell Vostro 1310</title>
		<link>http://www.bluebottle.net.au/blog/2009/windows-7-64-bit-on-dell-vostro-1310</link>
		<comments>http://www.bluebottle.net.au/blog/2009/windows-7-64-bit-on-dell-vostro-1310#comments</comments>
		<pubDate>Wed, 26 Aug 2009 03:15:56 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.bluebottle.net.au/blog/?p=326</guid>
		<description><![CDATA[Everything works out of the box! Well, almost everything:

Install new Nvidia drivers from the Nvidia website. The included ones are too ancient to be much good, and don&#8217;t support Aero or other fancy stuff.
Touchpad driver doesn&#8217;t support scroll zones or middle click emulation. Install the touchpad driver for the Latitude E6400 (this one in particular). [...]]]></description>
			<content:encoded><![CDATA[<p>Everything works out of the box! Well, almost everything:</p>
<ul>
<li>Install new Nvidia drivers from the <a href="http://www.nvidia.com/Download/index.aspx?lang=en-us">Nvidia website</a>. The included ones are too ancient to be much good, and don&#8217;t support Aero or other fancy stuff.</li>
<li>Touchpad driver doesn&#8217;t support scroll zones or middle click emulation. Install the touchpad driver for the <a href="http://support.dell.com/support/downloads/driverslist.aspx?os=WV64&amp;osl=EN&amp;catid=-1&amp;impid=-1&amp;servicetag=&amp;SystemID=LAT_E6400&amp;hidos=WLH&amp;hidlang=en&amp;TabIndex="><span id="SystemName" style="font-size: 12px;">Latitude E6400</span></a> (<a href="http://ftp.us.dell.com/input/Dell_Touchpad----Pointing-St_A09_R212017.exe">this one</a> in particular). This driver has somewhat weird default settings. I dropped sensitivity a few notches and reduced the scroll detection threshold to minimum.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/windows-7-64-bit-on-dell-vostro-1310/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Broadcom BCM4328 wifi on Ubuntu 9.04 Jaunty</title>
		<link>http://www.bluebottle.net.au/blog/2009/broadcom-bcm4328-on-ubuntu-904-jaunty</link>
		<comments>http://www.bluebottle.net.au/blog/2009/broadcom-bcm4328-on-ubuntu-904-jaunty#comments</comments>
		<pubDate>Tue, 12 May 2009 13:50:08 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/2009/broadcom-bcm4328-on-ubuntu-904-jaunty</guid>
		<description><![CDATA[Ubuntu now includes support for this wireless chip in its &#8216;Restricted Driver Manager&#8217;. Sadly the activation silently fails on a fresh install of Ubuntu. The solution? Install b43-fwcutter. Then disable and re-enable the driver in Ubuntu&#8217;s Restricted Driver Manager and it will work after a restart.
]]></description>
			<content:encoded><![CDATA[<p>Ubuntu now includes support for this wireless chip in its &#8216;Restricted Driver Manager&#8217;. Sadly the activation silently fails on a fresh install of Ubuntu. The solution? Install <a href="http://packages.ubuntu.com/jaunty/b43-fwcutter">b43-fwcutter</a>. Then disable and re-enable the driver in Ubuntu&#8217;s Restricted Driver Manager and it will work after a restart.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/broadcom-bcm4328-on-ubuntu-904-jaunty/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Processing email feedback loops for fun &amp; profit, part 2</title>
		<link>http://www.bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-2</link>
		<comments>http://www.bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-2#comments</comments>
		<pubDate>Tue, 05 May 2009 13:10:57 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=214</guid>
		<description><![CDATA[Part 1 here.
So we know what a feedback loop is and how to use it to identify customers complaining about our mails. The next step is to automate removal of these people.
It turns out many (most?) feedback loop emails you get from ISPs follow the same format. The message is made up of three sections:

The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-1">Part 1 here.</a></p>
<p>So we know what a feedback loop is and how to use it to identify customers complaining about our mails. The next step is to automate removal of these people.</p>
<p>It turns out many (most?) feedback loop emails you get from ISPs follow the same format. The message is made up of three sections:</p>
<ul>
<li>The first section is a generic message from the feedback loop provider, &#8220;this is an email abuse report, yadda yadda yadda&#8221;.</li>
<li>The second section is basically useless. It contains some information from the abuse report, but is usually heavily censored.</li>
<li>The third section is a copy of the original email you sent. Some information is redacted, like the recipient, and the sender address.</li>
</ul>
<p>To process this we need two pieces of information:</p>
<ul>
<li>Which ISP our feedback loop email comes from.</li>
<li>Who we sent the original email to.</li>
</ul>
<p>This is relatively easy with Python, which includes the <a href="http://docs.python.org/library/email.html">email</a> library module and will do most of the heavy lifting for you.</p>
<p>The &#8217;standard&#8217; feedback loop format is <a href="http://mipassoc.org/arf/">ARF</a>, and is used by (at least) AOL, Comcast and Yahoo. To process an email in this format:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">email</span>
message = <span style="color: #dc143c;">email</span>.<span style="color: black;">message_from_string</span><span style="color: black;">&#40;</span>foo<span style="color: black;">&#41;</span>
&nbsp;
messagefrom = message<span style="color: black;">&#91;</span><span style="color: #483d8b;">'From'</span><span style="color: black;">&#93;</span> <span style="color: #808080; font-style: italic;"># This is how you pull headers out.</span>
                              <span style="color: #808080; font-style: italic;"># Note the keys are not case sensitive</span>
&nbsp;
messagebody = message.<span style="color: black;">get_payload</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># This returns three sections, as described above</span>
&nbsp;
originalmessage = messagebody<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>.<span style="color: black;">get_payload</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> <span style="color: #808080; font-style: italic;"># This returns the original message.</span>
                                       <span style="color: #808080; font-style: italic;"># We need to explicitly get the single payload.</span>
&nbsp;
originalmessagesender = originalmessage<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Return-Path'</span><span style="color: black;">&#93;</span> <span style="color: #808080; font-style: italic;"># Ta-da! The original sender.</span></pre></div></div>

<p>You can then process originalmessagesender as required to retrieve your UID. Once you have that, send a request through to the appropriate interface and you&#8217;re done.</p>
<h2>Bonus Notes</h2>
<ul>
<li>Some providers <em>also</em> strip the return path from the original message. We solved this by hand setting the message-id header on all outgoing mail. If you also do that, make sure you set each message-id to a unique value. We use the same string as our sender address, but change the generic &#8216;@noreply.ourcompany.com&#8217; domain to the real machine involved in sending and also include the output of time.time(), which gives us useful troubleshooting info too.</li>
<li>The original plan was to process feedback loop messages as they come in by spawning a script for every returned mail. This turned out to be a bad idea because abuse messages seem to come in bursts, making it possible we&#8217;d accidentally DOS our own mailserver with tens of python scripts. Now every feedback email will be delivered to a Maildir. We iterate over every message in the Maildir with Python&#8217;s <a href="http://docs.python.org/library/mailbox.html">mailbox</a> module (which returns an email object as above for each message).</li>
<li>If your feedback loop is in another format, it&#8217;s pretty easy to work out the structure by playing with a sample message in the Python interpreter (IDLE).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-2/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3 redheaded songstresses you should listen to</title>
		<link>http://www.bluebottle.net.au/blog/2009/redheaded-songstresses</link>
		<comments>http://www.bluebottle.net.au/blog/2009/redheaded-songstresses#comments</comments>
		<pubDate>Sun, 19 Apr 2009 06:04:05 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=173</guid>
		<description><![CDATA[Clare Bowditch

&#8216;You Looked So Good&#8217;. Off the acoustic bonus disc of &#8216;The Moon Looked On&#8216;.
[See post to listen to audio]
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
Neko Case

&#8216;The Next Time You Say &#8220;Forever&#8221;&#8216;. Off &#8216;Middle Cyclone&#8216;.
[See post to listen to audio]
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
&#160;
Florence &#38; The Machine

&#8216;You Got The Love&#8217;. The B-Side off the &#8216;Dog Days&#8216; single.
[See post to listen to audio]
]]></description>
			<content:encoded><![CDATA[<h1>Clare Bowditch</h1>
<h1><a href="http://www.clarebowditch.com/"><img class="alignleft size-thumbnail wp-image-178" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/clare-bowditch-150x150.jpg" alt="" width="150" height="150" /></a></h1>
<p>&#8216;You Looked So Good&#8217;. Off the acoustic bonus disc of &#8216;<a href="http://www.clarebowditch.com/music/2">The Moon Looked On</a>&#8216;.</p>
<p>[See post to listen to audio]<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;</p>
<h1>Neko Case</h1>
<p><a href="http://www.nekocase.com/"><img class="alignleft size-thumbnail wp-image-180" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/neko-case-150x150.png" alt="neko-case" width="150" height="150" /></a></p>
<p>&#8216;The Next Time You Say &#8220;Forever&#8221;&#8216;. Off &#8216;<a href="http://www.nekocase.com/store/2009/02/middle_cyclone.html">Middle Cyclone</a>&#8216;.</p>
<p>[See post to listen to audio]<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;</p>
<h1>Florence &amp; The Machine</h1>
<p><a href="http://florenceandthemachine.net/"><img class="alignleft size-thumbnail wp-image-179" title="florence" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/florence-150x150.jpg" alt="florence" width="150" height="150" /></a></p>
<p>&#8216;You Got The Love&#8217;. The B-Side off the &#8216;<a href="http://www.myspace.com/florenceandthemachinemusic">Dog Days</a>&#8216; single.</p>
<p>[See post to listen to audio]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/redheaded-songstresses/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/01-you-looked-so-good-acoustic.mp3" length="2716959" type="audio/mpeg" />
<enclosure url="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/the-next-time-you-say-forever.mp3" length="1450166" type="audio/mpeg" />
<enclosure url="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/you-got-the-love.mp3" length="2303055" type="audio/mpeg" />
		</item>
		<item>
		<title>Processing email feedback loops for fun &amp; profit, part 1</title>
		<link>http://www.bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-1</link>
		<comments>http://www.bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-1#comments</comments>
		<pubDate>Fri, 17 Apr 2009 07:23:28 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=169</guid>
		<description><![CDATA[Warning: this blog post expects you to know your email envelope recipient from your &#8216;To&#8217; header address. If you don&#8217;t, here&#8217;s a good primer.
The company I currently work for sends out periodic mailouts to paying customers of our site. We comply with the CAN-SPAM act and give people a simple way to unsubscribe from our [...]]]></description>
			<content:encoded><![CDATA[<p>Warning: this blog post expects you to know your email envelope recipient from your &#8216;To&#8217; header address. If you don&#8217;t, <a href="http://djce.org.uk/about-email-envelopes">here&#8217;s a good primer</a>.</p>
<p>The company I currently work for sends out periodic mailouts to paying customers of our site. We comply with the CAN-SPAM act and give people a simple way to unsubscribe from our mailings, but some people still mark them as spam. This is a problem, because when people do this from the webmail interface of some ISPs, it records this, and if there are enough spam markings, starts refusing all connections from our mail servers until they process our removal request.</p>
<p>Many of the larger US ISPs allow you to sign up for an email &#8216;feedback loop&#8217; where they notify you whenever they detect a &#8217;spam&#8217; mail coming from your nominated IPs. We decided to try and use these feedback loops to automatically unsubscribe people from our mailing lists when they mark us as spam. There are two advantages:</p>
<ul>
<li>We have a lower chance of getting unilaterally blocked by some ISPs,</li>
<li>People who don&#8217;t want our messages won&#8217;t get them.</li>
</ul>
<p>All we need to do is pass the feedback loop messages to a script, extract the recipient address and send an unsubscribe request to the relevant part of our website. Sounds simple, right? I should be able to write something up using Python and procmail in an hour. Unfortunately life is a little more complex.</p>
<p>The first stumbling block is that most (all?) feedback loops remove some information from their notification emails. Of the two I&#8217;ve played with so far (AOL &amp; Comcast), both remove the destination address. They don&#8217;t do it sloppily either: every reference to the destination address is replaced with <em>&lt;redacted&gt;</em>. How can you tell who the message was sent to? In our case, we decided to modify our mailouts. Now, the envelope sender address we use in our mailouts includes a UID we can use to identify the sender. Previously our &#8216;Return-Path&#8217; header looked like this:</p>
<pre>Return-Path: &lt;blah@ourdomain.com&gt;</pre>
<p>Now it looks like:</p>
<pre>Return-Path: &lt;blah+UID@ourdomain.com&gt;</pre>
<p>So now the feedback loop emails we get are useful! Next post I&#8217;ll describe the simple procedure of parsing feedback loop emails with Python. If you want to skip ahead, <a href="http://docs.python.org/library/email">here&#8217;s a hint</a>.</p>
<p><a href="http://bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-2">Part 2 here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/processing-email-feedback-loops-for-fun-profit-part-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How not to launch your new multiplayer game&#8230;</title>
		<link>http://www.bluebottle.net.au/blog/2009/how-not-to-launch-your-new-multiplayer-game</link>
		<comments>http://www.bluebottle.net.au/blog/2009/how-not-to-launch-your-new-multiplayer-game#comments</comments>
		<pubDate>Wed, 15 Apr 2009 07:00:29 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=161</guid>
		<description><![CDATA[[UPDATE: After the day 1 patch it's actually possible to get a 3v3 game going without too much trouble now. Buyer Beware warning downgraded from 'Avoid' to 'Check it out'. Hopefully in a few more days they will fix some of the other more egregious issues. This is the nice part about Stardock published games [...]]]></description>
			<content:encoded><![CDATA[<p><em>[UPDATE: After the day 1 patch it's actually possible to get a 3v3 game going without too much trouble now. Buyer Beware warning downgraded from 'Avoid' to 'Check it out'. Hopefully in a few more days they will fix some of the other more egregious issues. This is the nice part about Stardock published games -- they really do keep <a href="http://sinsofasolarempire.com/">patching</a> them <a href="http://galciv2.com/">forever</a>.]</em></p>
<p>&#8230;when it feels like a paid beta. <a href="http://www.demigodthegame.com/">Demigod</a> &#8211; a <a href="http://en.wikipedia.org/wiki/Defense_of_the_Ancients">DotA</a> clone &#8211; was released yesterday. This game is one of many games that is only fun when played against other people. There are bots, but they basically suck. So the multiplayer functionality of this game is critical: if it doesn&#8217;t work properly, there are serious problems. Guess what Demigod&#8217;s multiplayer support is like so far:</p>
<p style="text-align: center;"><a href="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/demigod.jpg"><img class="size-medium wp-image-160 aligncenter" title="Matchmaking after 3 minutes. If I'm lucky, the game won't crash when I give up and click cancel." src="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/04/demigod-500x312.jpg" alt="demigod" width="500" height="312" /></a></p>
<p>Yes, the multiplayer is completely broken. So broken that one of the game developers has said on the support forums that there&#8217;s less than a 50% chance for games with more than two people from even starting properly, let alone playing smoothly.</p>
<p>So what&#8217;s the problem? The game went through multiple months of private beta testing, how could it be this bad? Two words: &#8220;UDP p2p&#8221;. Seemingly introduced in an attempt to combat the evils of lag, so far it appears to be an expensive exercise in not letting people play the game at all, laggy or not. Demigod <em>requires</em> a UDP connection to every other player in your game. If one of these connections doesn&#8217;t work, the game doesn&#8217;t start. For anyone.</p>
<p>The big problem seems to be how the game handles NAT, or other situations where incoming UDP connections are blocked. How do you handle NAT traversal? Should you try STUN or some other punchthrough technique? Should you try and use UPnP to negotiate this? What happens if the game has two (or more) people who just can&#8217;t accept incoming connections? Do you proxy their communication through other players? What about personal firewalls? What about firewalls elsewhere on the network?</p>
<p><a href="http://www.impulsedriven.com/downloads/Impulse_Reactor_White_Paper.pdf">The whitepaper</a> written about the backend multiplayer tech suggests NAT traversal is implemented, but so far in game it appears to fail more often than it succeeds, when it really should be succeeding well over 99% of the time for a task like this.</p>
<p>Demigod is a promising game, and I&#8217;d really like to play it against other humans. So far though, it&#8217;s been an expensive reminder that you should read reviews of games before you buy them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/how-not-to-launch-your-new-multiplayer-game/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Munin Query Cache Graphing</title>
		<link>http://www.bluebottle.net.au/blog/2009/munin-query-cache-graphing</link>
		<comments>http://www.bluebottle.net.au/blog/2009/munin-query-cache-graphing#comments</comments>
		<pubDate>Tue, 24 Mar 2009 13:39:26 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=129</guid>
		<description><![CDATA[Here&#8217;s a Munin template for graphing effectiveness of MySQL&#8217;s inbuilt query cache. I&#8217;ll submit it to MuninExchange once I get a day&#8217;s worth of traffic to upload a picture of the output graph. Blog readers get a live sample:


#!/bin/bash
&#160;
IFS=`echo -en &#34;\n\b&#34;`
QUERY=$&#40;mysql --skip-column-names --batch -e &#34;SHOW STATUS LIKE \&#34;Qcache_%\&#34;&#34; &#124; egrep &#34;(Qcache_hits&#124;Qcache_inserts&#124;Qcache_lowmem_prunes)&#34; 2&#38;gt;/dev/null&#41;
&#160;
case &#34;$1&#34; in
autoconf&#41;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="http://munin.projects.linpro.no/">Munin</a> template for graphing effectiveness of <a href="http://dev.mysql.com/doc/refman/5.0/en/query-cache.html">MySQL&#8217;s inbuilt query cache</a>. I&#8217;ll submit it to <a href="http://muninexchange.projects.linpro.no/">MuninExchange</a> once I get a day&#8217;s worth of traffic to upload a picture of the output graph. Blog readers get a live sample:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2009/03/abraxo.bluebottle.net.au-mysql_querycachehits-day.png" alt="" width="495" height="295" /></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">IFS</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-en</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>\b&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">QUERY</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>mysql <span style="color: #660033;">--skip-column-names</span> <span style="color: #660033;">--batch</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;SHOW STATUS LIKE <span style="color: #000099; font-weight: bold;">\&quot;</span>Qcache_%<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #ff0000;">&quot;(Qcache_hits|Qcache_inserts|Qcache_lowmem_prunes)&quot;</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
<span style="color: #c20cb9; font-weight: bold;">autoconf</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$QUERY</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">exit</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> no <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
config<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> graph_title Mysql query cache hitrate
        <span style="color: #7a0874; font-weight: bold;">echo</span> graph_vlabel hits
        <span style="color: #7a0874; font-weight: bold;">echo</span> graph_args <span style="color: #660033;">--base</span> <span style="color: #000000;">1000</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> graph_category mysql
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_hits.label Cache hits
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_hits.type DERIVE
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_hits.min <span style="color: #000000;">0</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_hits.draw LINE2
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_inserts.label Cache misses<span style="color: #000000; font-weight: bold;">/</span>inserts
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_inserts.type DERIVE
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_inserts.min <span style="color: #000000;">0</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_inserts.draw LINE2
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_lowmem_prunes.label Cache drops
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_lowmem_prunes.type DERIVE
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_lowmem_prunes.min <span style="color: #000000;">0</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> Qcache_lowmem_prunes.draw LINE2
        <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #000000; font-weight: bold;">for</span> LINE <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>mysql <span style="color: #660033;">--skip-column-names</span> <span style="color: #660033;">--batch</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;SHOW STATUS LIKE 'Qcache_%'&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #ff0000;">&quot;(Qcache_hits|Qcache_inserts|Qcache_lowmem_prunes)&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ; <span style="color: #000000; font-weight: bold;">do</span>
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$LINE</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> -f1<span style="color: #000000; font-weight: bold;">`</span>.value <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$LINE</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> -f2<span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #000000; font-weight: bold;">done</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/munin-query-cache-graphing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More dotfiles</title>
		<link>http://www.bluebottle.net.au/blog/2009/more-dotfiles</link>
		<comments>http://www.bluebottle.net.au/blog/2009/more-dotfiles#comments</comments>
		<pubDate>Wed, 04 Mar 2009 13:49:57 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=125</guid>
		<description><![CDATA[By special request. These are all pulled by my .zshrc if existing copies aren&#8217;t there:
.htoprc &#8211; for htop
.screenrc &#8211; for GNU Screen
.config/terminator/config &#8211; for Terminator terminal
.vimrc &#8211; for Vim
.ssh/config &#8211; for ssh/sshd
]]></description>
			<content:encoded><![CDATA[<p>By special request. These are all pulled by <a href="http://bluebottle.net.au/blog/2009/my-zshrc">my .zshrc</a> if existing copies aren&#8217;t there:</p>
<p><a href="http://bluebottle.net.au/.htoprc">.htoprc</a> &#8211; for htop</p>
<p><a href="http://bluebottle.net.au/.screenrc">.screenrc</a> &#8211; for GNU Screen</p>
<p><a href="http://bluebottle.net.au/.terminatorconfig">.config/terminator/config</a> &#8211; for Terminator terminal</p>
<p><a href="http://bluebottle.net.au/.vimrc">.vimrc</a> &#8211; for Vim</p>
<p><a href="http://bluebottle.net.au/.sshconfig">.ssh/config</a> &#8211; for ssh/sshd</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/more-dotfiles/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My .zshrc</title>
		<link>http://www.bluebottle.net.au/blog/2009/my-zshrc</link>
		<comments>http://www.bluebottle.net.au/blog/2009/my-zshrc#comments</comments>
		<pubDate>Tue, 10 Feb 2009 13:29:42 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=120</guid>
		<description><![CDATA[I have always known a few people who use zsh over bash, but recently they seem to be increasing in numbers. I decided to jump ship too and haven&#8217;t looked back. Possibly that&#8217;s because I&#8217;ve actually spent some time setting up my .zshrc&#8230;
Permanent link here. I use this .zshrc regularly on both Linux and FreeBSD [...]]]></description>
			<content:encoded><![CDATA[<p>I have always known a few people who use zsh over bash, but recently they seem to be increasing in numbers. I decided to jump ship too and haven&#8217;t looked back. Possibly that&#8217;s because I&#8217;ve actually spent some time setting up my .zshrc&#8230;</p>
<p>Permanent link <a href="http://bluebottle.net.au/.zshrc">here</a>. I use this .zshrc regularly on both Linux and FreeBSD machines, some quite old, so it&#8217;s reasonably compatible. Includes an interesting prompt that changes the colour of the depending on the hostname (thanks, nameless coworker).</p>
<p>Note that this zshrc writes quite a few files and overwrites existing ones in some cases. Caveat emptor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/my-zshrc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mount a Windows share from Ubuntu</title>
		<link>http://www.bluebottle.net.au/blog/2009/mount-a-windows-share-from-ubuntu</link>
		<comments>http://www.bluebottle.net.au/blog/2009/mount-a-windows-share-from-ubuntu#comments</comments>
		<pubDate>Mon, 19 Jan 2009 15:05:51 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=115</guid>
		<description><![CDATA[You&#8217;d think by now a simple solution to this would have percolated up to the top few results in a Google search. Sadly not.
ajlaptop:~&#62; sudo apt-get install smbfs
[...]
ajlaptop:~&#62; sudo mount -t cifs '\\AJ\Music' /mnt/home-music -o username=alex
ajlaptop:~&#62;
Into fstab:
\\AJ\Music    /mnt/home-music    smbfs    credentials=/home/aj/.smbpasswd-home-aj,noauto,uid=aj,gid=aj,ro    0    0
See Also:
mount.smbfs(8)
]]></description>
			<content:encoded><![CDATA[<p>You&#8217;d think by now a simple solution to this would have percolated up to the top few results in a Google search. Sadly not.</p>
<pre>ajlaptop:~&gt; sudo apt-get install smbfs
[...]
ajlaptop:~&gt; sudo mount -t cifs '\\AJ\Music' /mnt/home-music -o username=alex
ajlaptop:~&gt;</pre>
<p>Into fstab:</p>
<pre>\\AJ\Music    /mnt/home-music    smbfs    credentials=/home/aj/.smbpasswd-home-aj,noauto,uid=aj,gid=aj,ro    0    0</pre>
<p><strong>See Also:</strong></p>
<p><a href="http://man.root.cz/8/mount-smbfs-8-gz/">mount.smbfs(8)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/mount-a-windows-share-from-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Please free 53.93mb and click Retry&#8221;</title>
		<link>http://www.bluebottle.net.au/blog/2009/please-free-5393mb-and-click-retry</link>
		<comments>http://www.bluebottle.net.au/blog/2009/please-free-5393mb-and-click-retry#comments</comments>
		<pubDate>Sun, 18 Jan 2009 04:46:18 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=113</guid>
		<description><![CDATA[I got this nice message when installing drivers on my brother&#8217;s old-but-newly-formatted machine. The motherboard is a Gigabyte GA-K8NF-9 (runs Athlon64 CPUs), the installers were from Gigabyte&#8217;s website, and used the InstallShield wrapper. I had a fresh WinXP SP1a install, and this message appeared despite the &#62;100gb free space.
The solution is a little strange: enable [...]]]></description>
			<content:encoded><![CDATA[<p>I got this nice message when installing drivers on my brother&#8217;s old-but-newly-formatted machine. The motherboard is a Gigabyte GA-K8NF-9 (runs Athlon64 CPUs), the installers were from Gigabyte&#8217;s website, and used the InstallShield wrapper. I had a fresh WinXP SP1a install, and this message appeared despite the &gt;100gb free space.</p>
<p>The solution is a little strange: enable compatibility mode and set it to NT4 mode. The installer should get to the main wizard screen now, and then fail because it thinks your OS is too old. Now, disable compatibility mode, and re-run the installer. Voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/please-free-5393mb-and-click-retry/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Exetel HSPA / HSDPA / Mobile Broadband on Ubuntu 8.10</title>
		<link>http://www.bluebottle.net.au/blog/2009/exetel-hspa-hsdpa-mobile-broadband-on-ubuntu-810</link>
		<comments>http://www.bluebottle.net.au/blog/2009/exetel-hspa-hsdpa-mobile-broadband-on-ubuntu-810#comments</comments>
		<pubDate>Mon, 05 Jan 2009 11:59:35 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=106</guid>
		<description><![CDATA[Exetel&#8217;s HSPA service works fine on Ubuntu 8.10, but it doesn&#8217;t work out of the box. For some (brain-dead) reason, Ubuntu pops up a &#8216;new mobile broadband&#8217; wizard when you plug your USB modem in, but it forces you to choose from a list of presets, without the ability to create a custom connection. Not [...]]]></description>
			<content:encoded><![CDATA[<p>Exetel&#8217;s HSPA service works fine on Ubuntu 8.10, but it doesn&#8217;t work out of the box. For some (brain-dead) reason, Ubuntu pops up a &#8216;new mobile broadband&#8217; wizard when you plug your USB modem in, but it forces you to choose from a list of presets, without the ability to create a custom connection. Not surprisingly, Exetel isn&#8217;t in that list.</p>
<p>You can work around this weirdness with a kludge. When you&#8217;re in the wizard, pick another random preset (I used Vodafone). Then, after the wizard is complete, manually fix the settings. All I had to do was change the profile name &amp; APN (to <em>exetel1</em>). Voila!</p>
<p>Enjoy your cheap 3g :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2009/exetel-hspa-hsdpa-mobile-broadband-on-ubuntu-810/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Places to increase Ubuntu Volume</title>
		<link>http://www.bluebottle.net.au/blog/2008/places-to-increase-ubuntu-volume</link>
		<comments>http://www.bluebottle.net.au/blog/2008/places-to-increase-ubuntu-volume#comments</comments>
		<pubDate>Tue, 30 Dec 2008 06:03:11 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=101</guid>
		<description><![CDATA[Because every install seems annoyingly limited in max volume:

 Application volume sliders
 Volume slider in top menu (double click it)
 alsamixer

]]></description>
			<content:encoded><![CDATA[<p>Because every install seems annoyingly limited in max volume:</p>
<ul>
<li> Application volume sliders</li>
<li> Volume slider in top menu (double click it)</li>
<li> alsamixer</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/places-to-increase-ubuntu-volume/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prince of Persia</title>
		<link>http://www.bluebottle.net.au/blog/2008/prince-of-persia</link>
		<comments>http://www.bluebottle.net.au/blog/2008/prince-of-persia#comments</comments>
		<pubDate>Sat, 27 Dec 2008 06:29:59 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=75</guid>
		<description><![CDATA[Somewhere between Assassin&#8217;s Creed, Shadow of the Colossus and Mirror&#8217;s Edge. I got through it in around 15 hours, which I&#8217;ll guess is a reasonably average time.
While I was running up a collapsing tower my brother walked past and asked me &#8220;what movie is that?&#8221;.
The graphics are nice, the game flows well, and the quicktime [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhere between Assassin&#8217;s Creed, Shadow of the Colossus and Mirror&#8217;s Edge. I got through it in around 15 hours, which I&#8217;ll guess is a reasonably average time.</p>
<p>While I was running up a collapsing tower my brother walked past and asked me &#8220;what movie is that?&#8221;.</p>
<p>The graphics are nice, the game flows well, and the quicktime events are happily unimportant. It feels very much like a game that ticks all the boxes of what a modern game should have &#8212; and I don&#8217;t mean that in a bad way. It&#8217;s genuinely fun to play, and I actually found myself caring about the main characters by the end of the game.</p>

<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-chars' title='pop-chars'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-chars-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-chars" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-acrobatics' title='pop-acrobatics'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-acrobatics-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-acrobatics" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-bossfight1' title='pop-bossfight1'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-bossfight1-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-bossfight1" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-bossfight2' title='pop-bossfight2'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-bossfight2-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-bossfight2" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-bossfight3' title='pop-bossfight3'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-bossfight3-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-bossfight3" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-fight' title='pop-fight'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-fight-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-fight" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-rejected' title='pop-rejected'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-rejected-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-rejected" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-view' title='pop-view'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-view-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-view" /></a>
<a href='http://www.bluebottle.net.au/blog/2008/prince-of-persia/pop-wallrun' title='pop-wallrun'><img width="150" height="150" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/12/pop-wallrun-150x150.jpg" class="attachment-thumbnail" alt="" title="pop-wallrun" /></a>

<p>The ending is inspired.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/prince-of-persia/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Konsole / Gnome Terminal on Windows</title>
		<link>http://www.bluebottle.net.au/blog/2008/using-konsole-gnome-terminal-on-windows</link>
		<comments>http://www.bluebottle.net.au/blog/2008/using-konsole-gnome-terminal-on-windows#comments</comments>
		<pubDate>Wed, 17 Dec 2008 09:09:11 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=37</guid>
		<description><![CDATA[I&#8217;ve always wanted to use Konsole on Windows. It&#8217;s mostly because I&#8217;m sick of using PuTTY as an SSH terminal. it&#8217;s fine for what it does, but the fact it doesn&#8217;t run from a shell that has a full set of Linux userspace tools has always been an irritant. A few months ago I decided [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always wanted to use Konsole on Windows. It&#8217;s mostly because I&#8217;m sick of using PuTTY as an SSH terminal. it&#8217;s fine for what it does, but the fact it doesn&#8217;t run from a shell that has a full set of Linux userspace tools has always been an irritant. A few months ago I decided to start looking for a better solution &#8212; running Konsole on my Windows box.</p>
<p>A few years ago this would have been mostly impossible but I now use Konsole on all my machines! There are a few solutions for using a better terminal emulator on Windows. In order of usability:</p>
<ul>
<li><strong>Use Konsole in a <a href="http://www.vmware.com/products/ws">VMWare Workstation</a> VM and enable Unity</strong> &#8211; Unity is like Parallels for Mac, except it&#8217;s on Windows. You boot up your Windows / Linux VM and enable it, and the windows in the VM become native windows on the host. The emulation isn&#8217;t perfect, but alt-tab and copy/paste work which are the important two. Drag &amp; Drop between the two OSes works well in VMware too. The biggest problem is that it&#8217;s relatively slow compared to other solutions and dragging windows around makes it obvious there is trickery going on.</li>
<li><strong>Use Konsole in <a href="http://www.virtualbox.org">VirtualBox</a> and enable Seamless Mode</strong> &#8211; Like VMWare Workstation, but it doesn&#8217;t work as well and costs less (ie, free). Copy/paste is a little flaky (don&#8217;t try to do anything but plain text), alt-tab isn&#8217;t unified. On the plus side, the emulation feels a lot snappier than VMWare.</li>
<li><strong>Use Konsole in <a href="http://www.andlinux.org">andLinux</a></strong> &#8211; Definitely the fastest solution, alt-tab works properly and copy/paste is pretty good too. The only issue is that andLinux communicates between the host &amp; client OS via a special loopback NIC it installs, and this played havoc with my Windows Vista laptop. With the device enabled Windows would ignore other NICs installed (like a ethernet or wifi connection) and refuse to talk to the internet. Dis/Enabling the andLinux NIC and rebooting the guest would get it working eventually, but it was a lot of work. I suspect with more work a simple solution could be found, but I gave up.</li>
<li><strong>Use Konsole in <a href="http://windows.kde.org/">KDE for Windows</a></strong> &#8211; fgsfds, try this only if you have a lot of patience and willingness to hack stuff. I couldn&#8217;t get everything installed sucessfully, much less working. Once it&#8217;s setup properly I&#8217;m sure it will win, though.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/using-konsole-gnome-terminal-on-windows/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing pam_abl to block brute force SSH attempts on Linux</title>
		<link>http://www.bluebottle.net.au/blog/2008/installing-pam_abl-on-linux</link>
		<comments>http://www.bluebottle.net.au/blog/2008/installing-pam_abl-on-linux#comments</comments>
		<pubDate>Tue, 16 Dec 2008 12:54:38 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=40</guid>
		<description><![CDATA[pam_abl is a great tool to mitigate SSH bruteforce attacks on a server. It works by monitoring remote hosts trying to authenticate via PAM, and silently failing attempts from a given host (or for a certain user) if the number of failed attempts has exceeded a given threshold. Unlike other techniques like fail2ban, the brute [...]]]></description>
			<content:encoded><![CDATA[<p>pam_abl is a great tool to mitigate SSH bruteforce attacks on a server. It works by monitoring remote hosts trying to authenticate via PAM, and silently failing attempts from a given host (or for a certain user) if the number of failed attempts has exceeded a given threshold. Unlike other techniques like fail2ban, the brute forcer (if they are even human) will not realise you&#8217;re blocking them. It also works in realtime.</p>
<p>Unfortunately, it&#8217;s not in the repository of many distros anymore (at least not Debian and Ubuntu). You can still install it by hand reasonably easily. These instructions apply to Debian, but are pretty generic and should work with a little tweaking on any distro.</p>
<ol>
<li>Install the required tools: gcc, libpam0g-dev, libdb-dev (likely any 4.x version would work)</li>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=148927">Download the .tar.gz from the official project.</a></li>
<li>Extract: <em>tar xzf pam_abl-0.2.3.tar.gz</em></li>
<li>Compile: <em>cd pam_abl; make</em></li>
<li>Install: sudo make install</li>
<li>Create the configuration file in <em>/etc/security/pam_abl.conf</em>. I use something like the below. You can read more about the available options in the doc/ folder of the .tar.gz:</li>
<pre>host_db=/var/lib/abl/hosts.db
host_purge=1d
host_rule=*:10/1h,30/1d</pre>
<li>Add pam_abl to SSH&#8217;d PAM stack. Edit /etc/pam.d/sshd and add this line right before real authentication begins (usually the reference to pam_unix). See the documentation for more info again:</li>
<pre>auth	required	pam_abl.so config=/etc/security/pam_abl.conf</pre>
<li>Enjoy your SSH bruteforce protected server!</li>
</ol>
<p>A few other tips:</p>
<ul>
<li><strong>You should manually run <em>pam_abl &#8211;purge</em> every day or so, it doesn&#8217;t seem to purge automatically all the time.</strong></li>
<li>You can add pam_abl to the PAM stack of other applications if you want, it works the same way.</li>
<li>You can see the contents of the pam_abl database with the program <em>pam_abl</em>. A useful trick to see all currently blocked hosts: <em>pam_abl | grep &#8211;before-context=1 &#8220;*&#8221;</em></li>
<li>If the database gets too large pam_abl will stop working properly. Make sure you set a sane purge rule.</li>
<li>Remember you don&#8217;t need to be very aggressive to catch 99.9% of bruteforce attempts.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/installing-pam_abl-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a static IP and improve speed of Vodafone Mobile Broadband</title>
		<link>http://www.bluebottle.net.au/blog/2008/get-a-static-ip-and-improve-speed-of-vodafone-mobile-broadband</link>
		<comments>http://www.bluebottle.net.au/blog/2008/get-a-static-ip-and-improve-speed-of-vodafone-mobile-broadband#comments</comments>
		<pubDate>Sun, 05 Oct 2008 12:07:32 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=30</guid>
		<description><![CDATA[I recently read this blog post, which suggested getting a static IP with vodafone for their HSDPA internet service was a lot of time &#38; hassle. I figured despite that, it was still worth it, and called them:
Me: Hi, I&#8217;d like to get a static IP on my account.
Vodafone: Hmm, why do you need this?
Me: [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read <a href="http://davehall.com.au/blog/dave/2008/08/05/howto-get-static-ip-vodafones-3g-network-australia">this blog post</a>, which suggested getting a static IP with vodafone for their HSDPA internet service was a lot of time &amp; hassle. I figured despite that, it was still worth it, and called them:</p>
<blockquote><p><em>Me:</em> Hi, I&#8217;d like to get a static IP on my account.</p>
<p><em>Vodafone</em>: Hmm, why do you need this?</p>
<p><em>Me</em>: Ermm&#8230; stuff.</p>
<p><em>Vodafone</em>: I&#8217;ll just put you on hold&#8230;</p>
<p><em>[30 seconds pass]</em></p>
<p><em>Vodafone</em>: Hi, OK it&#8217;s done. Enjoy!</p></blockquote>
<p>Yes, it really is that easy :). Since that time, I&#8217;ve had a static IP, <strong>and </strong>my signal quality has improved in both places I regularly use the modem (home &amp; work). Before at home I was lucky to hit 100kbytes/sec download (usually 50kbytes/sec or so), now I am consistently above 200kbytes/sec.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/get-a-static-ip-and-improve-speed-of-vodafone-mobile-broadband/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vostro 1310 + Vista Business notes</title>
		<link>http://www.bluebottle.net.au/blog/2008/vostro-1310-vista-business-notes</link>
		<comments>http://www.bluebottle.net.au/blog/2008/vostro-1310-vista-business-notes#comments</comments>
		<pubDate>Wed, 06 Aug 2008 13:21:51 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=24</guid>
		<description><![CDATA[I&#8217;m back with a Vostro 1310. Don&#8217;t ask why. The important thing is that it&#8217;s a good laptop. It would be even better, however, if it came with an Intel wireless chip.
My old 1310 had an Intel Wifi-N chip, but this new one has some sort of super obscure Broadcom chip that Ubuntu doesn&#8217;t recognise [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back with a Vostro 1310. Don&#8217;t ask why. The important thing is that it&#8217;s a good laptop. It would be even <em>better</em>, however, if it came with an Intel wireless chip.</p>
<p>My old 1310 had an Intel Wifi-N chip, but this new one has some sort of super obscure Broadcom chip that Ubuntu doesn&#8217;t recognise out of the box. Because using ndiswrapper is almost always as much benefit as cost, I decided to skip Linux on this machine.</p>
<p>I&#8217;m running Vista (because it has better notebook features / integration) Business (because unlike Home, you get an RDP server, and it has less crap than Ultimate) 32-bit (because the laptop will never have more than 3gb of RAM).</p>
<p>Drivers are all on the Dell website, and all worked fine apart from these caveats:</p>
<ul>
<li>The synaptic touchpad drivers are useless! It doesn&#8217;t even have the option to emulate a middle click, let alone enable a scroll zone. Grab the touchpad drivers for the Latitude D820 and you get better functionality. Thanks to <a href="http://forum.notebookreview.com/archive/index.php/t-158131.html">this thread</a> for discovering the solution for me.</li>
<li>Although the wifi card is a Broadcom chip, Dell refer to it as a &#8216;Dell Wireless 1505 Draft 802.11n&#8217; card. The driver is similarly named. On Vista, the driver installed the very useful Dell Wifi Utility, which is accessible from the Network &amp; Sharing Center (bottom left). It doesn&#8217;t try to take over the normal wireless connection functions from Windows either, which is nice.</li>
<li>The fingerprint reader software does exactly what I want (fingerprint logon, stores prints for all my fingers, can be used as an app launcher once you are logged on). It also does a lot of stuff I don&#8217;t want (saved passwords in IE, encrypted file storage), but it&#8217;s possible to mostly hide it. The dell website distributes the drivers in a standalone pack without the utility, maybe one day I will look at bypassing the app for at least Windows logon.</li>
</ul>
<p>Other random notes:</p>
<ul>
<li>Scores 4.1 on the Windows Experience Index. I can attest that the system is as responsive as my desktop &#8211; at least for the moment. I&#8217;ve left Superfetch enabled and in a few weeks will compare performance with and without.</li>
<li>The Vostro&#8217;s sound output levels are low. Just low enough to be slightly annoying when I want to listen to very loud music. The inbuilt speaker is also a joke, you have to use headphones.</li>
<li>Winamp obeys the media keys up the top if you tell it to, but pressing the volume button freezes explorer.exe for me&#8230; I have to investigate this whole area more.</li>
<li>6-cell battery life = just under 3hrs of battery life with normal use (wifi, screen fully bright, music playing, surfing the net).</li>
</ul>
<p>Overall, I&#8217;m happy with the laptop. Will post more if I think of more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/vostro-1310-vista-business-notes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server 2008 Notes Part 2</title>
		<link>http://www.bluebottle.net.au/blog/2008/server-2008-notes-part-2</link>
		<comments>http://www.bluebottle.net.au/blog/2008/server-2008-notes-part-2#comments</comments>
		<pubDate>Sun, 20 Jul 2008 07:03:13 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=19</guid>
		<description><![CDATA[Continuing on from part 1, I&#8217;ve been less impressed with Server 2008.

Random crashes have continued, still haven&#8217;t managed to pin down why or how. Almost all of my hardware is on the Windows HCL, the two which aren&#8217;t are the Intel ICH8 chipset (which Windows found a driver for anyway), and my Nvidia 8800GT (which [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing on from <a href="http://bluebottle.net.au/blog/2008/notes-on-installing-windows-server-2008-on-a-desktop">part 1</a>, I&#8217;ve been less impressed with Server 2008.</p>
<ul>
<li>Random crashes have continued, still haven&#8217;t managed to pin down why or how. Almost all of my hardware is on the <a href="http://www.microsoft.com/whdc/hcl/default.mspx">Windows HCL</a>, the two which aren&#8217;t are the Intel ICH8 chipset (which Windows found a driver for anyway), and my Nvidia 8800GT (which I&#8217;ve installed the Vista64 driver). It seems to crash less after being up for a while. Since the crashing is hard resets, it&#8217;s almost certainly driver / hardware related, but I&#8217;m pretty stumped.</li>
<li>Hyper-V is pretty sucky. Performance is below even VMWare for any OS but Server 2008, and it seemed to make my system less stable too. Server 2008 Performance is very good though. There are promised improvements coming for Vista Business, but they aren&#8217;t here yet.</li>
<li>Using 6gb of RAM instead of 3gb has made no difference to the feel of the system. Or maybe it has, and Server 2008 is just significantly slower than XP32.</li>
<li>The server manager tool is nifty, especially the performance viewer:</li>
</ul>
<p style="text-align: center;"><img class="size-medium wp-image-94 aligncenter" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/07/server_manager1-500x305.png" alt="" width="500" height="305" /></p>
<p>I&#8217;m undecided as to whether to keep Server 2008, move to Vista Business x64, or back to XP32. They all seem roughly equally acceptable right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/server-2008-notes-part-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on installing Windows Server 2008 on a Desktop</title>
		<link>http://www.bluebottle.net.au/blog/2008/notes-on-installing-windows-server-2008-on-a-desktop</link>
		<comments>http://www.bluebottle.net.au/blog/2008/notes-on-installing-windows-server-2008-on-a-desktop#comments</comments>
		<pubDate>Tue, 15 Jul 2008 14:29:21 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=18</guid>
		<description><![CDATA[After much pain installing Windows Server 2008 (x64, Enterprise, off the trial ISO from microsoft.com), I thought I&#8217;d note a few things here for future reference and the benefit of others:

On my motherboard (Asus P5B-E (Intel ICH8 chipset)), Windows took a number of attempts to reinstall. Very aggravating! I finally installed it by plugging my [...]]]></description>
			<content:encoded><![CDATA[<p>After much pain installing Windows Server 2008 (x64, Enterprise, off the trial ISO from microsoft.com), I thought I&#8217;d note a few things here for future reference and the benefit of others:</p>
<ul>
<li>On my motherboard (Asus P5B-E (Intel ICH8 chipset)), Windows took a number of attempts to reinstall. Very aggravating! I finally installed it by plugging my boot into an ICH8 socket (as opposed to one controlled by the non ICH8 chip) and setting the ICH8 SATA drive mode to &#8216;RAID&#8217; in the motherboard. IDE didn&#8217;t work and AHCI didn&#8217;t either.</li>
<li>DEP is the devil. I had random crashes until I changed it from opt-out to opt-in. The setting is in the same place as on WinXP.</li>
<li><a href="http://www.win2008workstation.com/wordpress/">This site</a> has lots of useful info on setting up Server 2008 to be a little more usable.</li>
<li>NVidia Vista64 drivers work fine.</li>
<li>Opt in to the customer experience program. It has so far direct linked me to the latest ICH8 drivers, I&#8217;m hopeful it will prove more useful than the WinXP version.</li>
<li>My machine still hardlocks instead of shutting down, but it happens after windows has done all its housekeeping and only seems to hurt my pride.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/notes-on-installing-windows-server-2008-on-a-desktop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate from SourceForge SVN Repository</title>
		<link>http://www.bluebottle.net.au/blog/2008/migrate-from-sourceforge-svn-repository</link>
		<comments>http://www.bluebottle.net.au/blog/2008/migrate-from-sourceforge-svn-repository#comments</comments>
		<pubDate>Fri, 04 Jul 2008 15:57:39 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=16</guid>
		<description><![CDATA[Today I had to migrate a project from its SourceForge SVN repository to a new standalone machine. Here&#8217;s how I did it:
First, dump the SourceForge repository to your local machine:
mkdir PROJECTNAME
cd PROJECTNAME
#Add &#8211;progress and -v for more detail during transfer
rsync -az PROJECTNAME.svn.sourceforge.net::svn/PROJECTNAME/ .
Create the new repository:
svnadmin create /path/to/new/repo
Now you need to convert the SF.net data [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to migrate a project from its SourceForge SVN repository to a new standalone machine. Here&#8217;s how I did it:</p>
<p>First, dump the SourceForge repository to your local machine:</p>
<p style="padding-left: 30px;">mkdir PROJECTNAME<br />
cd PROJECTNAME<br />
#Add &#8211;progress and -v for more detail during transfer<br />
rsync -az PROJECTNAME.svn.sourceforge.net::svn/PROJECTNAME/ .</p>
<p>Create the new repository:</p>
<blockquote><p>svnadmin create /path/to/new/repo</p></blockquote>
<p>Now you need to convert the SF.net data into a SVN dump file:</p>
<p style="padding-left: 30px;">svnadmin dump . &gt; ~/PROJECTNAME.dump</p>
<p>Then load the dump file into the new repo:</p>
<p style="padding-left: 30px;">svnadmin load /path/to/new/repo &lt; ~/PROJECTNAME.dump</p>
<p>You can combine those last two steps into one too:</p>
<p style="padding-left: 30px;">svnadmin dump . | svnadmin load /path/to/new/repo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/migrate-from-sourceforge-svn-repository/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Desktop, July 2008</title>
		<link>http://www.bluebottle.net.au/blog/2008/desktop-july-2008</link>
		<comments>http://www.bluebottle.net.au/blog/2008/desktop-july-2008#comments</comments>
		<pubDate>Thu, 03 Jul 2008 12:05:53 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=15</guid>
		<description><![CDATA[Two people this week asked me what my desktop looks like:

]]></description>
			<content:encoded><![CDATA[<p>Two people this week asked me what my desktop looks like:</p>
<p style="text-align: center;"><a href="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/07/desktop-200807041.png"><img class="size-medium wp-image-250 aligncenter" src="http://img.bluebottle.net.au/blog/wp-content/uploads/2008/07/desktop-200807041-500x166.png" alt="desktop-200807041" width="500" height="166" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/desktop-july-2008/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove first &#8216;Recieved&#8217; header with Postfix</title>
		<link>http://www.bluebottle.net.au/blog/2008/remove-first-recieved-header-with-postfix</link>
		<comments>http://www.bluebottle.net.au/blog/2008/remove-first-recieved-header-with-postfix#comments</comments>
		<pubDate>Wed, 25 Jun 2008 14:57:18 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=13</guid>
		<description><![CDATA[I used to have problems with sending mail via my own Postfix install. The first hop for all my emails would originate from a dynamic IP:
Received: from [192.168.0.200] (203-59-192-211.dyn.iinet.net.au [203.59.192.211])
	by mx.bluebottle.net.au (Postfix) with ESMTPSA id E3345C34170
	for &#60;user@domain.com&#62;; Wed, 25 Jun 2008 22:45:41 +0800 (WST)
This caused problems with a few misconfigured SpamAssassin installs, which did RBL [...]]]></description>
			<content:encoded><![CDATA[<p>I used to have problems with sending mail via my own Postfix install. The first hop for all my emails would originate from a dynamic IP:</p>
<pre>Received: from [192.168.0.200] (203-59-192-211.dyn.iinet.net.au [203.59.192.211])</pre>
<pre>	by mx.bluebottle.net.au (Postfix) with ESMTPSA id E3345C34170</pre>
<pre>	for &lt;user@domain.com&gt;; Wed, 25 Jun 2008 22:45:41 +0800 (WST)</pre>
<p>This caused problems with a few misconfigured SpamAssassin installs, which did RBL checks against every IP in the Received chain(!) and marked the message as being in the PBL or whatever. To work around this, I did the following:</p>
<p style="padding-left: 30px;"><strong>/etc/postfix/main.cf:</strong></p>
<p style="padding-left: 30px;">header_checks = regexp:/etc/postfix/header_checks</p>
<p style="padding-left: 30px;"><strong>/etc/postfix/header_checks:</strong></p>
<p style="padding-left: 30px;">/^Received:.*by\ mx.bluebottle.net.au\ \(Postfix\)\ with\ ESMTPSA/              IGNORE</p>
<p>This won&#8217;t fire on incoming mail, because the &#8216;A&#8217; in ESMTPSA stands for &#8216;Authenticated&#8217;, that is, the client used SMTP-AUTH to login before sending the mail.</p>
<p>This action totally drops the header, which has a <strong>number of consequences you should be aware of</strong>:</p>
<ul>
<li>bounce processing can be disrupted</li>
<li>you lose any in-message records of the source of mail</li>
</ul>
<p>If you don&#8217;t mind the above problems, this is a nice method. If you want a more robust solution you can change the IGNORE action to a REPLACE, and write up a dummy &#8216;Received&#8217; header entry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/remove-first-recieved-header-with-postfix/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DKIMproxy with Postfix</title>
		<link>http://www.bluebottle.net.au/blog/2008/dkimproxy-with-postfix</link>
		<comments>http://www.bluebottle.net.au/blog/2008/dkimproxy-with-postfix#comments</comments>
		<pubDate>Wed, 25 Jun 2008 14:42:04 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=12</guid>
		<description><![CDATA[I used DKIMproxy 1.0.0 and Postfix 2.5, but the setup should be reasonably forwards-compatible. When setting this up, I followed the guides at the DKIMproxy homepage, and made a few other changes:

Instead of running dkimproxy.out with lots of commandline arguments I&#8217;d have to re-setup after a reboot, I used a configuration file. The only catch [...]]]></description>
			<content:encoded><![CDATA[<p>I used DKIMproxy 1.0.0 and Postfix 2.5, but the setup should be reasonably forwards-compatible. When setting this up, I followed the guides at the <a href="http://dkimproxy.sourceforge.net/">DKIMproxy homepage</a>, and made a few other changes:</p>
<p><span id="more-12"></span></p>
<p>Instead of running dkimproxy.out with lots of commandline arguments I&#8217;d have to re-setup after a reboot, I used a configuration file. The only catch is that I couldn&#8217;t figure out how to add &#8211;daemonize in there, so the command is:</p>
<p>sudo dkimproxy.out &#8211;conf_file=/usr/local/dkimproxy/etc/dkimproxy_out.conf &#8211;daemonize</p>
<p>Important details:</p>
<p style="padding-left: 30px;"><strong>$ cat dkimproxy_out.conf</strong></p>
<p style="padding-left: 30px;"># specify what address/port DKIMproxy should listen on</p>
<p style="padding-left: 30px;">listen    127.0.0.1:10027</p>
<p style="padding-left: 30px;"># specify what address/port DKIMproxy forwards mail to</p>
<p style="padding-left: 30px;">relay     127.0.0.1:10028</p>
<p style="padding-left: 30px;"># specify what domains DKIMproxy can sign for (comma-separated, no spaces)</p>
<p style="padding-left: 30px;">domain    bluebottle.net.au</p>
<p style="padding-left: 30px;"># specify what signatures to add</p>
<p style="padding-left: 30px;">signature dkim(c=relaxed)</p>
<p style="padding-left: 30px;">signature domainkeys(c=nofws)</p>
<p style="padding-left: 30px;"># specify location of the private key</p>
<p style="padding-left: 30px;">keyfile   /usr/local/dkimproxy/keys/private.key</p>
<p style="padding-left: 30px;"># specify the selector (i.e. the name of the key record put in DNS)</p>
<p style="padding-left: 30px;">selector  selector1</p>
<p style="padding-left: 30px;"># user &amp; group permissions</p>
<p style="padding-left: 30px;">user    dkim</p>
<p style="padding-left: 30px;">group   dkim</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;"><strong>$ grep dkim /etc/passwd</strong></p>
<p style="padding-left: 30px;">dkim:x:1012:1012:DKIM,,,:/home/dkim:/bin/bash</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;"><strong>$ grep dkim /etc/group</strong></p>
<p style="padding-left: 30px;">dkim:x:1012:</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;"><strong>$ grep &#8220;relevant bits&#8221; /etc/postfix/master.cf</strong></p>
<p style="padding-left: 30px;">smtp      inet  n       -       -       -       -       smtpd</p>
<p style="padding-left: 30px;">submission inet n       -       -       -       -       smtpd</p>
<p style="padding-left: 30px;">-o smtpd_tls_security_level=encrypt</p>
<p style="padding-left: 30px;">-o smtpd_etrn_restrictions=reject</p>
<p style="padding-left: 30px;">-o content_filter=dksign:[127.0.0.1]:10027</p>
<p style="padding-left: 30px;">-o receive_override_options=no_address_mappings</p>
<p style="padding-left: 30px;">-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject</p>
<p style="padding-left: 30px;">smtps     inet  n       -       -       -       -       smtpd</p>
<p style="padding-left: 30px;">-o smtpd_etrn_restrictions=reject</p>
<p style="padding-left: 30px;">-o content_filter=dksign:[127.0.0.1]:10027</p>
<p style="padding-left: 30px;">-o receive_override_options=no_address_mappings</p>
<p style="padding-left: 30px;">-o smtpd_tls_wrappermode=yes</p>
<p style="padding-left: 30px;">-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject</p>
<p style="padding-left: 30px;">127.0.0.1:10028 inet  n  -      n       -       10      smtpd</p>
<p style="padding-left: 30px;">-o content_filter=</p>
<p style="padding-left: 30px;">-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks</p>
<p style="padding-left: 30px;">-o smtpd_helo_restrictions=</p>
<p style="padding-left: 30px;">-o smtpd_client_restrictions=</p>
<p style="padding-left: 30px;">-o smtpd_sender_restrictions=</p>
<p style="padding-left: 30px;">-o smtpd_recipient_restrictions=permit_mynetworks,reject</p>
<p style="padding-left: 30px;">-o mynetworks=127.0.0.0/8</p>
<p style="padding-left: 30px;">-o smtpd_authorized_xforward_hosts=127.0.0.0/8</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/dkimproxy-with-postfix/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vodafone Mobile Broadband on Ubuntu &#8211; part 2</title>
		<link>http://www.bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-part2</link>
		<comments>http://www.bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-part2#comments</comments>
		<pubDate>Wed, 25 Jun 2008 14:18:40 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=11</guid>
		<description><![CDATA[I installed Ubuntu 8.04 x64 onto my new laptop, and discovered a far nicer way to hop on the net with my Huawei E220: Vodafone Mobile Connect Card driver. Unlike last time I tried it, the latest build (2.0.beta3) worked more or less out of the box.
The app does a lot more than just wvdial, [...]]]></description>
			<content:encoded><![CDATA[<p>I installed Ubuntu 8.04 x64 onto my new laptop, and discovered a far nicer way to hop on the net with my Huawei E220: <a href="https://forge.betavine.net/projects/vodafonemobilec/">Vodafone Mobile Connect Card driver</a>. Unlike last time I tried it, the latest build (2.0.beta3) worked more or less out of the box.</p>
<p>The app does a lot more than just wvdial, you can In Theory send/receive SMSes, as well as follow your quota usage. I say &#8216;In Theory&#8217;, because the former doesn&#8217;t seem to work for me, and the latter is just painfully slow to draw and update when dragged around the screen. Other problems:</p>
<ul>
<li>Moving the USB Device between ports while the laptop is on (yay USB hotswap!) fails 100% of the time for me,</li>
<li>Using the device when it wasn&#8217;t plugged in at boot time is sketchy,</li>
<li>Tends to think you&#8217;re plugging in a new device every time you use it.</li>
<li>Randomly borks far more than wvdial ever did (which was never), not too much if you don&#8217;t poke it while it&#8217;s working though.</li>
</ul>
<p>None of those problems really matter for me, and since it can minimise to the tray I&#8217;ve happily migrated across. Far more newbie friendly too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-part2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Wordpress &amp; lighttpd nice blog permalinks</title>
		<link>http://www.bluebottle.net.au/blog/2008/howto-wordpress-lighttpd-nice-blog-permalinks</link>
		<comments>http://www.bluebottle.net.au/blog/2008/howto-wordpress-lighttpd-nice-blog-permalinks#comments</comments>
		<pubDate>Wed, 25 Jun 2008 12:26:59 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[General Tech]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=10</guid>
		<description><![CDATA[Or maybe, that should be HOWNOTTO:
Into lighttpd.conf:
$HTTP["host"] == &#8220;bluebottle.net.au&#8221; {
[...]
url.rewrite-once = ( &#8220;^/blog/(200./.*)&#8221; =&#62; &#8220;/blog/index.php?$1&#8243; )
}
Into Wordpress admin -&#62; settings -&#62; permalinks -&#62; custom structure:
/%year%/%postname%
If you don&#8217;t speak regex, here&#8217;s what you should know:

Guaranteed to break 1st January 2010 or your money back.
Don&#8217;t make any files / folders under &#8216;blog&#8217; called &#8216;200x&#8217;, where x is [...]]]></description>
			<content:encoded><![CDATA[<p>Or maybe, that should be HOWNOTTO:</p>
<p>Into <strong>lighttpd.conf</strong>:</p>
<p style="padding-left: 30px;">$HTTP["host"] == &#8220;bluebottle.net.au&#8221; {<br />
[...]<br />
url.rewrite-once = ( &#8220;^/blog/(200./.*)&#8221; =&gt; &#8220;/blog/index.php?$1&#8243; )<br />
}</p>
<p>Into <strong>Wordpress admin</strong> -&gt; settings -&gt; permalinks -&gt; custom structure:</p>
<p style="padding-left: 30px;">/%year%/%postname%</p>
<p>If you don&#8217;t speak regex, here&#8217;s what you should know:</p>
<ul>
<li>Guaranteed to break 1st January 2010 or your money back.</li>
<li>Don&#8217;t make any files / folders under &#8216;blog&#8217; called &#8216;200x&#8217;, where x is any single character. (You shouldn&#8217;t make any folders under there anyway, because that makes upgrading painful.)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/howto-wordpress-lighttpd-nice-blog-permalinks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vostro 1500 Review &#8211; Even Better!</title>
		<link>http://www.bluebottle.net.au/blog/2008/vostro-1500-review-even-better</link>
		<comments>http://www.bluebottle.net.au/blog/2008/vostro-1500-review-even-better#comments</comments>
		<pubDate>Mon, 23 Jun 2008 15:37:30 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=9</guid>
		<description><![CDATA[I replaced my former Dell Vostro 1310 with a 1500. In the end, the smaller keyboard was too cramped. There weren&#8217;t really any other problems with it, although I&#8217;ll pretend it needed a more powerful video card.
My new Vostro 1500 cost about the same, and has similar specs. Main differences:

T8100 CPU. Slower, just.
Geforce 8600M 256mb [...]]]></description>
			<content:encoded><![CDATA[<p>I replaced my former Dell Vostro 1310 with a 1500. In the end, the smaller keyboard was too cramped. There weren&#8217;t really any other problems with it, although I&#8217;ll pretend it needed a more powerful video card.</p>
<p>My new Vostro 1500 cost about the same, and has similar specs. Main differences:</p>
<ul>
<li><strong>T8100 CPU. </strong>Slower, just.</li>
<li><strong>Geforce 8600M 256mb GPU.</strong> Significantly better, but still won&#8217;t play Crysis.</li>
<li><strong>15.1&#8243; 1680&#215;1050 screen.</strong> A little brighter, but the far better resolution has only been awesome so far.</li>
<li><strong>9-cell battery.</strong> This lasts for a lot longer, despite the bigger screen. About 3.5hrs while doing stuff. Even more if I play with the power settings.</li>
</ul>
<p>The keyboard is a lot better. Same size as my old Inspiron 1501. The only bad part is the the Home/End/PgUp/Down keys are full size keys added as an extra column on the far right, instead of half sized buttons along the top. Unusual placement, and the bottom two are hard to push anyway. Related: the arrow keys are full sized, but there&#8217;s no spare space around them, which is also confusing.</p>
<p>Has Bluetooth, no fingerprint reader. Everything worked out of the box with Ubuntu 8.04.</p>
<p>Because I got a 9-cell battery you get a beefier power brick, which probably helps charging. BTW, the charger plug for all three of my Dell laptops is the same, they bricks are 100% interchangeable.</p>
<p>Socket layout on the laptop is saner than the 1310, but still not as nice as the 1501. Power cable is near the middle of the back, the ethernet is on the right side towards the back. Headphones are on the right, CDROM is on the right front. Only the ethernet port is annoying.</p>
<p>Either the CD Drive randomly ejects, or I am accidentally pushing the button a lot. The latter is probably what I&#8217;m doing, although the eject button on the drive is small. Will probably get used to this.</p>
<p><strong>Overall: </strong>Smaller laptops have their place, but that place is not on my desk! My new near-desktop replacement was a wise choice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/vostro-1500-review-even-better/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vostro 1310 Review &#8211; It Doesn&#8217;t Suck</title>
		<link>http://www.bluebottle.net.au/blog/2008/vostro-1310-review-it-doesnt-suck</link>
		<comments>http://www.bluebottle.net.au/blog/2008/vostro-1310-review-it-doesnt-suck#comments</comments>
		<pubDate>Sun, 08 Jun 2008 03:02:45 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=8</guid>
		<description><![CDATA[I recently brought myself a new Dell Vostro 1310 laptop. This is the from the &#8216;new&#8217; series of Vostro laptops. Specs of mine:

 Intel Core2 T8300 2.4Ghz. The new &#8216;Penryn&#8217; series of core2 chips. Single interesting new feature is SSE4.
 3gb RAM.
 250gb Hard Drive. My other option was a 160gb with &#8216;free fall sensor&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently brought myself a new Dell Vostro 1310 laptop. This is the from the &#8216;new&#8217; series of Vostro laptops. Specs of mine:</p>
<ul>
<li> <strong>Intel Core2 T8300 2.4Ghz.</strong> The new &#8216;Penryn&#8217; series of core2 chips. Single interesting new feature is SSE4.</li>
<li> <strong>3gb RAM.</strong></li>
<li> <strong>250gb Hard Drive.</strong> My other option was a 160gb with &#8216;free fall sensor&#8217;, which reduces the chance the drive will die if you drop it. Nothing important / not backed up is going on this laptop, so I&#8217;m happier with more space.</li>
<li> <strong>TrueLife screen.</strong> Sucks outside, which is where I use this on the weekend. It&#8217;s usable outside, but only if you can angle the screen so it&#8217;s reflecting something dark. Significantly better than non-truelife when used inside.</li>
<li> <strong>6-cell battery.</strong> The standard size is 4-cell. Ubuntu estimates the lifetime of my 6-cell at 2hrs, while idle.</li>
<li> <strong>8400GS Video Card.</strong> It plays Tux Racer, I’m happy. When I get around to it, it will also play Civilization IV for me and other games from that era or before.</li>
<li> <strong>15-day money back guarantee</strong>. What really convinced me to buy this laptop. If I find it’s too small for me, I can swap it after a week and get a 14 or 15” instead. w00t.</li>
<li> <strong>All the other standard stuff that comes with every laptop.</strong></li>
</ul>
<p>The chassis is solid, not flimsy like some smaller laptops. It strongly reminds me of an IBM ThinkPad, which is not a bad thing at all &#8212; hopefully some of the indestructibility has been carried over.</p>
<p>Various interesting things I noticed:</p>
<ul>
<li> Front top corners are hard edges. This means you can’t rest the side of your palms on the edge of the laptop. You won’t notice this while typing (I don’t, and I have big hands), but it’s just a weird design choice.</li>
<li> Slot load optical drive rather than a tray.</li>
<li> Really nice fan on the side. This fan is smaller than the one in my old 15” Inspiron I’m replacing, but it pushes out a lot more air. While the fan is running the machine is not exactly quiet, but it’s not an annoying sound. There’s another fan on the bottom for the video card, it didn’t spin up unless I was doing something 3d.</li>
<li> Capacitance touch media buttons up the top, including one to eject the CD. Capacitance touch is cool and all, but they are (obviously) hypersensitive. While stretching out my fingers I mushed them more than a few times, doing weird things to my media playback and/or CD.</li>
<li> Power plug is on the right hand side, Ethernet port on the rear left, headphones on the left side front. Are they trying to make me have to keep every side clear?! I much prefer the layout of my (admittedly bigger) Inspiron, which seemed saner in general.</li>
<li> My  Vostro came with Windows XP Home. On the Dell website, you can’t go lower than XP Professional, but when I called up they were more than happy to downgrade to Home.</li>
</ul>
<p>I’ve installed Ubuntu 8.04 x64 and tested everything I can. Everything I tested works perfectly, unless noted below:</p>
<ul>
<li> <strong>Fingerprint Reader</strong> not tested</li>
<li> <strong>Memory card reader</strong> didn’t read an ancient MMC card I have lying around. Works fine with SD.</li>
<li> <strong>Microphone port</strong> not tested</li>
<li> <strong>VGA out</strong> not tested</li>
</ul>
<p>Raw hardware data from the machine after the jump.</p>
<p><span id="more-8"></span></p>
<pre>$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     T8300  @ 2.40GHz
stepping	: 6
cpu MHz		: 800.000
cache size	: 3072 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm ida
bogomips	: 4792.40
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
$ lspci
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation GeForce 8400M GS (rev a1)
06:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev ff)
08:05.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
08:05.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)
08:05.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)
$ lsusb
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 004: ID 0c45:63e0 Microdia
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 413c:8140 Dell Computer Corp.
Bus 001 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 001 Device 001: ID 0000:0000</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/vostro-1310-review-it-doesnt-suck/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vodafone Mobile Broadband on Ubuntu with wvdial</title>
		<link>http://www.bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-with-wvdial</link>
		<comments>http://www.bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-with-wvdial#comments</comments>
		<pubDate>Wed, 14 May 2008 14:31:57 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=6</guid>
		<description><![CDATA[UPDATE! See my newer post on this for a better solution.
I have a vodafone mobile broadband. My modem is a external USB dongle: Huawei E220. It was detected automagically by Ubuntu 8.04 (x86) when I plugged it in. I use wvdial to connect, with this configuration:
aj@aj-laptop:~$ cat /etc/wvdial.conf
[Dialer Defaults]
New PPPD = yes
[Dialer vf]
Phone = *99***1#
Username [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>UPDATE!</strong> See <a href="http://bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-part2">my newer post on this</a> for a better solution.</span></p>
<p>I have a vodafone mobile broadband. My modem is a external USB dongle: Huawei E220. It was detected automagically by Ubuntu 8.04 (x86) when I plugged it in. I use wvdial to connect, with this configuration:</p>
<p><code>aj@aj-laptop:~$ cat /etc/wvdial.conf<br />
[Dialer Defaults]<br />
New PPPD = yes<br />
[Dialer vf]<br />
Phone = *99***1#<br />
Username = vodafone<br />
Password = vodafone<br />
Stupid Mode = 1<br />
Dial Command = ATDT<br />
Modem = /dev/ttyUSB0<br />
Baud = 460800<br />
Init2 = ATZ<br />
Init3 = ATE0V1&amp;D2&amp;C1S0=0+IFC=2,2<br />
ISDN = 0<br />
Modem Type = Analog Modem<br />
Init5 =AT+CGDCONT=1,"IP","vfinternet.au";</code></p>
<p>To connect to the net:</p>
<li>Install wvdial</li>
<li>Plug in the modem</li>
<li>Open a terminal window</li>
<li><em>wvdial vf</em></li>
<li>Leave the terminal window open and press ctrl-c to disconnect.</li>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/vodafone-mobile-broadband-on-ubuntu-with-wvdial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix, Dovecot, Mailscanner on CentOS: notes</title>
		<link>http://www.bluebottle.net.au/blog/2008/postfix-dovecot-mailscanner-notes</link>
		<comments>http://www.bluebottle.net.au/blog/2008/postfix-dovecot-mailscanner-notes#comments</comments>
		<pubDate>Sat, 03 May 2008 17:44:47 +0000</pubDate>
		<dc:creator>Alex Jurkiewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://bluebottle.net.au/blog/?p=5</guid>
		<description><![CDATA[Notes on setting up the following:

Postfix 2.3
Dovecot 1.0
MailScanner 4.68.8

On CentOS 5.
Postfix is setup with all domains as virtual domains, delivering to Maildirs in an arbitrary location. Virtual alias maps is implemented as hash db.
Dovecot makes the maildirs availble via IMAP. Authentications details are stored in a flat file.
MailScanner is configured to scan all incoming mail [...]]]></description>
			<content:encoded><![CDATA[<p>Notes on setting up the following:</p>
<ul>
<li>Postfix 2.3</li>
<li>Dovecot 1.0</li>
<li>MailScanner 4.68.8</li>
</ul>
<p>On CentOS 5.</p>
<p>Postfix is setup with all domains as virtual domains, delivering to Maildirs in an arbitrary location. Virtual alias maps is implemented as hash db.</p>
<p>Dovecot makes the maildirs availble via IMAP. Authentications details are stored in a flat file.</p>
<p>MailScanner is configured to scan all incoming mail with SpamAssassin and ClamAV. It delivers all mail with modified headers only (no untraceable bouncing or subject mangling).</p>
<p>SMTP-AUTH is enabled with Postfix deferring to Dovecot.</p>
<p>Basic SMTP sender checks are done in postfix (including RBLs).</p>
<p>TLS is enabled for all systems.</p>
<p><strong>Postfix</strong></p>
<p>main.cf settings to remember:</p>
<ul>
<li>header_checks = regexp:/etc/postfix/header_checks -<em>- to stick everything incoming into the Hold queue for MailScanner. Remove if not using MailScanner.</em></li>
</ul>
<ul>
<li> inet_interfaces = localhost, mx.bluebottle.net.au</li>
</ul>
<ul>
<li>smtpd_client_restrictions = permit_sasl_authenticated, reject_rbl_client zen.spamhaus.org <em>&#8211; RBLs as desired</em></li>
</ul>
<ul>
<li> smtpd_helo_restrictions = permit_mynetworks, reject_unknown_helo_hostname &#8212; <em>don&#8217;t use reject_unknown_helo_hostname, breaks too many real servers</em></li>
</ul>
<ul>
<li> smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination</li>
</ul>
<ul>
<li>smtpd_sasl_auth_enable = yes</li>
</ul>
<ul>
<li>smtpd_sasl_path = private/auth <em>&#8211; the same path as in dovecot conf</em></li>
</ul>
<ul>
<li>smtpd_sasl_type = dovecot</li>
</ul>
<ul>
<li>smtpd_tls_cert_file = /etc/pki/postfix/certs/postfix.pem</li>
</ul>
<ul>
<li>smtpd_tls_key_file = /etc/pki/postfix/private/postfix.pem</li>
</ul>
<ul>
<li>smtpd_tls_security_level = may</li>
</ul>
<blockquote><p>openssl req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE -days 365<br />
chown root:root $CERTFILE $KEYFILE<br />
chmod 0600 $CERTFILE $KEYFILE</p>
<p>OPENSSLCONFIG:<br />
[ req ]<br />
default_bits = 1024<br />
encrypt_key = yes<br />
distinguished_name = req_dn<br />
x509_extensions = cert_type<br />
prompt = no<br />
[ req_dn ]<br />
C=AU<br />
ST=Western Australia<br />
L=Perth<br />
O=bluebottle.net.au<br />
OU=SMTP server<br />
CN=mx.bluebottle.net.au<br />
emailAddress=postmaster@bluebottle.net.au<br />
[ cert_type ]<br />
nsCertType = server</p>
<p>CERTFILE:<br />
/etc/pki/postfix/certs/postfix.pem</p>
<p>KEYFILE:<br />
/etc/pki/postfix/private/postfix.pem</p></blockquote>
<ul>
<li>virtual_mailbox_domains = bluebottle.net.au</li>
<li>virtual_alias_maps = hash:/etc/postfix/virtmap</li>
<li>virtual_mailbox_maps = hash:/etc/postfix/virtdeliver</li>
<li>virtual_mailbox_base = /home/vmail</li>
<li>virtual_uid_maps = static:5000 <em>&#8211; whatever the vmail UID is</em></li>
<li>virtual_gid_maps = static:5000</li>
</ul>
<p><em>/etc/postfix/virtmap:</em><br />
# Contains all the addresses this server accepts<br />
# And their mappings to final address<br />
# Don&#8217;t forget postmap /etc/postfix/virtmap<br />
alex@bluebottle.net.au        alex@bluebottle.net.au<br />
root@bluebottle.net.au        root@bluebottle.net.au<br />
abuse@bluebottle.net.au        root@bluebottle.net.au</p>
<p><em>/etc/postfix/virtdeliver:</em><br />
# Contains mappings from accepted addresses to<br />
# local mailbox location<br />
alex@bluebottle.net.au                  bluebottle.net.au/alex/<br />
root@bluebottle.net.au                  rootemails/</p>
<p><strong>Dovecot</strong></p>
<p>Generate SSL certificate. vi `locate dovecot-openssl.cnf` to edit details. Then exec `locate dovecot-1.0/examples/mkcert.sh`.</p>
<ul>
<li>mail_location: maildir:/home/vmail/%d/%n</li>
</ul>
<ul>
<li> auth default { mechanisms = plain login cram-md5 &#8212; <em>cram-md5 is aka hmac-md5 in non-current versions of Dovecot. This lets you logon with the password hash, eg &#8216;Secure Authentication&#8217; in Thunderbird and a few other clients</em></li>
<li> &#8230; passdb passwd-file { args = /home/vmail/passwd }</li>
</ul>
<ul>
<li> &#8230; userdb static { args = uid=vmail gid=vmail /home/vmail/%d/%n/ }</li>
</ul>
<ul>
<li> &#8230; socket listen { client { path = /var/spool/postfix/private/auth ; mode = 0660 ; user = postfix ; group = postfix } }</li>
</ul>
<p><em>/home/vmail/passwd:</em><br />
# Contains username and password for all user accounts<br />
# Take note how username interacts with mail_location<br />
# Generate password hash with dovecotpw<br />
alex@bluebottle.net.au:{HMAC-MD5}999999a9bc23ca3b828faf15f9efb17152f71d9d0e5bc473194a05cebe34eaf<br />
rootemails:{HMAC-MD5}999999a5e380b6b4ff3c1805c6d8661456dd2565c6d9fe63e5fe72c78cc4941</p>
<p><strong>MailScanner</strong></p>
<ul>
<li>Install via RH RPM from http://mailscanner.info/downloads.html</li>
</ul>
<ul>
<li> Setup according to http://mailscanner.info/postfix.html</li>
</ul>
<ul>
<li> Install the &#8220;ClamAV and SpamAssassin easy installation package&#8221; from downloads page above</li>
</ul>
<p>Requires much tweaking to make it not modify the message apart from adding headers:</p>
<ul>
<li> Scan Messages = %rules-dir%/scan.messages.rules <em>&#8211; you want to exclude your own domain(s) so nothing coming from your domain is listed as spam (especially for users sending via SMTP-AUTH from a dynamic IP range, which will set off various RBLs)</em></li>
</ul>
<ul>
<li> Dangerous Content Scanning = no</li>
</ul>
<ul>
<li>Mail Header = X-%org-name%-MailScanner-VirusCheck: <em>&#8211; the default never made much sense to me</em></li>
</ul>
<ul>
<li> #Information Header = X-%org-name%-MailScanner-Information: <em>&#8211; useless</em></li>
</ul>
<ul>
<li> Clean Header Value = Clean ; Infected Header Value = Infected ; Disinfected Header Value = Disinfected</li>
</ul>
<ul>
<li>Always Include SpamAssassin Report = no</li>
</ul>
<ul>
<li> Multiple Headers = add</li>
</ul>
<ul>
<li> Sign Clean Messages = no</li>
</ul>
<ul>
<li> Mark Infected Messages = no</li>
</ul>
<ul>
<li> Mark Unscanned Messages = no</li>
</ul>
<ul>
<li> Notify Senders = no <em>&#8211; <strong>really</strong> not a good idea<br />
</em></li>
</ul>
<ul>
<li> Scanned Modify Subject = no ; Virus Modify Subject = no &#8212; etc etc</li>
</ul>
<ul>
<li> Add Watermark = yes ; Watermark Secret = %org-name%-Secret-111111 <em>&#8211; set this section as appropriate</em></li>
</ul>
<ul>
<li> Max SpamAssassin Size = 200k trackback</li>
</ul>
<ul>
<li> Spam Actions = deliver header &#8220;X-Spam-Status: Yes&#8221;</li>
</ul>
<ul>
<li>High Scoring Spam Actions = deliver header &#8220;X-Spam-Status: Yes&#8221;</li>
</ul>
<ul>
<li> Non Spam Actions = deliver header &#8220;X-Spam-Status: No&#8221;</li>
</ul>
<ul>
<li> MCP Checks = no</li>
</ul>
<p><em>/etc/MailScanner/rules/scan.messages.rules:</em><br />
# We want to scan everything by default, but ignore mail that is sent from our SMTP-AUTH users.<br />
#They&#8217;ll probably be in a dynamic IP range which is in various RBLs like the PBL.<br />
From:           bluebottle.net.au       no<br />
FromOrTo:       default                 yes<strong></strong></p>
<p><strong>Other Notes:</strong></p>
<ul>
<li> postfix reload (may require a stop; start for some settings)</li>
</ul>
<ul>
<li> service dovecot restart</li>
</ul>
<ul>
<li> service MailScanner restart (also restarts postfix)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bluebottle.net.au/blog/2008/postfix-dovecot-mailscanner-notes/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
