Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14871

DKIM failure due to emails sent by phpBB with inappropriate header


    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.10
    • Fix Version/s: None
    • Component/s: Notification System
    • Labels:
    • Environment:
      PHP 5.6.27, centos 6, sendmail, postfix, opendkim


      When phpBB is configured on a server using sendmail (and probably others), it is setting the mail header Content-Transfer-Encoding: to be 8bit, which in many environments does not cause a problem, what it means is that the local mail agent will pass the (8bit encoded) message through without performing mime encoding on the message. The problems is that a downstream MTA may be configured to recode all 8bit content to 7bit, which again is not an issue in many environments.

      But if the local MTA is configured to add a DKIM signature to the mail, it will sign the 8bit encoded version, and the signature will not match the 7bit encoded version of the message that is eventually received by the recipient, hence all mail from the phpBB forum appears to have an invalid or mismatched DKIM signature.

      In includes/functions_messenger.php, the function build_header($to, $cc, $bcc) has the line:
      $headers[] = 'Content-Transfer-Encoding: 8bit'; // 7bit

      It should be: $headers[] = 'Content-Transfer-Encoding: 7bit';

      The comment at the end of the line implies that this was originally set to 7bit but was previously changed to 8bit (I could not see why).




            • Assignee:
              v12mike v12mike
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: