Sleckie Instructions are available at: Processing messages with a script or program
Note that the script will only be able to act on mail that is sent to the email address which it monitors. It won't be able to tell you anything about a message sent to a remote recipient, including whether or not it was opened.
It's not possible for you to access the server mail logs directly but if there's something that you need us to research then please contact the support team for assistance.
Note that we do not have the ability to log "open rates". We can only log up to the point where our server hands a message off to the recipient server. If you must know when your recipients are reading mail that you send via Opalstack's mail system then you'll need to insert tracking pixel images into your outgoing mail and use your site access logs to track access to the images.