Plesk

Unable to receive/send emails in Plesk with submission port (587) enabled: Connection concurrency limit exceeded

Symptoms

Cause

The maximum number of connections that an SMTP client may make simultaneously is exceeded (default is 50).

Resolution

Either of the following resolutions can be applied:

Increase the number of connections that an SMTP client may make simultaneously:

  1. Connect to the server using SSH

  2. Execute the command below to increase the maximum number of connections that an SMTP client may make simultaneously:

    # postconf smtpd_client_connection_count_limit=100

    Note: This is a sample value, it needs to be changed according to the server specifics.

Configure Fail2Ban so that it will automatically block IP addresses that exceeded the allowed limit.

  1. Log into Plesk

  2. Go to Plesk > Tools & Settings > IP Address Banning (Fail2Ban) >Jails > Add Jail

  3. Add the following:

    Name:

    postfix-concurrency

    Filter:

    postfix-sasl -Postfix SMTP and SASL authentication failures

    Action:

    iptables-multiport[name="postfix-concurrency", port="smtp,smtps,submission" protocol="tcp"]

    Log Path:

    /var/log/maillog

    Ban Period:

    600

    The maximum number of failed login attempts:

    5

  4. Go to Tools & Settings > IP Address Banning (Fail2Ban) >Jails > Manage Filters > Add Filter

  5. Add the following:

    Name:

    postfix-concurrency

    Content:

    [Definition]
    failregex = warning: Connection concurrency limit exceeded: [0-9]+ from S+[<HOST>] for service S+$
    ignoreregex =

  6. Connect to the server using SSH

  7. Verify the filter functionality by running the following command:

    # fail2ban-regex /var/log/maillog /etc/fail2ban/filter.d/postfix-concurrency.local

  8. If the configuration is correct you will get a result similar to the one below:

    Running tests
    Use failregex filter file : postfix-concurrency, basedir: /etc/fail2ban
    Use log file : /var/log/maillog
    Use encoding : UTF-8
    Results
    Failregex: 0 total
    Ignoreregex: 0 total

Exit mobile version