Scott Kitterman via Postfix-users wrote in
<[email protected]>:
|On April 29, 2024 9:27:20 PM UTC, Steffen Nurpmeso via Postfix-users \
|<[email protected]> wrote:
|>Tim Coote via Postfix-users wrote in
|> <[email protected]>:
...
|>|That’s why I formed a hypothesis that (my) Postfix had changed this \
|>|long header - as you note this is < 998 stmp limit. I presume it’s \
|>|not directly involved now, as smtp_line_length_limit is the default (998)
...
|>Note that in practice only exim and the DKIM library it uses (from
|>2009) produce really standard-conforming results, all other
|>implementations i have tested have some edge cases. For example,
|>opendkim and rspamd (as of git) use (at least in pars, or always)
|>the C function isspace(3) to normalize whitespace, which is not
|>allowed according to the DKIM RFC. They all do it wrong. The
|>most minimum and in practice very likely non-failing (or not at
|>all) is dkimpy (which uses the python function trim(), but only as
|>the very last step). My upcoming sign-only milter will only
|>support relaxed/relaxed, but is hard-conforming, too.
|
|If you have examples of cases where dkimpy is wrong, please file bugs \
|or email me off list. It aims to support the RFC requirements with \
|only minimal tweaks for interoperability.
I did not want to insult you!
In mind i had these canon..py snippets
def strip_trailing_whitespace(content):
return re.sub(b"[\t ]+\r\n", b"\r\n", content)
def compress_whitespace(content):
return re.sub(b"[\t ]+", b" ", content)
...
(x[0].lower().rstrip(),
compress_whitespace(unfold_header_value(x[1])).strip() + b"\r\n")
for x in headers]
These strip()s remove any whitespace, as opposed to [\t ] only.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]