private function canonizeHeaders(Message $message)
    {
        $params  = $this->getParams();
        $headersToSign = explode(':', $params['h']);
        if (!in_array('dkim-signature', $headersToSign)) {
            $headersToSign[] = 'dkim-signature';
        }

        foreach($headersToSign as $fieldName) {
            $fieldName = strtolower($fieldName);
            $header = $message->getHeaders()->get($fieldName);
            if ($header instanceof Header\HeaderInterface) {
                $this->appendCanonizedHeader(
                    $fieldName . ':' . preg_replace('/\s+/', ' ', $header->getFieldValue(Header\HeaderInterface::FORMAT_ENCODED)) . "\r\n"
                );
            }
        }
    }