From: "Trier, James" on
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?

Regards,

James Trier
QUALCOMM
From: Kenneth Marshall on
On Mon, May 03, 2010 at 05:50:05PM +0000, Trier, James wrote:
> 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?
>
> Regards,
>
> James Trier
> QUALCOMM

Hi James,

Maybe I am missing something, but it seems like your best bet is
to take advantage of the interfaces that Postfix already supplies
to process mail messages. It will save the message in a queue file
on the spool filesystem by default. Then you can have it pass the
message to another system for processing through either an SMTP or
LMTP interface. Alternatively, you can use a content filter or a
milter to process the message and then pass the results to the
Java Mail with normal SMTP routing.

You could use a local delivery agent to drop it into a directory
for processing, but then you have all the usual locking and error
management problems that you will get for free with the documented
interfaces.

Regards,
Ken

From: Ansgar Wiechers on
On 2010-05-03 Trier, James wrote:
> 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?

Set up a catch-all mailbox on the Postfix host. Use procmail to store
all mail to that mailbox in Maildir format.

Regards
Ansgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

From: mouss on
Ansgar Wiechers a �crit :
> On 2010-05-03 Trier, James wrote:
>> 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?
>
> Set up a catch-all mailbox on the Postfix host. Use procmail to store
> all mail to that mailbox in Maildir format.
>

There is no point to call procmail. postfix can deliver to Maildir
directly.