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.

search mac mail by email display name

Is there a way of setting up a rule in Mac Mail to filter junk mail by searching for a display name as opposed to the actual email address? I'm getting so many spam emails with the common word 'Norton' in the display name, but all from different addresses. I also want to search for messages that state 'This message has no content', so I can delete them but can't find a way to do that either. Examples of both attached...

Mac mini, macOS 10.15

Posted on Nov 23, 2020 8:04 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 23, 2020 9:38 AM

The problem with creating a rule to act on a From or Subject mail header field is that these typically change over time and future emails get through. Right now, I get about 10 - 12 SPAM emails from the same organization, but most of these look like they are originating as separate entities. I control these with a single rule, comprised of six entries.


When you create a new rule in Mail Preferences : Rules, by clicking on Add Rule, you give it a rule name in the Description field, and then you have the following default visual:


I clicked on the From selection, and this provides a lengthy list of header items from which to select. At the very bottom of this list is the Edit header list… menu item. I knew that despite how the other header fields change, the one that acts like a finger-print to the originating mail is the Return-Path header item, which points back to the actual mail server that sent the email.


When I selected the Edit header list… menu item, I added a new header list item, named Return-Path. Click the [+} symbol to add the new header item, and enter it exactly as it is spelled in bold, and then click Ok.


Select your SPAM message as you have shown in your post, and then in the open rule, change the From header item to the newly added Return-Path. Choose contains for the middle selection, and the actual return path should automatically populate in the text field to the right. Select the next Norton message per your post, and then in the open rule that you are building, click the right-most + symbol to add another rule. Repeat the preceding to use the Return-Path header, and again, the Return-Path server string will populate the text field on the right.


At the bottom of the rule under Perform the following actions, I have [Move Message] to mailbox: [Junk]. When you click OK to save the Mail rule, it will cause a dialog to appear asking if you want to apply it to current messages. When you agree, it will move the Norton messages with that matching Return-Path to your junk folder. As long as you choose to make that rule Active in the Mail Preferences : Rules panel, it will automatically whack Norton junk mail on arrival that match that Return-Path server.

3 replies
Question marked as Top-ranking reply

Nov 23, 2020 9:38 AM in response to claire-g

The problem with creating a rule to act on a From or Subject mail header field is that these typically change over time and future emails get through. Right now, I get about 10 - 12 SPAM emails from the same organization, but most of these look like they are originating as separate entities. I control these with a single rule, comprised of six entries.


When you create a new rule in Mail Preferences : Rules, by clicking on Add Rule, you give it a rule name in the Description field, and then you have the following default visual:


I clicked on the From selection, and this provides a lengthy list of header items from which to select. At the very bottom of this list is the Edit header list… menu item. I knew that despite how the other header fields change, the one that acts like a finger-print to the originating mail is the Return-Path header item, which points back to the actual mail server that sent the email.


When I selected the Edit header list… menu item, I added a new header list item, named Return-Path. Click the [+} symbol to add the new header item, and enter it exactly as it is spelled in bold, and then click Ok.


Select your SPAM message as you have shown in your post, and then in the open rule, change the From header item to the newly added Return-Path. Choose contains for the middle selection, and the actual return path should automatically populate in the text field to the right. Select the next Norton message per your post, and then in the open rule that you are building, click the right-most + symbol to add another rule. Repeat the preceding to use the Return-Path header, and again, the Return-Path server string will populate the text field on the right.


At the bottom of the rule under Perform the following actions, I have [Move Message] to mailbox: [Junk]. When you click OK to save the Mail rule, it will cause a dialog to appear asking if you want to apply it to current messages. When you agree, it will move the Norton messages with that matching Return-Path to your junk folder. As long as you choose to make that rule Active in the Mail Preferences : Rules panel, it will automatically whack Norton junk mail on arrival that match that Return-Path server.

Nov 24, 2020 6:43 AM in response to claire-g

Claire,


That The message has no content advisory you see in Mail messages is put there by Apple Mail when it detects there is no mail body present. There is no Mail header field that contains this message — so no rule can be set for it. One might be able to apply an AppleScript rule that checks the content size of the message body and takes action on the email when the content is empty. I have no script here for that circumstance.


There are three scenarios by which you might receive an email without a message body:

  1. The short message is in the subject line
    1. Someone you know, and ideally, as a courtesy, appended (no msg) at the end of the subject line
    2. Someone you don't know, and possibly SPAM, whether intentional or unintentional name match in a group mailing
    3. Mail server error where the real message back on the server does have a message body and the server did not pass it along.


search mac mail by email display name

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