Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing DKIM #1495

Merged
merged 4 commits into from
Jun 4, 2016
Merged

Fixing DKIM #1495

merged 4 commits into from
Jun 4, 2016

Conversation

zllovesuki
Copy link
Contributor

@zllovesuki zllovesuki commented Jun 4, 2016

Changes proposed in this pull request:

  • Uses "UTF-8" in all toString
  • Remove whitespaces where Sig is broken into multi lines
  • Add CRLF to the end of body regardless of bodycanon (as described in http://dkimcore.org/specification.html)

… multipart body has trailing CRLF will mess up body; add CRLF if there's no trailing CRLF (both bodycanon)
@baudehlo baudehlo merged commit 4ebdee7 into haraka:master Jun 4, 2016
@zllovesuki
Copy link
Contributor Author

In case people look back and question why CRLF is added regardless:

https://tools.ietf.org/html/rfc6376

For simple body:

The "simple" body canonicalization algorithm ignores all empty lines
   at the end of the message body.  An empty line is a line of zero
   length after removal of the line terminator.  If there is no body or
   no trailing CRLF on the message body, a CRLF is added.  It makes no
   other changes to the message body.  In more formal terms, the
   "simple" body canonicalization algorithm converts "*CRLF" at the end
   of the body to a single "CRLF".

   Note that a completely empty or missing body is canonicalized as a
   single "CRLF"; that is, the canonicalized length will be 2 octets.

For relaxed body:

Ignore all empty lines at the end of the message body.  "Empty
       line" is defined in Section 3.4.3.  If the body is non-empty but
       does not end with a CRLF, a CRLF is added.  (For email, this is
       only possible when using extensions to SMTP or non-SMTP transport
       mechanisms.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants