Checking mail's content with a script
I use CentOS 4.4, Postfix.
I want to perform some tasks (restarting the machine, starting and stoping ftp) from home. I don't want to use SSH, but I want to perform this tasks through mail system (I send a command and a program, which is running on the server, will check mails and execute the command).
For example I send a message to specific user on the server with the content: "service vsftpd start", and it will be executed.
My question is:
How can I check the mails' contents with a script?