Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
3.1.10
-
None
-
None
-
PHP 5.6.27, centos 6, sendmail, postfix, opendkim
Description
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).