#412148 procmail: formail does not quote "From " header correct

Package:
procmail
Source:
procmail
Description:
Versatile e-mail processor
Submitter:
Jörg Sommer
Date:
2013-10-15 09:15:04 UTC
Severity:
normal
#412148#5
Date:
2007-02-24 00:09:55 UTC
From:
To:
Hi,

the manual page of formail says: If you want to save the original ‘From ’
line, rename it with the -R option to a legal header field such as
‘X-From_:’. But this removes the space after the colon.

% echo From test@localhost | formail -R From X-From_:
X-From_:test@localhost

% echo From test@localhost | formail -R From X-From_
X-From_ test@localhost

% echo From: test@localhost | formail -R From X-From_:
X-From_: test@localhost

% echo From: test@localhost | formail -R From X-From_
X-From_: test@localhost

Bye, Jörg.

#412148#8
Date:
2007-02-24 01:04:49 UTC
From:
To:
Hello.

I received this from the Debian bug system.
Please keep the Cc: lines when replying.

BTW: Is this address still the correct one to report bugs?
I have been forwarding procmail bugs to this address for several years,
but lately nobody reply to them. Please tell me that you are alive.

Package: procmail
Version: 3.22-16
Severity: normal

Hi,

the manual page of formail says: If you want to save the original `From '
line, rename it with the -R option to a legal header field such as
`X-From_:'. But this removes the space after the colon.

% echo From test@localhost | formail -R From X-From_:
X-From_:test@localhost

% echo From test@localhost | formail -R From X-From_
X-From_ test@localhost

% echo From: test@localhost | formail -R From X-From_:
X-From_: test@localhost

% echo From: test@localhost | formail -R From X-From_
X-From_: test@localhost

Bye, Jörg.

[...]

#412148#15
Date:
2013-10-15 09:04:08 UTC
From:
To:
The way I viewed it, was that the actual content of the 'From ' line
starts *after* the space.  RFC prescribes that mail field content starts
directly after the colon, so by introducing an extra space there in case
of renaming a "From " line, would contaminate the content.

It could be argued that an exception for this case (that adds the space
there) would be ok, but I'm not sure if this still is a good idea,
considering backward compatibility.  It would probably be better to
document the anomaly in the man page instead.