Subject: pkg/15568: maildrop 1.3.7 adds a blank line before generated 'From ' lines
To: None <gnats-bugs@gnats.netbsd.org>
From: None <david@l8s.co.uk>
List: netbsd-bugs
Date: 02/10/2002 05:04:55
>Number:         15568
>Category:       pkg
>Synopsis:       maildrop 1.3.7 adds a blank line before generated 'From ' lines
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 10 05:05:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     David Laight
>Release:        1.5ZA
>Organization:
>Environment:
NetBSD snowdrop 1.5ZA NetBSD 1.5ZA (GENERIC) #5: Tue Jan 29 12:41:29 GMT 2002
dsl@snowdrop:/oldroot/usr/bsd-current/src/sys/arch/i386/compile/GENERIC i386
>Description:
If maildrop has to create a 'From ' line at the start of a mail item
then it erronously includes a blank line before it.

This causes some MUA (eg mutt) to complain that /var/mail/xyz isn't
a valid mailbox.

Even the maildrop man page says:
	At  least  one  mail program writes an empty line before a
	From_ header when saving a message into a  file.  maildrop
	ignores  empty lines at the beginning of messages.
>How-To-Repeat:
Use maildrop to deliver mail that doesn't have a 'From ' line into an
empty /var/mail/xyz mailbox then try to read the mail using mutt.


>Fix:
in pkgsrc/mail/maildrop/work/maildrop-1.3.7/maildrop/formatmbox.C
remove the \n from the "\nFrom " in FormatMbox::GetfromLine.

*** formatmbox.C        Sun Feb 10 12:41:58 2002
--- formatmbox.C.issue  Sun Feb 10 12:41:52 2002
***************
*** 42,48 ****
  
        time(&tm);
  
!       tempbuf="From ";
        tempbuf += maildrop.msginfo.fromname;
        tempbuf += ' ';
  
--- 42,48 ----
  
        time(&tm);
  
!       tempbuf="\nFrom ";
        tempbuf += maildrop.msginfo.fromname;
        tempbuf += ' ';
  

>Release-Note:
>Audit-Trail:
>Unformatted: