Many people simply pipe mail received by either an MTA or MUA to a process. An MTA, such as sendmail, can receive mail and pipe it to a process. Often, mail is received by an MTA and sent to a user mailbox via a local MUA, and the MUA forwards the mail, via a pipe, to the standard-in.
Often, in a .forward file in a user directory has something like,
Or, in a file like the sendmail aliases file:
There are many reasons to do this, a person can simply send mail to a host and in the message have embedded tokens that could be used for anything imaginable... for example, you could send a message to a user aliase and have an embedded command (with embedded security) telling your home computer to turn off the lights in your house (if you had a interface to your home lighting)....
You can literally do anything you can imagine by sending mail to a process.... your imagination is the limit.... you could send mail to our home computer and with an embedded token that could be used by a process to activate a video camera, another example.