Trier, James: > Hi, > > I'm standing up Postfix to intercept inbound email to a particular > domain. What I'd like to do is take the inbound emails that reach > this Postfix host, regardless of its final destination address, > and place them on the file system as a flat file. And that's it. > We have another custom application that is going poll that directory > and run some customizations on the messages and then forward them > to an internal application that is using JAVA Mail to process > them. > > Does anyone have any examples or simple solutions for this configuration?
Postfix can be configured to deliver all mail to a command that saves each message to file, and have a polling process deliver mail. But that is terrible from a performance and reliability point of view. If the JAVAMAIL system can accept mail over SMTP or LMTP, then the whole system will be much more performant and much more reliable. /etc/postfix/main.cf mydestination = static:all default_transport = pipe_to_file /etc/postfix/master.cf: pipe_to_file unix - n n - - pipe user=xxx argv=/some/where/command ${sender} ${recipient} Where /some/where/command accepts ONE sender command-line argument and MANY recipient command-line arguments, and saves each message with sender and recipient to a unique file, in a manner such that the JAVAMAIL system does not deliver messages before they are completely stored. Wietse