trusteddomainproject / OpenDKIM

Other
97 stars 52 forks source link

Headers with leading CRLF canonicalized incorrectly #39

Open wttw opened 5 years ago

wttw commented 5 years ago

If a header is wrapped immediately after the field name then it's (relaxed) canonicalized form will have a space between the field name and field value.

e.g.

List-Unsubscribe:
   =?us-ascii?q?long_meaningless_value...

will canonicalize to

list-unsubscribe: =?us-ascii?q?long_meaningless_value...

instead of

list-unsubscribe:=?us-ascii?q?long_meaningless_value...

which causes validation to fail.

The RFC says that any whitespace after the colon should be deleted.

dilyanpalauzov commented 5 years ago

This and other bugs are fixed on the develop branch.

tomop-tg commented 5 years ago

FYI: The emails sent from twitter.com have this bug.

dilyanpalauzov commented 5 years ago

Use the code from the develop branch.

tomop-tg commented 5 years ago

I've already used development branch.

twitter.com sends bad signature (using old OpenDKIM?). Then my MTA gets "dkim=fail". I reported this failure to twitter.com but rejected.

dilyanpalauzov commented 5 years ago

What do you expect to happen, when you write here?

tomop-tg commented 5 years ago

What I would like is:

dilyanpalauzov commented 5 years ago

I asked the author of the software to release a new version of OpenDKIM, where all known problems are fixed. You can write him, too.

mskucherawy commented 5 years ago

We obviously can't compel Twitter to fix their DKIM implementation, but I'll cut a release of this shortly in case that's the blocker.