Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Each time a user signs up to our website through an external provider we get a basic email with the body contents containing the user details.

I want to write a personalised automatic reply to this user. The actual parsing of the email body and reply via PHP I have already wrote but how do I go about configuring this from postfix?

At the moment it is configured using a roundcube Sieve plugin where the email gets moved into a folder "Subscribe". Is it possible to create a custom action here?

Debain Squeeze, Postfix and Dovecot

share|improve this question
up vote 2 down vote accepted

Provided you have a separate email address used only for subscriptions, the easiest solution would be to tell Postfix to hand mails to that address over to the script instead of delivering it to a mailbox.

You can do this in either of two ways. The first is to do it in the file "aliases" within your postfix configuration directory. If so, the line you add would look something like this: |/path/to/the/script.php

The second is to do it in a .forward file in the home directory of the user receiving the mail. If so, the line would look like this:


There's more information in the Postfix aliases documentation - for instance, it's possible to also deliver th mail to a recipient as well as pass it to the script.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.