Bug 2220632

Summary: procmail stopped decoding RFC2047-encoded Subject fields
Product: [Fedora] Fedora Reporter: guilde.nt
Component: procmailAssignee: Jaroslav Škarvada <jskarvad>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: anon.amish, jskarvad
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description guilde.nt 2023-07-05 19:59:53 UTC
This rule in .procmailrc used to work to decode RFC2047-encoded Subject fields :

:0
* ^Subject:.*=\?
{
  :0 h
  S=| formail -cx Subject: | \
      perl -MEncode=from_to -pe 'from_to $_, "MIME-Header", "utf-8"'

  :0 fhw
  | formail -i "Subject: $S"
}

It fails now, producing an empty Subject: field.

Reproducible: Always

Steps to Reproduce:
1. add the rule showed above in .procmailrc ;
2. echo 'Subject: =?UTF-8?Q?Bonne_ann=C3=A9e_!?=' | procmail ;
3. a new message should show up in your mailbox, bearing the date 1/1/70.
Actual Results:  
The new message reads :

Old-Subject: =?UTF-8?Q?Bonne_ann=C3=A9e_!?=
Subject: 

Expected Results:  
It should have been :

Old-Subject: =?UTF-8?Q?Bonne_ann=C3=A9e_!?=
Subject: Bonne année !

The problem started in Fedora 37, around April 2023, I think.