Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

st.len

macrumors newbie
Original poster
Nov 9, 2012
2
0
The short: I'm looking for a solution that will allow me to flag mail messages based on the from: field by matching them with addresses in a text file (NOT address book)

The long: I'm a college coach. I'm inundated with hundreds of emails a week from potential recruits. The vast majority of these aren't legit, but those that are are very important that I reply to asap. I'm trying to find a solution where I can whitelist a certain set of email addresses so that they are highlighted in my mailbox so that I can respond to them quickly. While this can be accomplished easily enough using mail rules and whether they are located in my address book, I would need to add hundreds of contacts to my address book - contacts that serve no purpose other than being "whitelisted".

An alternate solution would be to add them individually under a rule in mac mail (and this may be the route I go). While this would save me from having too many cards in address book, it still is a bit time consuming to add them - and I would prefer to have them stored in a text or some other easily accessed file (I have experience building FileMaker databases, so part of the process that I haven't detailed here would be to create this whitelist text file through FM as part of a larger process).

I've wasted today looking through spam filters, mail add-ons, AppleScripts and Automator task, to no avail. I'm thinking an AppleScript would be the most likely answer, but I've had no luck in my searches (everything returns how to trigger an AppleScript in rules, not how to make an AppleScript rule). Any help pointing me in the right direction or thinking outside the box would be greatly appreciated.
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
You can take a look at the example Mail scripts. In Snow Leopard you can find them in the Library-->Scripts-->Mail Scripts folder. Perhaps the Remove Messages From Sender or Thread script can point you in the right direction.
 

Attachments

  • Screen shot 2012-11-10 at 02.41.58.png
    Screen shot 2012-11-10 at 02.41.58.png
    143.7 KB · Views: 120

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,130
15,594
California
I have an idea using the built in Address Book that will do what you want and not clutter up your Address Book.

Create a new Address Book group On my Mac and call it "recruiting"... then import all the address there. In the mail sidebar set it up to only show your main Address Book and not the new recruit one. Have the mail rule look for messages that are a member of the "recruiting" group and move to a folder or whatever you want.
 

st.len

macrumors newbie
Original poster
Nov 9, 2012
2
0
Thanks all.

@kryten I've taken a look at your scripts. You're right - they do offer some of the functionality I'm looking for. I just don't know if I'm equipped now to handle modifying something of that complexity. Any threads you know of that detail comparing text strings in AppleScript?

@BrianBaugn It's through our work, so no gmail.

@WeasleyBoy I'm not following how I would go about not displaying a group in my Address Book. My biggest concern with address book is syncing to my phone.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,130
15,594
California
@WeasleyBoy I'm not following how I would go about not displaying a group in my Address Book. My biggest concern with address book is syncing to my phone.

Keep your personal addresses in the normal iCloud section of the Address Book, then add the new ones to the On my Mac area. The On my Mac ones will not sync over iCloud and will not show on iOS devices. You can just select the main iCloud group in the OS X address book and your will only see those.
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
@kryten I've taken a look at your scripts. You're right - they do offer some of the functionality I'm looking for. I just don't know if I'm equipped now to handle modifying something of that complexity. Any threads you know of that detail comparing text strings in AppleScript?

Take a look at the Operators paragraph in the text Class Reference on this page : https://developer.apple.com/library/mac/#documentation/applescript/conceptual/applescriptlangguide/reference/ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-BBCIAHJF
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.