View Full Version : Mail.app - filter by colour label

May 29, 2012, 07:39 PM
I'd like to create a filter/smart folder based on the label of the message (red, yellow, etc). I can't do applescript. Can anyone help me with this? I would so appreciate it.

May 29, 2012, 08:15 PM
I'm working with a german locale, so I have to translate from German to Englisch. Thus wording might be (slighty) wrong.

No need for apple script.

1. Open Mail.app
2. In the menu bar Choose Mailbox > New Smart Mailbox.
3. Give it an appropriate name like "All red mails"
4. Click on the DropDown box most left (as default it should say something like "From")
5. There should be something like "E-Mail with label/flag" (its a single option in the 5th group of the dropdown field). Select this. You should be able to select the color of the label in the next dropdown box.
6. OK

I myself really like smark mailboxes and use some of http://www.makeuseof.com/tag/five-essential-smart-mailboxes-for-apple-mail-mac/

to make my life easier

May 30, 2012, 07:35 AM
There is no such option in the menu. That's why I need a script :)

May 30, 2012, 09:33 AM
There is no such option in the menu. That's why I need a script :)


Jun 26, 2012, 04:59 PM
Thanks for your screenshot, but I don't want to filter by flagged items, but by items that have a colour label (separate feature from the flag colours) - see screenshot - some flagged, some not flagged, but all different colours. I want to filter by yellow, green etc, whether flagged or not.

Jun 26, 2012, 06:32 PM
How did you get the color labels?


Aug 8, 2012, 09:05 PM
tell application "Mail"
set maillist to selection
repeat with i from 1 to number of items in maillist
set this_item to item i of maillist
if class of this_item is message then
set background color of this_item to blue
-- other colors are
-- gray / green / orange / red
end if
end repeat
end tell