add: cmd.sprintf("rm -rf /tmp/.kmail%d.lck", getuid()); system (cmd.data()); cmd.sprintf("rm -rf /tmp/.kmail%d.msg", getuid()); system (cmd.data());
context: static void cleanup(void){  KConfig* config =  kapp->getConfig();  shuttingDown = TRUE;  if (trashFolder)  {    trashFolder->close(TRUE);    config->setGroup("General");    if (config->readNumEntry("empty-trash-on-exit", 0))      trashFolder->expunge();  }  if (inboxFolder) inboxFolder->close(TRUE);  if (outboxFolder) outboxFolder->close(TRUE);  if (sentFolder) sentFolder->close(TRUE);  if (msgSender) delete msgSender;  if (addrBook) delete addrBook;  if (filterMgr) delete filterMgr;  if (acctMgr) delete acctMgr;  if (folderMgr) delete folderMgr;  if (kbp) delete kbp;  qInstallMsgHandler(oldMsgHandler);  app->getConfig()->sync();  //--- Sven's save attachments to /tmp start ---  //debug ("cleaned");  QString cmd;  cmd.sprintf("rm -rf /tmp/kmail%d", getpid());  system (cmd.data()); // delete your owns only  //--- Sven's save attachments to /tmp end ---}