Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to enhance with better rules?

What I'm missing most is regexps and the ability to group conditions and not only get "If all rules match" or If one rule match"

Alternatively is there a way to use apple-scripts as rules?


I'm not after Junk Mail Filtering

share|improve this question
up vote 3 down vote accepted

There is no way I can think of to use AppleScript to filter messages directly, but I guess you could go the ugly route of redirecting "All Messages" to an AppleScript and then handling them from there back to

==== Update:

To give you a better idea of what I´m talking about, you´ll have to create a new rule with condition "All Messages" and execute an Applescript. For example to check for the subject, you´ll want something similar to this:

using terms from application "Mail"
    on perform mail action with messages theMessages for rule theRule
        tell application "Mail"

            repeat with eachMessage in theMessages
                set theSubject to subject of eachMessage

                if theSubject contains "test" then
                    -- do something here, like move message to a folder
                end if
            end repeat

        end tell
    end perform mail action with messages
end using terms from

Note that of course you could easily use a do shell script statement here to use whatever command line tool you want to compare the subject with a regexp, like if (do shell script "*your regexp that returns 'true' if matched*" ) is true … and so on.

share|improve this answer

You might try MailActOn. I have not personally tried it, but it has been recommended to me (For the record, the price tag is what stopped me from trying it out). From what I've heard/read, this plugin for Apple Mail might provide you the extra depth you are looking for in managing rules.

There might even be competitors out there as well. But this is the only one I have heard about.

Good luck!

Update: This part of the functionality was what I was referring to. The ability to combine multiple rules (albeit, via key-stroke)

MailActOn Manual

However, you are right. This is probably not what the OP was looking for. This is what happens when you recommend products that you haven't tried :)

share|improve this answer
Unfortunately, MailActOn doesn´t really add new filter conditions, it only lets you do what its name already tells you: it acts on shortcuts to execute rules (and can handle your outgoing mail, too). – Asmus Mar 4 '11 at 13:19
It does allow you to combine rules, which is what I thought might help but in retrospect, I think you are right and the fact that it requires a keystroke is probably a deal breaker. – sorens Mar 4 '11 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.