Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

greetings all is it possible to configure postfix to deliver emails to an app that perform some action on this emails.

share|improve this question

migrated from stackoverflow.com Jun 27 '10 at 22:25

This question came from our site for professional and enthusiast programmers.

This sounds more like a question for ServerFault.

This being said, Postfix pipes are probably what you need:

DESCRIPTION

   The  pipe(8)  daemon  processes  requests from the Postfix
   queue manager to deliver messages  to  external  commands.
share|improve this answer

main.cf

Assuming you are on a virtual setup, define your virtual_transport in main.cf :

virtual_transport : myowncustomizedtransport

master.cf

then in master.cf define how myowncustomizedtransport works. As @Bruno already mentionned, you should use the Pipe transport agent (and read its man page) to deliver all virtual email through your application.

myowncustomizedtransport  unix  -       n       n       -       -       pipe flags=DRhu user=vmail argv=/usr/bin/myapplication with some arguments (read man pipe to get a list of arguments you could get like $recipient and $client_address or $size)
share|improve this answer

Your Answer

 
discard

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