New TWiki, CSS, ...
A new version of TWiki appeared some time ago, so I figured that should finally update. At the same time I played with the TWiki templates a bit to get working there - the wiki should look a little more like the weblog now.
Send mail if anything is slightly screwy.
Quick links
Encrypt more
When I worked at Demon the guys who developed Turnpike were serious about integration (Turnpike is an offline Multi-user email and news client for Microsoft Windows systems). It was possible to configure the mailer such that if you knew the public key for someone, all mail to that person would be encrypted to their public key. You didn't have to select to encrypt individual messages or to encrypt to particular people, it just happened automatically whenever it was possible.
The intention was to slowly increase the use of encryption between communicating parties. You'd start with little or no keys (perhaps just your own) and would sign all outgoing mail. Over time people would notice that you had signed stuff and would grab your public key and send you their own (of course there was an interface to public key stores as well). Hopefully, over time, more and more people would adopt more of the email exchanged would be (signed and) encrypted and snoop and tamper proof.
Turnpike is a great product, built by people who really care about the user interface, mail standards compliance and customer feedback. Unfortunately, it's not going to take over the world, which means that the approach to "opportunistic encryption" with may not be sufficiently widespread (though see the FreeS/WAN effort for an approach to similar difficulties in encouraging widespread IPsec deployment).
Anyway, as a re-confirmed gnus user, I figured that it should be possible to implement something similar. The result is two small chunks of lisp. The first determines whether or not public keys for all recipients of a message are known:
(defun dme:message-determine-encryption () "Return `t' if we have gpg public keys for all recipients of this message." (catch :exit (mapcar (lambda (addr) (if (not (pgg-lookup-key (downcase (mail-strip-quoted-names addr)))) (throw :exit nil))) (message-tokenize-header (concat (message-fetch-field "to") "," (message-fetch-field "cc")))) t))
The second, which is present in my message-send-hook, uses this information to insert the mml tags required to indicate that the message should be encrypted:
... (message-goto-body) ; if already set, don't override (if (not (looking-at (regexp-quote "<#secure "))) ; if we can encrypt, do so, else just sign (if (dme:message-determine-encryption) (insert "<#secure method=pgpmime mode=signencrypt>\n") (insert "<#secure method=pgpmime mode=sign>\n"))) )) ...
Note that when encryption is not possible, the email is still signed.
The main problem with this code is that it's necessary to possess the public keys for all recipients of a message before encryption will be used. If there are three recipients yet only two have known public keys, the message will not be encrypted. It should be possible to encrypt the message when sent to the two and use cleartext (actually signed) for the third. That requires rather more fiddling with the mail submission component of gnus than I've so far managed to figure out.
It seems that the Enigmail plugin for Mozilla does something similar, though perhaps by attempting to encrypt, failing and then sending as cleartext.
Are there any other mailers which attempt opportunistic encryption?
rss2email and Python mastery (not)
As previously discussed, I've been using a slightly modified version of rss2email to spool feeds into my mailbox. Unfortunately, a couple of days ago it all started to go wrong. The same news items were delivered every time the collector ran.
Turned out that the server was killing the connection part way through the run, probably because postfixgot bored with waiting while a remote site was slow to respond.
Armed with my new mastery of Python (hah) I was able to replace the submission code from rss2email with:
try: serv.sendmail(fromadd, recipient, message) except: print 'sendmail failed:', sys.exc_info()[0] try: serv.quit() except: print 'sendmail quit failed:', sys.exc_info()[0] serv = smtplib.SMTP(smtpserver) serv.sendmail(fromadd, recipient, message)
Which means that, should the attempt to submit the message fail the connection is killed and re-created. Seems to work well.
listening to: Lloyd Cole And The Commotions: Forest Fire (Lloyd Cole And The Commotions-1984-89)
NetNewsWire Lite, referrers and images
Whilst playing a little with NetNewsWire Lite I came across a couple of oddities.
When double-clicking on an article in NetNewsWire Lite to request that the original article be displayed in a browser, the Referrer header seems to be set to http://ranchero.com/software/netnewswire when I'd expect the of the feed. There's discussionof this on the Rancherosite, but it's not clear if the points there are about this specific issue.
Image display is odd if only a width is specified in the tag.
Compare Safari:

with NetNewsWire Lite:

Safari (and Camino and Mozilla and Internet Explorer) seem to scale the image depending on the width tag. NetNewsWire Lite uses the specified width, but takes the height of the real image.
To work around this I could specify both the width and the height , but that rapidly becomes an irritation.
A different office every day?
Ben Hammersley moving to Florence set me thinking about whether or not my family could up sticks and move somewhere else. Given my job I could probably work most anyplace that has decent internet connectivity (so that I can use Cisco software to connect back to the office). Moving the whole family is a big decision to take, but I started to wonder about where I spend my time.
In the main, I tend to work in one of two places:
- in the office,
- at home.
Given that these two places are only a mile apart, commuting isn't really a great hassle.
But what if I wanted to wander about a bit more? So, as a challenge, I figured I'd try to work in a different place every day for two weeks (ten days). One week should be easy - simply visit some different company offices, work at home for a day and visit my wife's office for a day. What about the rest?
I need:
- a place to sit, preferably with a desk,
- a power outlet (just one) for my laptop,
- internet connectivity via WiFi or ethernet,
- somewhere convenient to get lunch, a coffee, go to the loo, etc.,
- people tolerant of me spending a little time on the phone,
- no more than an hours' drive from Watford.
Out of this list, internet connectivity is likely to be the most difficult. To use systems at work I use VNC, which means that 64kbps is really an absolute minimum to avoid going mad. Latency is also important, which rules out satellite connections.
I'll build a list, publish it here and, when I get around to performing the experiment, post pictures and updates. If anyone (reads this and) has any suggestions, please send them by email or add comments.
l'espion

One of the reasons for playing with pictures again is that Digital Dream released MacOSX drivers for their matchbox sized digital camera, which means that it's actually worth carrying it around again.
Pictures worth sharing

Everyone has a bunch of pictures uploaded to their blog. Many are actually very good and would merit a page in their own right. Mine are nothing so exciting, but I was still motivated enough to fiddle with my Emacs blog software a little to make it easier to publish from within iPhoto.
This picture is Louis watching the Notice the jaunty angle of the Bob the Builder hat.
Review -- Harry Potter and the Order of the Phoenix

Books four and five are noticeably longer than the earlier books, at 600+ and 700+ pages respectively. Whether longer is better is not clear - there's no obvious padding in the later books and there is always lots going on.
Anyone who enjoyed the earlier books will enjoy this one. It's very much in the same vein. In fact, Harry Potter books are starting to follow a standard pattern:
- Harry is living with the Dursley family. Everyone is horrible to him he's not allowed to use magic, despite the temptations. He can't wait to get back to Hogwarts,
- Term starts and Harry & co. are whisked back to school.
- At school the teachers who like Harry still like him. The teachers who don't, don't.
- Lessons are hard, Quidditch is cool, Hermione is a swot,
- Weird stuff happens,
- Dumbledore is enigmatic,
- Harry resolves to sort it out (with the assistance of "& co."),
- Risky situations are encountered and then either avoided or dealt with,
- Harry proves himself to be a top bloke,
- Oops, end of term.
- Back to the Dursley's.
Perhaps I should write the next book - a few million would come in handy...