From: R.A. Imhoff <>
Date: Tue, 30 Nov 2010 17:57:48 +0100


I was wondering about the function of the FixCRLF option in openDKIM.conf

In testing with Ubuntu 10.04, openDKIM 2.2.2 and Postfix 2.7.0, I used a php script to send mail with the mail() command, trying various EOL codes in the header lines being added.

What I found is that, "\n" alone passes the DKIM verification at the receiver end:

$headers .= 'From:' . "\n" . 'Content-Type: text/plain; charset=ANSI_X3.4-1968' . "\n";

and this does too:
$headers .= 'From:' . PHP_EOL . 'Content-Type: text/plain; charset=ANSI_X3.4-1968' . PHP_EOL;

but this fails:
$headers .= 'From:' . "\r\n" . 'Content-Type: text/plain; charset=ANSI_X3.4-1968' . "\r\n";

But the results are the same with or without "FixCRLF y" in the conf file (and restarting openDKIM after changes).

From the description of the conf file, it would appear the FixCRLF will add a missing CR if the php were to use only "\n", but in fact at the receiver end, what passes the test is LF without CR, yet the LF alone passes even when FixCRLF is added, so it seems not to do anything, or do I misunderstand its purpose?

I would have imagined that the intention of FixCRLF would be to allow the DKIM encoding to succeed irrespective of the EOL codes being used in a sending script ?
Received on Tue Nov 30 2010 - 16:58:12 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:19:49 PST