From: =?windows-1252?Q?Michael_Monnerie?= on
Dear list,

we're trying to solve a problem here, and currently I can't figure out how.

This system puts all incoming mails on HOLD, and after some time releases it again. By that time, it is known whether the message should go to destination A or B. But it seems there's no way I can control that.

Example:
messages X and Y arrives and are put on HOLD
after analyzation, we know we should prepend a header A to message X, and route message Y to destination backup

Is there a way to do that? I thought about multi-instance, but still can't get the idea how to do it.

mit freundlichen Grüßen
Michael Monnerie, Ing. BSc

it-management Internet Services
http://proteger.at [gesprochen: Prot-e-schee]
Tel: 0660 / 415 65 31

// Wir haben im Moment zwei Häuser zu verkaufen:
// http://zmi.at/langegg/
// http://zmi.at/haus2009/

From: "Michael Monnerie" on
> Example:
> messages X and Y arrives and are put on HOLD
> after analyzation, we know we should prepend a header A to message
> X, and route message Y to destination backup
>
> Is there a way to do that? I thought about multi-instance, but
> still can't get the idea how to do it.

I could use several instances to deliver to the correct queue *before* I hold the mail, but I can't do that as at that time it's state is unknown.

So what are my options?
1) modify a queued postfix mail by hand
Inserting a header would be good enough
2) manually move the queue file to another instance (=spool dir)
That would risk duplicate IDs, but I could deliver as I want

The goal of all this is we need to wait several minutes for an external process before a routing decision can be done. How else could we control the routing over a long time?

Thank you!

From: Victor Duchovni on
On Fri, Apr 09, 2010 at 08:44:52PM +0200, Michael Monnerie wrote:

> > Example:
> > messages X and Y arrives and are put on HOLD
> > after analyzation, we know we should prepend a header A to message
> > X, and route message Y to destination backup

Deliver the mail out of the Postfix queue to a system that manages
such delayed email. When the mail is ready to go, re-submit it back
into Postfix. The system, can be an SMTP or LMTP server that queues
some mail, and possibly proxies other mail right back to Postfix
in real-time. With LMTP you can handle each recipient separately
if that is needed.

> The goal of all this is we need to wait several minutes for an external
> process before a routing decision can be done. How else could we control
> the routing over a long time?

--
Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment. If you are interested, please drop me a note.

From: Wietse Venema on
Michael Monnerie:
> > Example:
> > messages X and Y arrives and are put on HOLD
> > after analyzation, we know we should prepend a header A to message
> > X, and route message Y to destination backup
> >
> > Is there a way to do that? I thought about multi-instance, but
> > still can't get the idea how to do it.

Hold is for suspending delivery, not for changing delivery.

Instead of HOLD use a MILTER program (or external content filter)
and replace the envelope recipient appropriately.

Wietse