title: automate Mail so it can run a shell script when a specific message is received
body: <p>I am trying to see if there is a way to get this done: Basically I get email from a server at specific intervals, so I am trying to run a shell script that will perform an install of a specific package on my mac when the mail arrives.</p>
  
  <p>I do not have access to the server so I cannot do anything on it; I can only rely on the fact that at an undetermined time during the day, I will get the email and I will need to install a package. I am doing it by hand but it is tedious honestly, and prone to error if I am not checking the email for any reason.</p>
  
  <p>I was thinking to use Applescript, but if there is any other way to do this via console or shell script, I would be more happy honestly (never been a great fan of Applescript).</p>
  
  <p>Is there any way to accomplish this task? I don't even understand if mail on OSX is scriptable. I've looked around but I've found only Automator links. I know Python as scripting language, if that can be used in any way with Mail.</p>
  
  <p>Thanks in advance. </p>