My late-2015 iMac (with an internal 1TB SSD) runs Catalina 10.15.6, and Mail.app version 13.4 (3608.120.23.2.1). Mail.app connects to an IMAP email account; the IMAP server hosts about 4500 messages. Spam Sieve (now 2.9.39) is installed as a spam filter, and has been in place for six years. All the software is up to date.
The problem: for the last month or so, Mail.app quits unexpectedly, many times per day. It relaunches without difficulty, and otherwise works briskly and correctly.
Before this, Mail.app used to quit only occasionally, perhaps a few times a year, or less. The new quits might have begun when I updated to 10.15.6.
At first, the new quits did not generate the dialog asking if I wanted to send an error report to Apple. Then on Sept. 28, 2020, I updated macOS to 10.15.7. Since this update, Mail.app continues to quit frequently without apparent cause, but the quits now offer the “Report” dialog and generate a visible error report. I am not, however, tech-savvy enough to understand the error report.
I booted into Safe Mode. The unexpected quits continued.
I created a new test user, for Mail.app to log into my IMAP account. Mail.app connected and loaded the IMAP mails. I enabled Fast Account Switching, so the test user remains logged in. In this test user’s use, Mail.app doesn’t seem to spontaneously quit.
The only difference in Mail.app in my regular user account and in the test account is this: in the regular user account, Mail.app contains mailboxes that I use as local archives. These mailboxes exist only on the iMac and aren’t synched to the IMAP server, just like the “Archive” mailboxes that Mail.app itself can create. (I created my own mailboxes as I wanted to preserve the naming and sorting. Mail.app names every Archive as "Archive.")
These on-the-iMac but non-IMAP mailboxes contain about 60,000 messages. I have used this on-the-iMac manual archiving for years, going back well before the spontaneous quits began. It doesn’t seem that the mail in these mailboxes slows down or affects Mail.app’s operation; if I’m not searching or opening an email from this storage, Mail.app isn’t paying any attention to it. I can’t identify any other Mail.app differences between my regular macOS user account, and my new test user account.
What else might I try to diagnose the cause of these unexpected quits?
Update: Late on October 7, I downloaded a new Catalina installer from Apple and replaced the OS. Since yesterday, Mail.app hasn't quit. I'll let it sit for awhile, maybe a week. If Mail.app is still stable, I'll post my own answer.