On Tue, Jan 4, 2011 at 10:12, Victor Duchovni <victor.ducho...@morganstanley.com> wrote: > On Tue, Jan 04, 2011 at 09:47:10AM -0500, Phil Howard wrote: > >> > Unlike some software, Postfix behaves as documented, so you can >> > easily establish from the manpage how the prepend action works. >> >> So basically, the answer is "no". >> >> Behaving as documented is good. But is it the case that every feature >> is documented and none are left out? > > Postfix features are developed after or concurrently with the reference > documentation. There are no hidden features. Undocumented features are > never adopted into Postfix. > > If it is not documented, it is not a feature. This *should* not be > surprising. > > Not all the internal architectural details are documented, these are not > features. Rather, an expert administrator could use a deep understanding > of the internal architecture to more easily tune and troubleshoot a > Postfix system. The internal architecture is subject to change, and users > must not depend on it not changing. Some of the internals are described > in the OVERVIEW, QSHAPE_README and SCHEDULER_README documents.
And that is part of my thinking. There MAY have been some "constructive" way to use different elements of Postfix that could have achieved the same effect, which might be obvious only to those who have the deep understanding (I am not one of those). The fact that PREPEND only inserts at that point where the triggering line is, is the limiting factor. In header checks, that's OK for inserting a header, although one does not have control where that insert happens (normally I'd want to insert any new header at the top, although for my current need, that won't matter). I'm assuming the header checks and body checks is implemented as some code that sees a stream, rather than the whole message (especially when doing body checks), so I'm guessing it would be non-trivial to add a new action in a future version that would do a "prepend to the top of headers". So I'm thinking about an alternative where I do a routine prepend of some very bizarre text (since it now inside the message body), that would be very unlikely to ever be in any message, and follow that with an external filter by inserting my own code between Postfix and Amavis (unless there is some means inside Amavis to hook in to do this) to store the message to a temporary file while looking for that bizarre text, and if found add the header when the message is sent on to Amavis (which later sends it back to Postfix). -- sHiFt HaPpEnS!