See related question for a little discussion. It's the folding that seems to bother yahoo, and not the space. Here's a patch of what I mean. I've asked the yahoo feedback loop for input, and will report back if/when they reply.
--- dkim/__init__.py 2012-02-22 21:56:26.000000000 -0600
+++ dkim/__init__.py 2012-02-22 21:19:23.000000000 -0600
@@ -441,7 +441,8 @@
# record what verify should extract
self.include_headers = tuple(include_headers)
- sig_value = fold(b"; ".join(b"=".join(x) for x in sigfields))
+ sig_value = b"; ".join(b"=".join(x) for x in sigfields)
dkim_header = (b'DKIM-Signature', b' ' + sig_value)
h = hashlib.sha256()
sig = dict(sigfields)
See related question for a little discussion. It's the folding that seems to bother yahoo, and not the space. Here's a patch of what I mean. I've asked the yahoo feedback loop for input, and will report back if/when they reply.
--- dkim/__init__.py 2012-02-22 21:56:26.000000000 -0600 include_ headers = tuple(include_ headers)
+++ dkim/__init__.py 2012-02-22 21:19:23.000000000 -0600
@@ -441,7 +441,8 @@
# record what verify should extract
self.
- sig_value = fold(b"; ".join(b"=".join(x) for x in sigfields))
+ sig_value = b"; ".join(b"=".join(x) for x in sigfields)
dkim_header = (b'DKIM-Signature', b' ' + sig_value)
h = hashlib.sha256()
sig = dict(sigfields)