Version: (using KDE 4.2.1) Installed from: Fedora RPMs If I have few messages open, somewhere - as my desktop has multiple virtual desktops and messages are spread around different tasks - and due problems with program, I choose: File --> Quit the main window disappears. If I try to start the program again, the main window comes back very quickly and the same problem still persists. That is because kmail process never ended since I did not close all open windows first and then choose Quit from main window. IMO this is not logical and must be very confusing for non IT users. Firefox is a good example that Quit really shuts down all open windows and processes.
Well, while the behavior you're suggesting sounds the most logical to me, I'm not sure everyone will want their mail composing windows closed just because they closed the main window. And especially "non IT users" might not expect closing the main window to automatically close everything - expecting that implies you already have a mental model of which window is the main one and which ones are subordinates. Any KMail developer available for a comment?
Also look at the kde-core mails for "[PATCH] new CloseWindow and CloseDocument KStandardGuiItems" *** This bug has been marked as a duplicate of bug 180466 ***