bugThe nmh Mail Handling System - Bugs: bug #64052, Empty Dcc headers are not removed...

 
 

bug #64052: Empty Dcc headers are not removed by the command 'post'.

Submitter:  None
Submitted:  Sun 16 Apr 2023 03:11:17 AM 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
   

Sun 16 Apr 2023 03:11:17 AM UTC, original submission:  

I happened to find that empty Dcc headers are not removed by the command 'post' and that they are delivered intact.  This can be
easily confirmed by submitting an e-mail with an empty Dcc header 'Dcc: '.

This is caused by the following part of uip/post.c.
Since Dcc has the HNIL flag, an empty Dcc header is written out to the delivering message as it is.

937    if (count < 1) {
938        if (hdr->flags & HNIL)
939            fprintf (out, "%s: %s", name, str);
940        else {
941            /*
942             * Sender (or Resent-Sender) can have only one address
943             */

This could be fixed by checking whether the header is Dcc or Bcc as follows:

       if (count < 1) {
           if (hdr->flags & HNIL) {
               if ( !(hdr->flags & (HBCC | HDCC)) ) {
                   fprintf (out, "%s: %s", name, str);
               }
           }
           else {
               /*
                * Sender (or Resent-Sender) can have only one address
                */

The same behavior applies to empty Bcc headers too.
However, they are not delivered because the command 'sendmail' that is invoked by the command 'post' removes Bcc headers while Dcc headers are kept intact.

I hope this information is useful.

Last but not least, I would like to express my best gratitude to those contributing to this project since NMH is my main and best MUA.

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-02a9.
Corresponding source code