This Space for Rent

New Code!

I found a little bug in postoffice this weekend that wasn't fatal or anything, just annoying; the bug was that if postoffice accepted a piece of mail without a Date:, From:, or Message-ID: it would add a new copy of the missing headers to the additional headers section of the control file every time it ran.

Even if those headers had already been added.

Now, it's not fatal to have a long list of repeated headers, but when I look at a control file and see a long line of

Message-ID: <boy-this-is-silly314159@pell.portland.or.us>
From: orc <a baaaad programmer>
Date: now
Message-ID: 
From: orc <a baaaad programmer>
Date: 60 minutes ago
Message-ID: <boy-this-is-silly314159@pell.portland.or.us>
From: orc <a baaaad programmer>
Date: 120 minutes ago
Message-ID: <boy-this-is-silly314159@pell.portland.or.us>
From: orc <a baaaad programmer>
Date: 180 minutes ago

I don't find much charm in it.

So I fixed it (trivially) by ripping the code that validates the headers (if any) in the body of a message out and making it into a separate subroutine which I can pass the additional headers section to every time I read a control file.

It's running on Pell right now, and has not detonated in any amusing fashion, so here's New Code! in the form of postoffice 1.4.3b (the b stands for "beta") or the closest approximation that I can do while using git as my SCCS.