The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

script sending SMTP too many messages in this connection

Discussion in 'E-mail Discussions' started by asmithjr, Nov 6, 2015.

  1. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    I have a script using phpmailer that I've modified to use SMTP instead of php mail.
    The script uses isSMTP with the $mail->Host = "IP address"
    this works fine using any of the 4 IPs. I've tested using a small list.

    This morning I got a message from a user stating their schools mailing list failed to send all the emails in the list.

    The error is
    Code:
    Failed to send to [EMAIL=someemail@gmail.com[/EMAIL] The following From address failed: [EMAIL='user-581962-329-bounce@mydomain.com[/EMAIL] : MAIL FROM command failed,too many messages in this connection ,421,SMTP server error: MAIL FROM command failed Detail: too many messages in this connection SMTP code: 421SMTP server error: MAIL FROM command failed Detail: too many messages in this connection SMTP code: 421
    The emails are sending from my server connecting to my server using the IP and login credentials. Since this particular list contains 2183 emails and 1183 failed so 1000 emails sent and I see this in my logs.

    I use SMTPKeepAlive=true; then SmtpClose after the emails are sent.
    I cannot find anything useful to show a limit for the number of messages in this connection. I see smtp_accept_max =100 in the exim.conf but this appears to control the number of smtp connections and not the number of messages.
    In this case I am the ISP so I want to allow more messages per connection if possible.
    Does anyone know if adding smtp_accept_max_per_connection to the exim.conf will correct this problem and if so, how to make it stick?
    Thanks
     
    #1 asmithjr, Nov 6, 2015
    Last edited by a moderator: Nov 6, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    Thanks Michael, I've thought about these. My max per domain is 1000 however I also have them restricted in each profile. So if I change the max here will it reset what I have for each account?
    I would not want to undo all the settings. I realize that the login the script uses is for one particular domain I've set up and it is set up for the default which is 1000. This may be the issue. I am just not sure.
     
  4. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    sorry I missed that. when I checked the domain that is sending it is set for unlimited not the default.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The individual limits take precedence over the global limit, so you don't have to change the global limit. Try increasing the "smtp_accept_max" value using the "Advanced Editor" in "WHM >> Service Manager >> Exim Configuration Manager" to see if that helps.

    Thank you.
     
  6. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    I just found this
    smtp_accept_max simultaneous incoming connections
    smtp_accept_max_per_connection messages per connection
    smtp_accept_max_per_host connections from one host
    Then while trying your suggestion I see how to add these by choosing the dropdown it let me add the smtp_accept_max_per_connection so I set it. Now when I view the exim.conf I see both settings.

    Still not sure what the proper answer is for this trouble but will try it to see. I've asked one of the clients to monitor when sending next message to their parents.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page