In 15+ years working with PHP I’ve never had to use this particular feature. Doing some research, it seems that every reference to this I’ve found relies on this feature in cPanel rather than using lower level tools.
We generally recommend against running your own email services. They can quickly become a major time-sink and require more attention than most services to prevent abuse.
If you are writing the handler script yourself you have some other options. One alternative would be to create a CRON job that runs every few minutes and checks a POP or IMAP mailbox for new messages. This way there would be no piping and your script would simply pull new messages from the mail server you are using.
Another option would be to use cPanel on your server in order to take advantage of this feature in the same way you did previously. We don’t offer cPanel licenses but you can purchase a VPS license from cpanel.net or a reseller and install it on your droplet. cPanel/WHM features it’s own installer that makes the initial setup quite easy.
When setting up a web site or application under your own domain, it is likely that you will also want a mail server to handle the domain's incoming and outgoing email. While it is possible to run your own mail server, it is often not the best option for a variety of reasons. This guide will cover many of the reasons that you may not want to run your own mail server, and offer a few alternatives.