How To Automatically Delete Junk Mail
It is evident from reading posts about how to set-up Mac Mail to automatically delete junk mail, that as far back as 2006 this has been a problem. Yet I can find no instructions that work on my iMac - running OS X 10.12.6.
As things stand, I have Preferences / Junk Mail set to define Junk if "all" of three criteria are met:
1. "Sender is not in my recipients"
2. "Sender is not in my contacts"
3. "Message is junk mail"
The system has learned quite well what is 'Junk' and satisfactorily directs unwanted mail to the "Junk" mailbox.
I have three accounts, but only two ever receive mail. Both of the two accounts that receive mail have "Mailbox Behaviors" set to "Erase junk messages" "After one day", but they do not. The junk mail just builds up (in the Junk Mail mailbox) and I have to manually erase it.
The only possible explanation I can see is, my iCloud IMAP account - which is never used - was not set to "Erase junk messages" "After one day".
I have been unable to find any Apple literature that clearly describes how the system is supposed to work and how to set it up so that it does.
iMac, macOS Sierra (10.12.6), 21.5 inch, 3.06 GHz, Intel i3