Your computer may be infected, but from what I read about the koobface malware, it's really a trojan that requires someone to download and install a fake Adobe Flash Player file. I don't see any evidence that it can spead directly from your computer. If you did install Adobe Flash Player from any source other than Adobe themselves, you may have contracted the trojan and will need to remove it. SecureMac offers a free removal tool here:
http://macscan.securemac.com/files/BTRT.dmg
It's entirely possible, though, that your iMac isn't actually infected but that the message came from some other computer that has been hijacked and picked your email randomly out of the computer's address book to use as the purported "return address". Do you see any emails in your Sent Mail for your email account that you can't account for? If not, then this scenario is probable, though you should still check your system.
Regards.