In Apple Mail, you can filter the email headings, e.g. "To:", "From:" and "Subject:", in addition to defining own headers to filter. A possible set-up is
to direct email from example@example.com to a separate folder.
All emails through Domainnameshop's mail servers are flagged with a header if they are likely to be spam. This header is called "X-Spam-Flag:", and it is set to "YES" if an email is likely to be spam.
How to configure spam filtering in Apple Mail: Go to the "Mail" menu and choose "Options" ("Valg"). Click "Rules" ("Regler") and then
"Add Rule" ("Legg til Regel"):
Click "Edit Header List" ("Rediger meldingshodeliste") and add "X-Spam-Flag" as a mail header. Enter "X-Spam-Flag" in the text field and click "Add Header" ("Legg til Meldingshode").
Create a filter defining what to do with email having the "X-Spam-Flag" mail header containing "Yes". You can for example choose to delete these emails or move them to a specified folder.
This is how it looks in the end:
