Tom's script didn't stop qmail. I don't understand quite why, it could be a problem with our installation, but I'm not going to sweat it. Adding /var/qmail/bin/qmailctl stop|start to the appropriate sections solved the problem.