A corrupt database for Mail’s built-in junk mail filter can cause Mail to crash when processing incoming messages or when training messages with SpamSieve. To reset the database, find the LSMMap2 file and drag it to the trash.
On macOS 15, macOS 14, and macOS 13, the file is stored at:
/Users/<username>/Library/Mail/V10/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V10, then MailData to find the LSMMap2 file.
On macOS 12, the file is stored at:
/Users/<username>/Library/Mail/V9/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V9, then MailData to find the LSMMap2 file.
On macOS 11, the file is stored at:
/Users/<username>/Library/Mail/V8/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V8, then MailData to find the LSMMap2 file.
On macOS 10.15, the file is stored at:
/Users/<username>/Library/Mail/V7/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V7, then MailData to find the LSMMap2 file.
On macOS 10.14, the file is stored at:
/Users/<username>/Library/Mail/V6/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V6, then MailData to find the LSMMap2 file.
On macOS 10.13, the file is stored at:
/Users/<username>/Library/Mail/V5/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V5, then MailData to find the LSMMap2 file.
On macOS 10.12, the file is stored at:
/Users/<username>/Library/Mail/V4/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V4, then MailData to find the LSMMap2 file.
On macOS 10.11, the file is stored at:
/Users/<username>/Library/Mail/V3/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V3, then MailData to find the LSMMap2 file.
On macOS 10.7 through 10.10, the file is stored at:
/Users/<username>/Library/Mail/V2/MailData/LSMMap2
See the How can I open the Library folder? section. Open the Mail folder, then V2, then MailData to find the LSMMap2 file.