Hi,

I understand that there's always a limit - this is expected.
But the unexpected part was that the limit is very different on same-ish
functions.
I think making the limit the same for both scenarios would be best - if
either 60 or 200 ( more preferred :P ).

For now I'll take care of my case by logging the information I need on the
milter side and then merging the logs.

Thanks!

On Thu, Mar 9, 2023 at 10:13 PM Wietse Venema via Postfix-users <
postfix-users@postfix.org> wrote:

> Aleksandr Stankevic via Postfix-users:
> > Hi,
> >
> > I've got a milter that, as part of the job, adds an X-Test-Tracking
> header
> > with a 76 char length string.
> > Then, in postfix, i've got a milter_header_checks which uses WARN to log
> > this to logs, like:
> > /^X-Test-Tracking/ WARN
> > I've noticed that it only logs the first 43 chars.
> > In example the header added is:
> > X-Test-Tracking:
> >
> MTY3ODM4OTcxOS40MDMyMTIzLTAxNWIzMjRlLTdlNWEtNDQ0ZC05MzRhLWVlMDUzZTMxNDgxMA==
> > And the logs shows it as:
> > Mar  9 19:21:59 smtp1 postfix/cleanup[3497349]: 4PXfFM2XQYz45TTK:
> > milter-header-warning: header X-Test-Tracking:
> > MTY3ODM4OTcxOS40MDMyMTIzLTAxNWIzMjRlLTdlNWE from unknown[127.0.0.1];
> > from=<redacted> to=<redacted> proto=ESMTP helo=<redacted>:
> >
> > Whereas when i use the WARN method in header_checks it logs the full
> > header. As this header is added in milter I can't use header_checks.
> >
> > I couldn't find any information about differences of WARN / header length
> > logged in milter_header_checks vs header_checks.
> >
> > Is there a way to actually log the full header in this case through
> postfix?
>
> As a matter of principle, Postfix limits the amount of text that
> it logs, to to prevent trivial resource exhaustion attacks, or
> attempts to prevent Postfix from logging from= and to= information
> after a long string.
>
> It just so happens that the limit for milter_header_checks content
> (60) is different from the limit for other header_checks (200).
> milter_header_checks was implemented in 2006, the other in 1999.
> Most other logging limits are around 100 bytes or so.
>
> I could make both the same 200, but there will always be a limit.
>
>         Wietse
> _______________________________________________
> Postfix-users mailing list -- postfix-users@postfix.org
> To unsubscribe send an email to postfix-users-le...@postfix.org
>
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to