Ok, so let me get this straight. As of now your system is configured to relay emails from your server based on certain condition to
blahfoowhatever@gmail.com email address. Now you want that if you send an email from abc.xyz.com account to
blahfoowhatever@gmail.com account (if it get configured on the server) to read the email and look for any keyword like "restart" and then take action accordingly.
I am not sure if it will be exactly possible but you could try downloading any MUA (Message User Agent) like Mutt which is a text based MUA on the server. Configure your
blahfoowhatever@gmail.com email account on that and give it a try.