Mojave, Mail and Applescript


(Jeremy Roussak) #1

Does anyone know if something special has to be done with permissions in order to run an Applescript from within a Mail rule? I have a script, triggered by a rule, which tells Mail to generate an auto-reply to certain types of incoming message. Under High Sierra, it worked fine, but under Mojave it seems to have stopped working. I don’t get any error messages: where would they go?

Thanks

Jeremy


(Adam Engst) #2

I’m betting you’ll need to add something to the Automation list in System Preferences > Security & Privacy > Privacy since in Mojave, apps need your OK to control one another.


(Jeremy Roussak) #3

Adam, I’m sure you’re right. However, it’s not at all clear what I can add to that pane. The script is only “visible” from within the Mail rule. There’s no control of any other application: my script merely tells Mail (within which it’s already running) to compose and send an auto-reply whose content is based on the content of the incoming email.

For now, I’ve “solved” the problem by recruiting an old Mac mini, which I use as a media server and is still running High Sierra, to handle the auto-replies. Since I’ve no reason to want to upgrade the OS running on that machine, it’s a long-term workaround for the specific problem, but it would be nice to know how to handle it in the future.

Jeremy


(Curtis Wilcox) #4

I’m not running Mohave yet but it sounds like the script itself should be added to the Automation list in System Preferences > Security & Privacy > Privacy; the script may normally be “visible” only within Mail.app but it’s still a file you can find using the Finder.


(Jeremy Roussak) #5

Nice idea, but as it’s not an application, it’s not available to add to the list.

Jeremy


(Curtis Wilcox) #6

What happens if you add Mail.app itself to the Automation list? If the script is run by the Mail process, then that should be what is given permission.


(Doug Miller) #7

Tricky - at least on my system, there is no way for the user to add anything to the Automation list.

I’d wonder about the Accessibility list, though. That you can add apps to.