On Fri 12/Dec/2014 00:29:42 +0100 Sam Varshavchik wrote: > Alessandro Vesely writes: >> >> After further investigation I found out that Courier smtp client wraps header >> lines longer than 70 (rfc822_getaddrs_wrap). Sendmail unwraps the newline to >> work around a Lotus Notes quirk which used to cause some misbehavior in some >> clients. I'm not clear whether esmtpclient only wraps in some cases or >> Applemail (the server that hosts the succeeding test) does a better >> unwrapping >> by also removing the two additional spaces. All of that seems to be buried >> quite deeply in email history. If you recollect any details, I'll forward >> that >> to the folks at opendkim who helped me understanding this oddity. >> >> For outbound mail, the obvious workaround is to use the "relaxed" DKIM header >> canonicalization, which disregards whitespace. Some may prefer to skip the >> rewriting entirely, but I have no idea of the pros and cons of it. "Simple" >> canonicalization would be better in case whitespace matters. Is it worth >> making the rewriting configurable? >> >> For inbound mail, rewriting doesn't seem to take place. Correct? > > The default configuration always rewrites and standardizes the headers.
Right, so it must have been Apple's server (http://www.appmaildev.com/en/dkim/) I tentatively installed the following patch. It prevents wrapping without apparently causing any blatant malfunction. What would you say about it? (I didn't explore what unexpected effects it might sort.) --- courier/libs/comrwheader.c.orig 2013-08-25 20:44:47.000000000 +0200 +++ courier/libs/comrwheader.c 2014-12-12 09:03:44.000000000 +0100 @@ -98,7 +98,7 @@ unsigned i, l; char *p; - new_header=rfc822_getaddrs_wrap(rfca, 70); + new_header=rfc822_getaddrs_wrap(rfca, 700); if (!new_header) clog_msg_errno(); for (i=l=0; new_header[i]; i++) > There's actually a NOADDRREWRITE setting in the esmtpd configuration file, > which can be used to disable it. And, as documented, it can be set to disable > canonicalization only for mail that has a DKIM signature. > > It should be possible to hack NOADDRREWRITE for mail submitted locally, by > setting it via an opt in the bofh configuration file: > > opt NOADDRREWRITE=1 > > But, unless it's also overriden in the esmtpd config file, this is going to > take effect for all mail. Oh thanks, I set it to 2 and then forgot about it. I'd better mention it in zdkimfilter docs, along with MIME=none. Ale ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
