SMTP server address and protocol feild too small

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Post Reply
Registered User
Posts: 3
Joined: Fri May 24, 2019 10:58 pm

SMTP server address and protocol feild too small

Post by newmember » Fri Jul 12, 2019 10:50 pm

I have a very long FQDN for our SMTP server located on
When I try to add tls://<FQDN> I run out of spaces in the GUI. I am short by 2 characters. Is there way around this limitation?

The field I am reference to is this one:
SMTP server address and protocol:


User avatar
Registered User
Posts: 1174
Joined: Wed Aug 15, 2018 3:23 am

Re: SMTP server address and protocol feild too small

Post by EA117 » Sat Jul 13, 2019 12:57 am

One immediate suggestion is to drop the "tls://" prefix, and use your mail server's port that will accept STARTTLS, e.g. 587. Ostensibly that will already give you the additional two characters you need for the DNS name.

Because phpBB's SMTP client is going to attempt STARTTLS whether you want it to or not, and regardless of what port or prefix are specified (or not). So it's not that you have to use the "tls://" prefix at all in order to still successfully negotiate a TLS connection.

Note there is also the known issue that specifying the "ssl://" or "tls://" prefix can actually cause a PHP warning when a message is sent. So omitting the prefix can also be advantageous for that reason.

Unrelated to all of that, note there is also an issue in the phpBB SMTP client which fails to negotiate higher than TLS 1.0. So if your mail server requires TLS 1.1 or higher, its going to reject the phpBB SMTP client's TLS negotiation.

The fix for the PHP warning when using the "ssl://" or "tls://" prefix, and the fix for allowing negotiation of TLS 1.1 and later, is available in the updated /includes/functions_messenger.php attached here. This modified version of functions_messenger.php is still correct and appropriate for phpBB 3.2.7, in addition to the phpBB 3.2.5 it was originally created for.

If you really want to expand the SMTP server DNS name field length allowed for input, you should be able to edit the definition of smtp_host in /includes/acp/acp_board.php, and change it's input validation from "text:25:50" to "text:25:100" or similar. I guess this probably should be 255 since that's about the DNS name length limit.

Post Reply

Return to “[3.2.x] Convertors”