Lines Beginning with "From" Dash-Escaped?

Ingo Klöcker ingo.kloecker@epost.de
Sat Apr 28 12:47:02 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday, 28. April 2001 04:35, Nick Andriash wrote:

> Strange, but I just noticed that both PGP and GPG insert a dash/space
> (dash-escape) at the start of a line beginning with "From". I never
> noticed that before, and although I do realize that some Mail Clients
> used to use "From" as a delimiter, I never thought PGP/GPG would
> dash-escape it.
>
> The dash/space is only applied if "From" starts a sentence, and the
> word must be capitalised. "From" by itself is not affected. Below is
> an example of what I mean:
> With both PGP and GPG involved, I thought this must be part of RFC
> 2440 so I looked through it and found Section 7.1/Dash-Escaped Text.
> It hints at PGP applying the dash-escape to "From" lines because some
> MUA change these lines to ">From", so therefore GPG should follow.
> Although I've heard of some MUA's that use "From" as a delimiter,
> I've never seen it used.
>
> Can anyone expand on the reasons why PGP and GPG use the dash-escape
> in this manner, aside from what is written in the RFC?
I found this in the NEWS: Noteworthy changes in version 0.9.0 ----------------------------------- [snip] * New option --escape-from-lines to "dash-escape" "From " lines to prevent mailers to change them to ">From ". This is not enabled by default because it is not in compliance with rfc2440 - however, you should turn it on. Reason: If a MUA uses the mailbox format, i.e. a simple text file where all messages are stored one after the other a line starting with "From " is used to mark the start of the next message. There are a lot of MUAs which use the mailbox format, for example Netscape Messenger, KMail and also Pine and Mutt. Now if a line inside a message starts with "From " it will be changed to ">From " by the MUA while receiving the mail. But this additional ">" would break the signature. Therefore PGP and GnuPG dash-escape the "From " if they clear-sign messages. The reason why you never have seen a line beginning with ">From " might be because the MUA automatically removes the ">" before displaying the mail. The ">" can only be found in the mailbox file in which the message is stored. I hope this clears things up. Regards, Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE66pB6GnR+RTDgudgRAp4SAKCqD48r+MwI27G+wu3qyxRFg7Y0ZgCg0qDR RDZHPy5Nimigois9DC8Sf0c= =0WkE -----END PGP SIGNATURE-----