spam filter not working

Why are the rules for spam not working?


MacBook Air 13″, macOS 10.12

Posted on Nov 18, 2021 11:17 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 20, 2021 6:57 AM

I get spam from five different entities with different names and email addresses. But they have one thing in common, they share a single mail server for transmitting those emails. I know this because I looked at each different email header and noted that their Return-path server was identical, even if the individual account number on it was different. I wrote a single rule that looked like this:


if [ any ↕︎]

[ Return-path ↕︎] [ contains ↕︎] [ server-name.com ]


Where server-name is replaced by the offending Return-Path server. Now all five of these SPAM emails which I was receiving at least once a day automatically moved to the Trash folder using a single Mail rule.


That Return-path is a Mail header field that Apple does not include in the menu list below the [ From ] selector. One needs to add Return-Path via that menus Edit header list… entry at the bottom. Looks like this:



When you click OK, the Return-path header item is added to the menu:



You can see the Return-path entry by selection the offending message, and then from the View menu > Message > Raw Source. This will open a smaller separate window with the Raw Mail header content. Yes, its gibberish. Press cmd+F to open a find window and enter Return-path. This will highlight that header field in yellow and the server-name will appear within angle brackets. Most are however, a sequence of characters, numbers, and much longer than this example:



If I wanted to block emails like this:


[ Return-path ↕︎ ] [ contains ↕︎ ] [ facebookmail.com ]


You have to be careful when taking this approach because some legitimate emails that you want to receive may use a different account on the same Return-path server, and in that case, you risk trashing them too. That is why you look for a Return-path pattern in the SPAM you can rely on to not impact legitimate emails.


And one thing you cannot prevent is eventually, the SPAMMERS will change their Return-path mail server and you will have to go through this process again, though not frequently.

5 replies
Question marked as Top-ranking reply

Nov 20, 2021 6:57 AM in response to Mor-san

I get spam from five different entities with different names and email addresses. But they have one thing in common, they share a single mail server for transmitting those emails. I know this because I looked at each different email header and noted that their Return-path server was identical, even if the individual account number on it was different. I wrote a single rule that looked like this:


if [ any ↕︎]

[ Return-path ↕︎] [ contains ↕︎] [ server-name.com ]


Where server-name is replaced by the offending Return-Path server. Now all five of these SPAM emails which I was receiving at least once a day automatically moved to the Trash folder using a single Mail rule.


That Return-path is a Mail header field that Apple does not include in the menu list below the [ From ] selector. One needs to add Return-Path via that menus Edit header list… entry at the bottom. Looks like this:



When you click OK, the Return-path header item is added to the menu:



You can see the Return-path entry by selection the offending message, and then from the View menu > Message > Raw Source. This will open a smaller separate window with the Raw Mail header content. Yes, its gibberish. Press cmd+F to open a find window and enter Return-path. This will highlight that header field in yellow and the server-name will appear within angle brackets. Most are however, a sequence of characters, numbers, and much longer than this example:



If I wanted to block emails like this:


[ Return-path ↕︎ ] [ contains ↕︎ ] [ facebookmail.com ]


You have to be careful when taking this approach because some legitimate emails that you want to receive may use a different account on the same Return-path server, and in that case, you risk trashing them too. That is why you look for a Return-path pattern in the SPAM you can rely on to not impact legitimate emails.


And one thing you cannot prevent is eventually, the SPAMMERS will change their Return-path mail server and you will have to go through this process again, though not frequently.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

spam filter not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.