In your face, KMail! ;-) $HOME/.kde/share/apps/kmail has a file in it in the format (username):(servername):(port) that has a list of the files it has downloaded. Deleted that, and now all is good. Funny that when you delete accounts from KMail it doesn't remove that. Perhaps time to visit Bugzilla.
Thanks to everyone for all the suggestions (though I found it myself, each new email made me look that much harder for the answer). Ian
