Php 5.6+, phpBB and email security


I run a phpBB forum ( ). If I use PHP 5.6 FastCGI (recommended), the forum seems to require extra email config steps which I’m still trying to puzzle out. If I use PHP 5.5 FastCGI, the forums can send emails fine.

phpBB Admin email config:
Use SMTP: Yes
SMTP Server:
Port: 587
Auth: Plain
SMTP username:
<password set, it works with PHP 5.5>

With PHP 5.6, trying to have the forums send email (e.g. user password change, private message), PHP generates this:

[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_messenger.php on line 1424: stream_socket_enable_crypto(): Peer certificate CN=*' did not match expected

One resource online noted this: “SSL ‘verify_peer’ option is now enabled by default w/ PHP v5.6+. Make sure your DNS zone is configured properly with appropriate CNAME for mail. and the SPF record (TXT) is pointing to your host’s email.”

Checking the cpanel, is set up to “Regular DreamHost Email (Active) – Use DreamHost’s mail features with no funny business!”. I’m not sure how to set/get the CNAME/SPF from the cpanel, and teach that to phpBB. Any suggestions? Thanks.
I’m not sure how to get the


You can fix this error by using a different name for your mail server.

Change this: SMTP Server:

to the dreamhost server name as determined in this wiki article (I used and anchored link but the forum here keeps messing it up---- if needed scroll down to the section titled “Connecting directly to your DreamHost mail server”)

Making that change will make the certificate match the domain name.


I used to figure out which of Dreamhost’s clusters serves the email for your domain. Use as the server name. This will fix the error you are seeing.


Thanks, all. Got it working