There are multiple solutions to this problem. As suggested by Rahul in the comments, I would use procmail and edit .procmailrc to something like this:
:0 * ^From.*[email protected] * !^FROM_DAEMON * !^FROM_MAILER * ^Subject:.*Unlock | /path/to/your/script