Re: Subject encoding; logs not matching header

2022-08-26 Thread Wietse Venema
Viktor Dukhovni: > On Fri, Aug 26, 2022 at 01:26:26PM -0400, post...@ptld.com wrote: > > > > Postfix is NOT unfolding the subject, and so not surprisingly not > > > removing the CRLF (really just LF when presented to header_checks, > > > logs, delivered to unix files, ...). My response was incomp

Re: Subject encoding; logs not matching header

2022-08-26 Thread Viktor Dukhovni
On Fri, Aug 26, 2022 at 01:26:26PM -0400, post...@ptld.com wrote: > > Postfix is NOT unfolding the subject, and so not surprisingly not > > removing the CRLF (really just LF when presented to header_checks, > > logs, delivered to unix files, ...). > > See now that confuses me again. > > I though

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
On 08-26-2022 1:03 pm, Viktor Dukhovni wrote: On Fri, Aug 26, 2022 at 12:48:40PM -0400, post...@ptld.com wrote: Now that I understand what is happening with postfix logging as explained to me in the previous reply, the issue is that postfix logging is unfolding the subject without removing the C

Re: Subject encoding; logs not matching header

2022-08-26 Thread Bernardo Reino
On Fri, 26 Aug 2022, post...@ptld.com wrote: I'm not getting your point. Why do you keep talking about a "quoted space"? The first line ends with CRLF and the second line has to start with a space to indicate it is a continuation of the previous line (folding). Why are you saying that means an

Re: Subject encoding; logs not matching header

2022-08-26 Thread Viktor Dukhovni
On Fri, Aug 26, 2022 at 12:48:40PM -0400, post...@ptld.com wrote: > Now that I understand what is happening with postfix logging as > explained to me in the previous reply, the issue is that postfix > logging is unfolding the subject without removing the CRLF as per > RFC5322 2.2.3 where it says "

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
The mail client is free to put whatever crap in the Subject (and other headers and the envelope) they want, regardless of standards or usefulness. It would be unsafe to send this crap to the logs since there is a rich history of exploits against logging systems and various log analysis tools. T

Re: Subject encoding; logs not matching header

2022-08-26 Thread Viktor Dukhovni
On Fri, Aug 26, 2022 at 11:11:38AM -0500, Noel Jones wrote: > Therefore unprintable characters - which have the greatest possibility > of breaking things yet are easily filtered - are replaced in the log > with "?" for safety. If there were sufficient compelling interest, we could consider using

Re: Subject encoding; logs not matching header

2022-08-26 Thread Noel Jones
On 8/26/2022 10:00 AM, post...@ptld.com wrote: is telling logging to add the '?' at the line break. Unprintable characters are replaced with "?" I understand that concept. The only part that leaves me confused is where did an unprintable character come from and how can you tell there was a

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
What you're asking for is a folding variant of the INFO target. As stated by Wietse, Posfix will not alter the content but will replace non printable character (CRLF in this case) with ? in logs. So it will not do by defaut any folding for you. Okay, now that makes more sense to me the way you

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
is telling logging to add the '?' at the line break. Unprintable characters are replaced with "?" I understand that concept. The only part that leaves me confused is where did an unprintable character come from and how can you tell there was an unprintable character in the subject line to b

Re: Subject encoding; logs not matching header

2022-08-26 Thread Emmanuel Fusté
Le 26/08/2022 à 16:54, Emmanuel Fusté a écrit : Le 26/08/2022 à 15:52, post...@ptld.com a écrit : Check RFC5322, section 2.2.1 "Unstructured Header Field Bodies".   Semantically, unstructured field bodies are simply to be treated as a   single line of characters with no further processing (excep

Re: Subject encoding; logs not matching header

2022-08-26 Thread Emmanuel Fusté
Le 26/08/2022 à 15:52, post...@ptld.com a écrit : Check RFC5322, section 2.2.1 "Unstructured Header Field Bodies".   Semantically, unstructured field bodies are simply to be treated as a   single line of characters with no further processing (except for   "folding" and "unfolding" as described in

Re: Subject encoding; logs not matching header

2022-08-26 Thread Noel Jones
On 8/26/2022 7:43 AM, post...@ptld.com wrote: On 08-26-2022 3:25 am, Wietse Venema wrote: post...@ptld.com: I know this is minor, just bringing it to light if Wietse feels it is worth doing something about.  I noticed on emails with encoded subject lines an extra character is being inserted into

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
Check RFC5322, section 2.2.1 "Unstructured Header Field Bodies". Semantically, unstructured field bodies are simply to be treated as a single line of characters with no further processing (except for "folding" and "unfolding" as described in section 2.2.3). where 2.2.3 ("Long Header Fields"

Re: Subject encoding; logs not matching header

2022-08-26 Thread Bernardo Reino
On Fri, 26 Aug 2022, post...@ptld.com wrote: EMAIL HEADER Subject: =?UTF-8?B?8J+YsSBTSE9QIE5PVzogR2V0IDAlIElOVEVSRVNUIERlYWxzIHBs?= =?UTF-8?B?dXMgZXhjbHVzaXZlIHZvdWNoZXJzIHdpdGggU1BheUxhdGVyISDwn5GJ?= SIDE BY SIDE COMPARE =?UTF-8?B?8J+YsSBTSE9QIE5PVzogR2V0IDAlIElOVEVSRVNUIERlYWxzIHBs?= =

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
EMAIL HEADER Subject: =?UTF-8?B?8J+YsSBTSE9QIE5PVzogR2V0IDAlIElOVEVSRVNUIERlYWxzIHBs?= =?UTF-8?B?dXMgZXhjbHVzaXZlIHZvdWNoZXJzIHdpdGggU1BheUxhdGVyISDwn5GJ?= SIDE BY SIDE COMPARE =?UTF-8?B?8J+YsSBTSE9QIE5PVzogR2V0IDAlIElOVEVSRVNUIERlYWxzIHBs?= =?UTF-8?B?dXMgZXhjbHVzaXZlIHZvdWNoZXJzIHdpdGggU1BheUx

Re: Subject encoding; logs not matching header

2022-08-26 Thread postfix
On 08-26-2022 3:25 am, Wietse Venema wrote: post...@ptld.com: I know this is minor, just bringing it to light if Wietse feels it is worth doing something about. I noticed on emails with encoded subject lines an extra character is being inserted into the logs. Postfix (and Postfix logging) does

Re: Subject encoding; logs not matching header

2022-08-26 Thread Bastian Blank
On Thu, Aug 25, 2022 at 05:23:26PM -0400, post...@ptld.com wrote: > I know this is minor, just bringing it to light if Wietse feels it is worth > doing something about. > I noticed on emails with encoded subject lines an extra character is being > inserted into the logs. > EMAIL HEADER > Subject

Re: Subject encoding; logs not matching header

2022-08-26 Thread Wietse Venema
post...@ptld.com: > I know this is minor, just bringing it to light if Wietse feels > it is worth doing something about. I noticed on emails with encoded > subject lines an extra character is being inserted into the logs. Postfix (and Postfix logging) does not alter subject lines. You configure

Subject encoding; logs not matching header

2022-08-25 Thread postfix
I know this is minor, just bringing it to light if Wietse feels it is worth doing something about. I noticed on emails with encoded subject lines an extra character is being inserted into the logs. EMAIL HEADER Subject: =?UTF-8?B?8J+YsSBTSE9QIE5PVzogR2V0IDAlIElOVEVSRVNUIERlYWxzIHBs?= =?UTF-8?