There's a spectrum of 'pets versus cattle' in servers

One of the memes in modern operations is that of pets versuscattle . I've written about this before,but at the time I accepted the usual more or less binary pet versuscattle split that's usually put forward. I've now shifted to feelingthat there is a spectrum along the line between pets and cattle,so today I'm going to write down four spots I see on that line.

Total pets (classical pets) are artisanal servers, each one createdand maintained completely by hand


Why I don't use HTTP Key Pinning and I'm not likely to any time soon

One of the additional security measures you can take for a HTTPSweb site is HTTP Public Key Pinning . HPKP isdesigned to guard against the fundamental SSL CA problem by limiting what validly signed keys can be usedfor your website. This way it doesn't matter if an attacker getsone of the zillion different CAs out there to issue a certificatefor your website; hopefully a lot of browsers won't accept it anywaysbecause you've told them better. A number of people like the ideaof HPKP and


SPF is not a security feature, as it solves the wrong problem

SPF is one of my hot button issues, or rather how all too often influential people seem to think that SPF is a good idea .A lot of the time these people seem to think that a hard-fail SPFpolicy is a security feature, something that will prevent forgeryof email as being from their company or organization. These peopleare wrong, at least in any practical sense.

The problem with SPF as a security feature is that it protects thewrong thing. To the extent that it does anything,


Why your Ubuntu server stalls a while on boot if networking has problems

Yesterday I wrote on how to shoot yourself in the foot by makinga mistake in /etc/network/interfaces .I kept digging into this today, and so now I can tell you why thishappens and what you can do about it. The simple answer is that itcomes from /etc/init/failsafe.conf .

What failsafe.conf is trying to do is kind of hard to explainwithout a background in Upstart (Ubuntu's 'traditional' init system).A real System V init


How to shoot yourself in the foot with /etc/network/interfaces on Ubuntu

Today I had one of those self inflicted learning experiences thatI get myself into from time to time. I will start with the summaryand then tell you the story of how I did this to myself.

The summary is that errors in /etc/network/interfaces can causeyour system to stall silently during boot for a potentially significantamount of time .

One sort of error is a syntax error or omitting a line. Anothersort of error is accidentally duplicating an IP address between aninterface's primary address and


How options in my programs conflict, and where argparse falls short

In my recent entry on argparse I mentionedthat it didn't have really top notch handling of conflicting options;instead it only has relatively basic support for this. You mightreasonably wonder what it's missing, and thus what top notch argumentconflict handling is.

My programs tend to wind up with three sorts of options (command lineswitches):

  • general switches that affect almost everything
  • mode-selection switches that pick a major mode of operation
  • mode-modifying switches that change how one or more particular majormodes work

What is behind Unix's 'Text file is busy' error

Perhaps you have seen this somewhat odd Unix error before:

# cp prog /usr/local/bin/progcp: cannot create regular file 'prog': Text file is busy

This is not just an unusual error message, it's also a rare instanceof Unix being friendly and not letting you blow your foot off witha perfectly valid operation that just happens to be (highly) unwise.To understand it, let's first work out what exact operation isfailing. I'll do this


Some notes on Go's expvar package

I recently decided to add accessible statistics to my sinkholeSMTP server by using theexpvar package . In the process ofexperimenting with this, I've wound up with a collection of notesthat I want to write down while I remember them.

First up is my discovery about expvar.Var ,namely that it wants you to return properly quoted JSON instead ofjust a string. You can read the entry for more details.

The expvar package exposes a lot of 'New' functions togive you new


The three types of challenges that Let's Encrypt currently supports

I've recently been working to understand Let's Encrypt a bit better, and in particular tounderstand the different sorts of challenges (ie, ways of provingthat you control a hostname) that they currently support.

(In general, Alex Peattie's A guide to creating a LetsEncrypt client fromscratch has a great overview of the overall flow of the challenge process.)

Right now, there are three challenges; 'HTTP', 'DNS', and what iscalled 'TLS-SNI'.


Let's Encrypt certificates can be used for more than HTTPS

The Let's Encrypt website basicallyonly talks about using its certificates for (HTTPS) websites, and their FAQ isa little bit silent on this. So let me say it out loud:

Let's Encrypt certificates can be used for pretty much any TLSservice, not just HTTPS websites .

In particular, you can absolutely use Let's Encrypt certificatesfor IMAP servers and MTA s (for SMTP).The LE documentation won't tell you how to set this up, theofficial client doesn'