Victor Duchovni a écrit : > On Sat, Mar 21, 2009 at 07:31:24PM +0100, mouss wrote: > >>>> alternatively, you can add an smtpd in the chain using proxy_filter: >>>> >>>> - smtpd on port 25 does the rewrite. it then uses proxy_filter to pass >>>> mail to an smtpd on port 10020. >>> Rewriting is done by cleanup(8). This can't work. >> I guess this is because cleanup isn't called to do the rewrite when a >> proxy_filter is used, right? > > Yes, the message goes through cleanup (and hits the disk) just once, > in the post-proxy SMTP server. The pre-proxy server just passes the > message content to the filter via IPC. There is (as yet) no virtual > rewriting in the SMTP server, and no cleanup before the proxy. > > The cleanup daemon does not speak SMTP, it writes message content into > the incoming queue, and the proxy is *pre-queue*. The flow is > (notation: <process> or |queue|) > > <smtpd> -> <proxy> -> <smtpd> -> <cleanup> -> |incoming| > > NOT: > > <smtpd> -> <proxy> -> <smtpd> -> |incoming| > |^ |^ > v| v| > <cleanup> <cleanup> >
so if one wants to do the kind of rewrite OP discussed here, an "external" filter is needed, but this becomes too convoluted, compared to generating the list with a script (or with sql statements...). so should be kept for a "full" BATV implementation. Thanks for the clarification.