Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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:

subscribe@domain.com: |/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:

|/path/to/the/script.php

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

 
discard

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.