Ralph Seichter: > Hello list, > > I am trying to configure Postfix to process inbound mail in the following > manner: > > 1. A sender connect to Postfix smtpd to deliver a message. > > 2. Postfix calls Milters A, B, C. Each of these Milters can either (a) > reject the message, (b) accept the message without changes or (c) add > a new header "X-SomeHeader: SomeValue" and then accept the message. > > 3. If any of the milters rejects the message (case 2a) Postfix rejects > the delivery attempt in progress with code 5xx. > > 4. In case 2b (all milters accept without changes) Postfix signals 250 > to the sender, terminates the inbound connection, looks up a "next hop" > transport and passes the message to that destination. > > The tricky part is case 2c. Messages marked with one or more additional > Headers, and only these messages, need to be passed to a fourth milter D > after a delay (!) of somewhere between 90s and 5m (current estimate). > Milter D then either accepts the message as is or adds yet another new > header before accepting. > > As calling milter D depends on the presence and content of headers, I > assume that it might be difficult to achieve the desired behaviour with > built-in Postfix features of a single Postfix instance. I am currently > exploring the idea of writing a transport service which FIFO-queues all > inbound messages for case 2c, delaying them for X seconds before passing > them to a second Postfix instance which talks to milter D. > > However, I'd rather use Postfix's own robust mechanisms (perhaps the > deferred queue?) instead of implementing a queing transport from scratch. > Also, I estimate that whatever queue I use will grow to hold approx. 1-5 > million messages at peak times, so performance and robustness are key. > > If you have ideas that could help me solve this, I'd appreciate you > letting me know.
What problem are you trying to solve? Please describe the problem (why not deliver mail when it is received), not the solution (labeling a message, and diverting labeled messages). Wietse