On Tue, Jan 04, 2011 at 11:39:01AM -0500, Phil Howard wrote:

> In other words, for the test itself to be changed (as a new kind of
> test) to do what I need, it would either need random access to the
> message file (which cannot happen here if the message is not yet
> stored as a file), or has separated headers.

Neither is necessary. The post-milter Postfix queue-file is
a linked-list of records, and new records can be added logically
in the middle of the file, after the fact, via pointer-records.

> > No detailed design has been proposed to fill this need.
> 
> Separation of headers and body for the purpose of modifying message
> content would be helpful.  A "PREPEND_TO_HEADERS" action would then be
> useful if that can be done.  A "Received" header gets prepended.  But
> that is easily doable before any other content processing is done.

To propose an enhanced  design, you'd have to study the current design.
The integration of milter checks into Postfix makes it possible to
use the new capabilities to enhance the original built-in checks.

Milters look at the whole message and finally emit a list of headers to
insert. The built-in checks act on one header or body line at a time.
For header-insertion to make sense in body checks there needs to be a
sensible duplicate elimination strategy. Is there a clear consensus
on how body-line at a time header insertion should behave?

A complex design would set flags for each feature identified
in the message, and then provide some way to generate actions based
on the flags set at the end of the message. "Just write a content
filter or milter" is probably the better option.

A less complex design would just eliminate duplicate headers, and insert
all the unique headers when the message end is reached. Would this be
sufficiently useful to enough users?

-- 
        Viktor.

Reply via email to