• Resolved gelenkbusfahrer

    (@gelenkbusfahrer)


    Subject: WP Mail SMTP connection timeout when Really Simple Security is enabled

    Hello,

    I have identified what appears to be a conflict between Really Simple Security and WP Mail SMTP on a production WordPress site.Environment

    • WordPress 7.0
    • WP Mail SMTP 4.8.0
    • PHP 8.1, 8.2, 8.3 and 8.4 tested
    • Hetzner Webhosting
    • SMTP server: mail.your-server.de
    • Port: 587
    • Encryption: TLS
    • Authentication enabled

    Problem

    As soon as Really Simple Security is activated, WP Mail SMTP is unable to establish an SMTP connection.

    The SMTP test fails with:

    SMTP Error: Could not connect to SMTP host.
    Failed to connect to server.
    Connection timed out (110)
    
    stream_socket_client():
    Unable to connect to mail.your-server.de:587
    (Connection timed out)
    

    What I tested

    • SMTP configuration verified and correct
    • Mail account credentials verified
    • Cloudflare cache cleared
    • WordPress cache cleared
    • Different PHP versions tested (8.1, 8.2, 8.3, 8.4)
    • WP Mail SMTP test email succeeds when Really Simple Security is disabled
    • WP Mail SMTP test email fails when Really Simple Security is enabled

    Important observation

    With Really Simple Security disabled, SMTP works correctly.

    With Really Simple Security enabled, SMTP consistently fails with a connection timeout.

    This behavior is reproducible.

    The free version is being used. No Pro firewall features are available or enabled.Additional note

    After disabling Really Simple Security, SMTP sometimes continues to fail temporarily until PHP processes are restarted or some time has passed. This makes me wonder whether the plugin writes persistent server or configuration changes that are not immediately reverted when the plugin is disabled.

    Has anyone experienced a similar issue, or is there a known setting in Really Simple Security that could interfere with outgoing SMTP socket connections used by WP Mail SMTP?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Support Jarno Vos

    (@jarnovos)

    Hi @gelenkbusfahrer,

    That is an interesting one, and I can’t say that I’ve seen this before. But the fact that your SMTP plugin starts operating as expected almost immediately after the plugin is disabled (or only after PHP is restarted) almost certainly indicates some relation between that behavior and some active feature in the plugin.

    You could try to disable all features in the plugin that could possibly be related to this. I’d start by disabling the 301 .htaccess redirect if you have it enabled at the moment (by reverting to the default 301 PHP Redirect under Security -> Settings -> SSL), or just try to disable all of the features in the plugin temporarily to check if this issue still persists regardless of doing so.

    Anyway, given the exact behavior you describe (whereby a PHP restart is sometimes needed after disabling the plugin for SMTP to start working again), this does indeed seem to point towards a persistent config change (possibly in the wp-config.php) being the culprit. Something you could try is to compare the config files like wp-config.php and .htaccess, before and after the plugin has been disabled, which may very well point out the difference / culprit here (just a note: don’t share your wp-config.php contents here).

    I hope this offers some guidance to troubleshoot the problem; but because I haven’t seen this before, I don’t yet know the exact answer as to what feature could possibly be related.

    Kind regards, Jarno

    • This reply was modified 1 week, 4 days ago by Jarno Vos. Reason: typo
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.