bugThe nmh Mail Handling System - Bugs: bug #65643, packf produces RFC4155-incompliant...

 
 

bug #65643: packf produces RFC4155-incompliant From_ headers

Submitter:  None
Submitted:  Thu 25 Apr 2024 05:15:47 PM UTC
   
 
Category:  Bug Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Assigned to:  levine Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 31 Aug 2024 03:21:26 PM UTC, comment #1: 

Fixed in commit 2d0b2b1694237b6a65e4f98797b1a33f8cabdad7.

Thank you for reporting this bug and for the code references.

David Levine <levine>
Group administrator
Thu 25 Apr 2024 05:15:47 PM UTC, original submission:  

nmh 1.8 packf creates From_ headers of this form:

From nobody@nowhere     Wed Apr 24 16:41:36 2024
                   ^^^^^ \t tab character

whereas RFC4155 indicates the sender and date MUST be
separated by a single Space character.  This leads to
subtle incompatibilities with mbox consumers such as dovecot.

https://datatracker.ietf.org/doc/html/rfc4155.html#appendix-A

The bug looks to be in uip/dropsbr.c line 248:

00246                     } else if (!has_prefix(buffer, "From ")) {                                         
00247                         /* There is no "From " line; add one. */                                       
00248                         char from[] = "From nobody@nowhere\t";                                         
00249                         char prefixed[LEN(from) + DCTIME_SIZEOF - 1 + sizeof buffer];                  
00250                         snprintf(prefixed, sizeof prefixed, "%s%s%s",                                  

though this earlier code is also fishy (two spaces rather than one).

00231                             fp = strchr(ep + 1, '\n');                                                 
00232                         tp = dctime(dlocaltimenow());                                                  
00233                         snprintf (buffer, sizeof(buffer), "From %.*s  %s",                             
00234                                 (int)(fp - ep), ep, tp);                                               
00235                     } else if (has_prefix(buffer, "X-Envelope-From:")) {                               

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by levine (Posted a comment)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-08-31 levine StatusNone Fixed
        Assigned toNone levine
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3dd8.
    Corresponding source code