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:  None
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

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

 

CC list is empty

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-bb6a.
Corresponding source code