Postfix users,

I think I have an understanding of my problem, but I may be incorrect
and can use some additional expertise. I recently modified an account
on my system to forward all mail for a particular user to some python
code. I modified the /etc/alias file and then ran newaliases.

Postfix is doing exactly what it should as is the python code. What I
noticed though is that a header is being prepended onto the original
email. From what I can tell this is done via the cleanup daemon, with
the code being found within cleanup_message.c.

The newly added header contains the From and Date fields. Is it
possible to prevent this from happening outside of removing the
corresponding C code and compiling a custom postfix version?

I've reviewed the man pages for cleanup(8), from what I can tell, the
only relevant control is "always_add_missing_headers" which defaults
to "no" (although I manually set this to "no").

Within the C code there are additional references for other checks:

    if ((state->hdr_rewrite_context || var_always_add_hdrs)
        && (state->headers_seen & (1 << (state->resent[0] ?
                                       HDR_RESENT_FROM : HDR_FROM))) == 0)

Wasn't sure if there was something I can do with the header checks or
if there was something else I could configure to prevent this
occurring. I didn't find anything with the man pages for
header_checks(5) that stood out as a possible configuration option.

Thanks!
Rick

Reply via email to