When do Mail rules (to trigger AppleScript) run?

I’m guessing this is slightly off topic but you’re the group of people who would know, and it is AppleScript related.

I have a mail rule containing an AppleScript to save attachments to the Downloads folder. This runs successfully if I select the message and choose “Apply Inbox Rules” from the menu. What I don’t understand is when these rules are triggered by the app itself. I’ve searched but with no success. Does anyone know?

Cheers,

Patrick

Hi,

the rules are triggered whenever a new mail comes in.