Lines Beginning with "From" Dash-Escaped?
John A. Martin
Sat Apr 28 16:48:01 2001
-----BEGIN PGP SIGNED MESSAGE-----
>>>>> "IK" == Ingo Klöcker
>>>>> "Re: Lines Beginning with "From" Dash-Escaped?"
>>>>> Sat, 28 Apr 2001 11:42:10 +0200
>> Can anyone expand on the reasons why PGP and GPG use the
>> dash-escape in this manner, aside from what is written in the
IK> I found this in the NEWS:
IK> Noteworthy changes in version 0.9.0
IK> ----------------------------------- [snip]
IK> * New option --escape-from-lines to "dash-escape" "From "
IK> lines to
IK> prevent mailers to change them to ">From ". This is
IK> not enabled by default because it is not in compliance
IK> with rfc2440 - however, you should turn it on.
IK> Reason: If a MUA uses the mailbox format, i.e. a simple text
IK> file where all messages are stored one after the other a line
IK> starting with "From " is used to mark the start of the next
IK> message. There are a lot of MUAs which use the mailbox format,
IK> for example Netscape Messenger, KMail and also Pine and Mutt.
IK> Now if a line inside a message starts with "From " it will be
IK> changed to ">From " by the MUA while receiving the mail. But
IK> this additional ">" would break the signature. Therefore PGP
IK> and GnuPG dash-escape the "From " if they clear-sign messages.
The crux of the matter is that many MTAs will escape leading
From-space during local delivery.
IK> The reason why you never have seen a line beginning with
IK> ">From " might be because the MUA automatically removes the
IK> ">" before displaying the mail. The ">" can only be found in
IK> the mailbox file in which the message is stored.
Also, some local delivery agents are smart enough to only escape the
From-space if it is preceded by a blank line and the remainder of the
line "looks like" a mailbox delimiter. Moreover, more and more mail
systems are being optioned not to use the Berkeley style mailbox that
uses a From-space line to delimit mail messages.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: OpenPGP encrypted mail preferred. See <http://www.gnupg.org/>
-----END PGP SIGNATURE-----