A
A
Alexander Tomsk2015-10-02 11:13:46
PHP
Alexander Tomsk, 2015-10-02 11:13:46

How to execute php script when receiving mail?

There is access to a server on FreeBSD, it has a web server and a mail server.
The task is to execute a ready-made PHP script when receiving a letter to a special mailbox, which sends a GET request with the parameters received in the letter.
The email template with the list of parameters can also be changed (to make it easier to parse the email with parameter values).
Devcot is installed on the server, there are manuals everywhere on the Internet how to do this for Postfix (google query: "php mail processing"), but I don't think I have it installed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Extor, 2015-10-02
@Extor

In addition to Dovecot, you must have an MTA (Postfix, Exim...) installed. And mail processing happens on MTA. Therefore, Google correctly tells you what to do.

D
Daemon23RUS, 2015-10-02
@Daemon23RUS

In my case, the option with CRON was the most suitable. I added a check every 5 minutes
and in the script I check mail and perform actions. Start:
I have a time-critical procedure, 5 minutes was enough for me.
PS I'm fetching mail from a third party server.

R
Rsa97, 2015-10-02
@Rsa97

The simplest is via .forward or procmail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question