OpenDKIM
OpenDKIM copied to clipboard
SignHeaders arbitrary length limit
The SignHeaders configuration option seems to have some undocumented length limit. When SignHeaders is longer than 1016 characters, OpenDKIM fails to start with error:
can't configure DKIM library: failed to set DKIM library options
Makes no difference whether specifying it as a string in the config file, or as a file: dataset with one header per line.
Strangely, OversignHeaders does not seem to have this limit. This makes no sense given that OversignHeaders is always a subset of SignHeaders and thus would never need to be longer. This suggests that the limitation on SignHeaders is perhaps unintentional - i.e., a bug.
Care to paste here or email me a sample set of what you're trying? gushi at gushi dot org. I don't see a code difference between signheaders and oversignheaders except that when we load signheaders, we're also adding in the deltas of headers that must be signed and must never be signed, so it could be a bug in that path.