Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17448

SMTP Mail Fails Due to Sockets Conflicting with cPanel WHM SMTP Security Settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Resolved
    • Icon: Trivial Trivial
    • None
    • 3.3.12, 3.3.13, 3.3.14
    • ACP
    • chrome 131.0.6778.108, firefox 133.3, phpbb 3.3.14, php 8.2 , cpanel 124.0.17 build 17, apache 2.4.62, kernel 4.18.0-553.30.1.el8_10.x86_64, CSF 14.22

      This was never an actual issue, i was being stupid, disregard this and see my last comment for details. 

       

      When sending SMTP mail it fails with the following error when using port 587 and the same when using port 465

       

      Could not connect to smtp host : 111 : Connection refused

      Errno 2: stream_socket_client(): Unable to connect to [hostname removed]:587 (Connection refused) at [ROOT]/includes/functions_messenger.php line 1193

       

      From my testing i have determined that there is a conflict (possibly do to with phpbb using sockets for SMTP)  between WHM tweak settings SMTP restrictions feature when enabled OR the configserver CSF SMTP_BLOCK enabled setting.  

      The WHM tweak setting SMTP restriction will not function when running CSF as per the instruction in CSF

      quote

      "This option in WHM will not function when running csf. You should disable WHM > Security Center > SMTP Restrictions and use the csf configuration option SMTP_BLOCK instead"

      endquote

      However the SMTP_BLOCK in CSF will block phpbb from sending SMTP mails i believe due to the usage of sockets by phpbb.  And the same with using WHM SMTP restriction.  

      This leaves the server at a security risk of spammers sending emails via common ports and bypassing SMTP security because both security features have to be disabled for SMTP to work.

      Article:  

      https://support.cpanel.net/hc/en-us/articles/360052429614-SMTP-Restrictions-WHM-versus-SMTP-BLOCK-CSF

       

      The issue is that the only way to get SMTP to function in phpbb is to disable both the WHM native setting in tweak settings and also disable SMTP_BLOCK in CSF.   This makes the server vunerable to spammers.  

      I tested my site with the 3.3.12 and 3.3.14  includes/functions_messenger.php file and the result was the same, fail.    So i am assuming that 3.3.13 file also does not work. 

      We must be able to secure the SMTP or spammers will have a field day.

       

            Unassigned Unassigned
            durangod durangod
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: