1

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

John Magnolia
  • 1,723
  • 6
  • 28
  • 46

1 Answers1

2

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.

Jenny D
  • 27,780
  • 21
  • 75
  • 114