
Received a mail with the following in the header Subject: =?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?= In the procmail log will it say From MarknadKundkontakt@coop.se Thu Feb 09 13:33:12 2023 Subject: Folder: /home/lesve/Maildir/.commercial.coop/new/1675945992.11257 So my question. Have I found a bug or do I have some configuration wrong? The procmail version is: procmail v3.23pre 2001/09/13 Copyright (c) 1990-2001, Stephen R. van den Berg <srb@cuci.nl> Copyright (c) 1997-2001, Philip A. Guenther <guenther@sendmail.com>

On 2023-02-09 15:17, penguinfriend wrote:
Received a mail with the following in the header
Subject: =?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?=
In the procmail log will it say
From MarknadKundkontakt@coop.se Thu Feb 09 13:33:12 2023 Subject: Folder: /home/lesve/Maildir/.commercial.coop/new/1675945992.11257
So my question. Have I found a bug or do I have some configuration wrong?
The "=?utf8?B?R..?=" part should not get decoded, as it doesn't have 'utf-8' but 'utf8'. But if that doesn't worry you: $ perl -Mstrict -MEncode -C -wE' my $text= "=?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?="; say Encode::decode("MIME-Header", $text); ' Ditt ärende för Saknade poäng på Xtra varor är löst CAS-7196626-Z9B4X4 COOP:0023002413858 If you replace the space at the '= =' locations by a newline, or by a newline and a space, you'll get different results. -- Ruud

On 2023-02-09 15:47, Ruud H.G. van Tol wrote:
On 2023-02-09 15:17, penguinfriend wrote:
Received a mail with the following in the header
Subject: =?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?=
In the procmail log will it say
From MarknadKundkontakt@coop.se Thu Feb 09 13:33:12 2023 Subject: Folder: /home/lesve/Maildir/.commercial.coop/new/1675945992.11257
So my question. Have I found a bug or do I have some configuration wrong?
The "=?utf8?B?R..?=" part should not get decoded, as it doesn't have 'utf-8' but 'utf8'.
But if that doesn't worry you:
$ perl -Mstrict -MEncode -C -wE' my $text= "=?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?="; say Encode::decode("MIME-Header", $text); ' Ditt ärende för Saknade poäng på Xtra varor är löst CAS-7196626-Z9B4X4 COOP:0023002413858
If you replace the space at the '= =' locations by a newline, or by a newline and a space, you'll get different results.
-- Ruud
hi Ruud Thanks but you did not answer my question. _Have I found a bug or do I have some configuration wrong_? So why is the Subject: line empty i procmail log? The configuration I ask about is Procmail configuation but you answer me how the Mailer should be changed. this is not my business. /Regards

On 2023-02-09 17:32, penguinfriend wrote:
On 2023-02-09 15:47, Ruud H.G. van Tol wrote:
On 2023-02-09 15:17, penguinfriend wrote:
Received a mail with the following in the header
Subject: =?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?=
=?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?=
=?utf-8?Q?02413858?=
In the procmail log will it say
From MarknadKundkontakt@coop.se Thu Feb 09 13:33:12 2023 Subject: Folder: /home/lesve/Maildir/.commercial.coop/new/1675945992.11257
So my question. Have I found a bug or do I have some configuration wrong?
The "=?utf8?B?R..?=" part should not get decoded, as it doesn't have 'utf-8' but 'utf8'.
But if that doesn't worry you:
$ perl -Mstrict -MEncode -C -wE' my $text= "=?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?="; say Encode::decode("MIME-Header", $text); ' Ditt ärende för Saknade poäng på Xtra varor är löst CAS-7196626-Z9B4X4 COOP:0023002413858
If you replace the space at the '= =' locations by a newline, or by a newline and a space, you'll get different results.
hi Ruud
Thanks but you did not answer my question. _Have I found a bug or do I have some configuration wrong_? So why is the Subject: line empty i procmail log? The configuration I ask about is Procmail configuation but you answer me how the Mailer should be changed. this is not my business.
AFAICS, you didn't disclose any code/recipe, so it can be caused by many things. The one I mentioned is just one of them. Do you involve formail in any way? If not, then try. Header fields are OK to use multiple lines. The continuation lines start with at least one whitespace. If procmail by itself only logs the first line, as mentioned, then you know why. -- Ruud

