You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I block emails (spam) that have ridiculously long nonsense addresses?

How do I block emails (spam) that have ridiculously long nonsense addresses in Mac Mail? They seem to all come from @gmail address. I do have a few friends that use @gmail, so I don't want to block all @gmail. Is there away to block senders if the address is over a certain number of characters? I have "load remote content" turned off so I can look at the addresses without notifying the sender (or so I have been told).



Posted on Feb 8, 2021 11:27 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 8, 2021 2:12 PM

Select just one of these long nonsense SPAM emails in your Inbox message list. We will get back to that in a moment…


In Mail Preferences, edit an existing, or add a new Mail rule. By default it will appear as the following though I have dummied up the address part:



Click on that From selector, and all the way to the bottom of that menu will be the menu item, Edit header list… Select that entry.


What you are about to do is add a mail header that focuses on the sending mail server whose address rarely changes for the SPAM senders, though they may use several. Thus, they can send you an email from Gmail or anywhere else, and it goes through that mail server conduit that you are about to trap.


Here is what that Edit header list window looks like for me. In your case, just click + and add the exact spelling: Return-Path and leave anything else untouched in your list of header items. Then click Ok.



Back to the rule panel. Click the From selector, and replace it with the newly added Return-Path header. Without changing anything else, the Return-Path of your prior selected message now populates the window adjacent to the contains selector. Once you set the action to use mailbox Junk or Trash, and click OK. A prompt appears asking if it is OK to apply the new rule to the originally selected email message. When you agree, the selected message is dealt with. Any future emails using that Return-Path server will also be sent to oblivion too as they arrive.



1 reply
Question marked as Top-ranking reply

Feb 8, 2021 2:12 PM in response to photrain

Select just one of these long nonsense SPAM emails in your Inbox message list. We will get back to that in a moment…


In Mail Preferences, edit an existing, or add a new Mail rule. By default it will appear as the following though I have dummied up the address part:



Click on that From selector, and all the way to the bottom of that menu will be the menu item, Edit header list… Select that entry.


What you are about to do is add a mail header that focuses on the sending mail server whose address rarely changes for the SPAM senders, though they may use several. Thus, they can send you an email from Gmail or anywhere else, and it goes through that mail server conduit that you are about to trap.


Here is what that Edit header list window looks like for me. In your case, just click + and add the exact spelling: Return-Path and leave anything else untouched in your list of header items. Then click Ok.



Back to the rule panel. Click the From selector, and replace it with the newly added Return-Path header. Without changing anything else, the Return-Path of your prior selected message now populates the window adjacent to the contains selector. Once you set the action to use mailbox Junk or Trash, and click OK. A prompt appears asking if it is OK to apply the new rule to the originally selected email message. When you agree, the selected message is dealt with. Any future emails using that Return-Path server will also be sent to oblivion too as they arrive.



How do I block emails (spam) that have ridiculously long nonsense addresses?

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