Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Configure connection_max_messages for SMTP connections?

Discussion in 'E-mail Discussions' started by ad682005, Jan 8, 2018.

  1. ad682005

    ad682005 Registered

    Joined:
    Jan 8, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    Hi,

    I have to rate limit emails from my server such that no more than 20 messages are sent per SMTP connection (Reference - help.yahoo.com/kb/establish-proper-smtp-connections-sln3433.html

    Search on internet resulted in finding that the parameter connection_max_messages needs to be configured in exim.conf file

    Firstly I am not sure where in exim.conf this configuration needs to be set.

    Some information that I figured out on internet suggests that it needs to be configured in the TRANSPORTSTART section as follows:
    (Refer - How to Edit the exim.conf File - cPanel Knowledge Base - cPanel Documentation)

    remote_smtp:
    driver = smtp
    connection_max_messages = 20
    <... whatever else follows...>

    dkim_remote_smtp:
    driver = smtp
    connection_max_messages = 20
    <... whatever else follows...>

    OK so I update the exim.conf file

    But here is the thing - If I now go to Advanced Editor under Exim Configuration on WHM - I do not see the connection_max_messages that I have actually added in exim.conf vis SSH login.

    WHM Advanced Editor does not allow that section to be edited

    My questions:
    a) Is connection_max_messages the right configuration for the Yahoo rate limit of messages per connection?

    b) If no - then what is?

    c) If yes, how do I change exim.conf? How do I ensure that WHM picks up the changes that I made directly to exim.conf?

    d) What is the correct format of updating exim.conf.local? The cpanel documentation suggests that the local file must be updated as well. But the local file has a strange structure and I do not know how to do this.

    Someone please help. There is not much information available on this.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,516
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I recommend first reverting any custom changes you made. Then, browse to "WHM Home » Service Configuration » Exim Configuration Manager » Advanced Editor" and scroll down until you see the "Add additional configuration setting" button. Click on this button, choose smtp_accept_max_per_connection from the drop-down box, and then enter "20" as the value. Finally, scroll to the very bottom of the interface and click on "Save". This should be the only change you need to make in order to follow the guideline referenced in the Yahoo URL you provided.

    Thank you.
     
  3. ad682005

    ad682005 Registered

    Joined:
    Jan 8, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    Thanks for your reply.
    I use a mass mailing system of acymailing.

    If I use smtp_accept_max_per_connection =20, then I get an SMTP 421 error. Which means acymailing is not even able to submit the message to exim queue.

    What I want is the acymailing continue to submit message to the exim queue & then when exim delivers the message - it should send no more than 20 in one SMTP connection. For sending more messages, EXIM to create more parallel connections that will send the messages over additional SMTP connections.

    How do I do that?
     
    #3 ad682005, Jan 10, 2018
    Last edited by a moderator: Jan 10, 2018
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,516
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Here's Exim's description of the smtp_accept_max_per_connection option:

    It seems like you may want to adjust the smtp_accept_queue_per_connection option instead:

    This option is found under "WHM Home » Service Configuration » Exim Configuration Manager » Advanced Editor" by default, so you can search for it and adjust it without using the "Add additional configuration setting" button.

    Thank you.
     
  5. ad682005

    ad682005 Registered

    Joined:
    Jan 8, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    A Follow through on this to report the changes that I did, my findings & finally how the matter got resolved.

    1) Removed the smtp_accept_max_per_connection configuration because that was giving errors even for submission of emails
    2) Set smtp_accept_queue_per_connection = 20 (instead of default value = 30)
    3) Set remote_max_parallel = 20 (instead of default value of 10)
    4) Set queue_run_max = 50 (not set by default)

    Even after these settings, yahoo kept reporting back temporarily deferred messages. The surprising thing was that my system had sent no more than 5 messages and yahoo would report this error and my emails to yahoo servers kept getting blocked. I had to submit a request to remove the block and then emails would get delivered.

    NEXT STEP
    1) Set connection_max_messages = 20 by directly updating exim.conf in the TRANSPORTSTART section
    2) Changed retry configuration for recipient domain = yahoo.com, yahoo.co.in, yahoo.co.uk, yahoo.co.au similar to as shown below
    yahoo.com mail_4xx F,4h,2h; G,2h,2h,1.5;
    yahoo.com rcpt_4xx F,4h,2h; G,2h,2h,1.5;
    This section change was done in the advanced editor of exim in cpanel

    Even after these settings, yahoo kept reporting back temporarily deferred messages. The surprising thing was that my system had sent no more than 5 messages and yahoo would report this error and my emails to yahoo servers kept getting blocked. I had to submit a request to remove the block and then emails would get delivered.

    After some time the service might have got restarted and hence the change that I had made directly in exim.conf (connection_max_messages = 20) was lost but the retry configuration changes made through the advanced editor was retained.

    NEXT STEP (AFTER WHICH ISSUE HAS NOT OCCURRED)

    I noticed that the messages that were getting blocked had a boxtrapper autowhitelist associated with it and for each message, there were 2 deliveries, 1 local to my server to report back to boxtrapper to autowhitelist & 1 to remote server. But the message was altered somehow and it had the boxtrapper autowhitelist notification against it.

    I disabled boxtrapper for the sender email address.

    After that my messages are getting delivered like a breeze to yahoo.

    If need be I can simulate enabling boxtrapper & checking whether the issue reoccurs. My guess is that once boxtrapper takes over for the message being sent out, it somehow changes the headers and that results in yahoo considering the message as possibly fraudulent and hence blocks it even after 5 emails. But without boxtrapper, my email message is considered as authentic & it passes all the authentication requirements.

    Hope this helps others.

    I would appreciate if someone with more expertise than me can investigate this further & come up with best practices notification. I realize it is not directly related to cpanel but the community which uses cpanel will be eternally grateful to having a final resolution for this rampant email delivery issue to yahoo (many people have reported this with few solutions).

    Thanks.
     
Loading...

Share This Page