Contactez-nous : 01 71 18 39 72
Suivez-nous sur Facebook

zend framework Syndicate content

Triggering a PHP script when your Postfix server receives a mail

In this tutorial, we will see how to trigger a PHP script each time your web server is receiving some mail.

Why would you want to do that? Well you could want to do that to develop a custom mailing list system, to archive your mail in database, trigger commands in your website by sending mails... your imagination is the limit.

Getting started with a basic Postfix filter

Configuring Postfix

My mails are being treated like spam! What should I do?

Lately, I've been working on the Butterflive website where users can subscribe. As part of this process, users are sent automated mails (to check if the mail address they provide is correct or not). Alas, my mails were filtered as Spam by my own mail server.

In this article, I'll describe step by step what I did to solve the problem, what was successful and what did not work as expected.

The environment

First, a quick word about the environment:

  • Mails are sent in PHP, using the Zend_Mail component of the Zend framework