Steffen Nurpmeso via Postfix-users: > Wietse Venema via Postfix-users wrote in > <4tqh100n6pzj...@spike.porcupine.org>: > |Are you trying to say that Postfix represents a multiline message > |header as text with \n instead of \r\n? > > Yes. > > |That is very well possible. Postfix strips \n and \r\n line terminators > |on input, and the MIME parser synthesizes multiline headers with > |\n boundaries thusly, before they are sent to header_checks or > |Milter: > | > | if (IS_SPACE_TAB(*text)) { > | if (LEN(state->output_buffer) < var_header_limit) { > | vstring_strcat(state->output_buffer, "\n"); > | vstring_strncat(state->output_buffer, text, len); > | > |That code was written years before Postfix Milter support and DKIM > |plugins. > | > |I agree that \r\n would be better, but I'm surprised that this has > |not come up before. > > Maybe other MUAs create valid emails with only CRLF when passing > over to the MTA, or simply do not use line continuation when the > email is to be passed to the MTA. > Plus DKIM is maybe not used widely by the my-MUA-is-a-shell-script > folks yet.
Every Received: header is multiline, and it is not unusual to have multiline Subject:, To:, and other common headers. Again, Postfix does not store line terminators, not when email comes from UNIX tool with \n, via SMTP with \r\n, or encapsulated as netstrings which uses neither. Instead, Postfix generates line terminators upon output, and until now they are always \n. Postfix systems have been signing with Milters since Postfix Milter support was added in 2006. I'm just surprised that the non-canoncal line endings in a multiline header have not been a problem before. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org