Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do you pipe emails to a PHP script on Mavericks server?

We're running OS X 10.9.2 ("Mavericks") with a pretty basic Server.app configuration which we're using mainly to host several dozen websites and about 10 or so email accounts. All is working well, but as most of you probably know, the "features" included in Server.app are limited (especially when it comes to managing email accounts). I'm failry well aquainted with the terminal, so not afraid to go there if needed.


Basically, we have several email accounts which were configured as "regular" accounts under the Accounts>Users section in Server.app. We then turned off access to all services except "Mail", since this is all we need them for. Each separate email domain was added to the list of "provide mail for: " under the "Mail" pane, and we're using Roundcube for our webmail interface.


Here's what we're trying to do; we need one of our email accounts (support@domain.com), to be piped to a PHP script so that we may handle mail through a web app. Server.app allows you to either "store mail locally" or "forward to email address", but how do we pipe to a PHP script? We already have the PHP script ready to go, as we previously had this same functionality running on a Linux box with Qmail, but... How do you do this with Postfix/Server.app?


Thank you for any help you can provide.

Mac mini (Late 2012), OS X Mavericks (10.9.2)

Posted on Feb 28, 2014 8:20 AM

Reply
1 reply

Feb 28, 2014 5:03 PM in response to hc999

I think the best approach is to setup a script to watch the e-mail folder, save to that folder, and then process any files it finds.


You can certainly do all the same things you would do on Linux with OS X. I don't know if OS X Server will provide an interface for that. I also don't know if OS X Server will actively defeat any attempts to get around it. But, unfortunately, if you take OS X Server out of the picture, then the procedure would be the same as Linux.

How do you pipe emails to a PHP script on Mavericks server?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.