Hi, Interesting question, and thanks for the explanation that procmail logs only the first line - it makes sense. I found earlier that procmail does not decode Subject lines that use =? encoding (usually quoted-printable =?charset?Q?..., but may be also base64 =?charset?B?). To deal with this I would recommend a procmail recipes such as follows: # Step 0: I like to have new-line character stored in variable $NL; maybe # there is a better way - please let me know if you have a suggestion: NL=' ' # 1. First decode the Subject line if it is encoded into an environment # variable $SUBJECT: # :0 h * ^Subject:.*=\? SUBJECT=| formail -cXSubject: | perl -MEncode=from_to -pe 'from_to $_, "MIME-Header", "iso-8859-1"' # # 2. Otherwise store the Subject line as-is into $SUBJECT: :0 hE SUBJECT=| formail -cXSubject: # # 3. Make your own log line: LOG="SUBJECT=($SUBJECT)$NL" Regards, Vlado On Thu, 9 Feb 2023, Ruud H.G. van Tol wrote:
On 2023-02-09 17:32, penguinfriend wrote:
On 2023-02-09 15:47, Ruud H.G. van Tol wrote:
On 2023-02-09 15:17, penguinfriend wrote:
Received a mail with the following in the header
Subject: =?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?=
=?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?=
=?utf-8?Q?02413858?=
In the procmail log will it say
From MarknadKundkontakt@coop.se Thu Feb 09 13:33:12 2023 Subject: Folder: /home/lesve/Maildir/.commercial.coop/new/1675945992.11257
So my question. Have I found a bug or do I have some configuration wrong?
The "=?utf8?B?R..?=" part should not get decoded, as it doesn't have 'utf-8' but 'utf8'.
But if that doesn't worry you:
$ perl -Mstrict -MEncode -C -wE' my $text= "=?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?="; say Encode::decode("MIME-Header", $text); ' Ditt ärende för Saknade poäng på Xtra varor är löst CAS-7196626-Z9B4X4 COOP:0023002413858
If you replace the space at the '= =' locations by a newline, or by a newline and a space, you'll get different results.
hi Ruud
Thanks but you did not answer my question. _Have I found a bug or do I have some configuration wrong_? So why is the Subject: line empty i procmail log? The configuration I ask about is Procmail configuation but you answer me how the Mailer should be changed. this is not my business.
AFAICS, you didn't disclose any code/recipe, so it can be caused by many things. The one I mentioned is just one of them.
Do you involve formail in any way? If not, then try.
Header fields are OK to use multiple lines. The continuation lines start with at least one whitespace. If procmail by itself only logs the first line, as mentioned, then you know why.
-- Ruud
____________________________________________________________ procmail mailing list -- procmail@lists.rwth-aachen.de Procmail homepage: http://www.procmail.org/ To unsubscribe send an email to procmail-leave@lists.rwth-aachen.de https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de

On Thu, 9 Feb 2023, at 15:17, penguinfriend wrote:
Subject: =?utf8?B?RGl0dCDDpHJlbmRlIGbDtnLCoFNha25hZGUgcG/DpG5nIHDDpSBYdHJhIHZh?= =?utf8?B?cm9y4oCJw6RyIGzDtnN0IENBUy03MTk2NjI2LVo5QjRYNCBDT09QOjAwMjMw?= =?utf-8?Q?02413858?=
In the procmail log will it say
From (...) Subject: Folder: /home/lesve/Maildir/.commercial.coop/new/1675945992.11257
So my question. Have I found a bug or do I have some configuration wrong?
Neither nor. Procmail shows the Subject header verbatim and only its 1st line, which in the example you quoted is 'Subject:' followed by a line break because the rest of the header is on continued lines. So only this "empty" line is logged. Some senders tend to break up the Subject header in this way. It's not common but I see it occasionally. -- -- Andreas :-)
participants (4)
-
Andreas Schamanek
-
penguinfriend
-
Ruud H.G. van Tol
-
Vlado Keselj