Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a way to enhance Mail.app 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?

Note:

I'm not after Junk Mail Filtering

share|improve this question
add comment

2 Answers 2

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 Mail.app.

==== 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
add comment

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
add comment

Your Answer

 
discard

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.