Skip to main content

Editing Send Mail Limits and /etc/email_send_limits File?

Comments

18 comments

  • vatra

    I did my own testing:

    1. cP accepts 1st and 2nd, but not the 3rd setting in the /var/cpanel/users/username file and preserves them after running /scripts/updateuserdomains or saving global settings from WHM UIs. So this is the best method to do per-domain tweaks for the 1st and 2nd settings.
    2. /etc/email_send_limits file reflects changes made from UIs and the /var/cpanel/users/username file. It preserves customizations until you edit them in UI or run /scripts/updateuserdomains.

    My only question is whether the 3rd setting will be applied to the actual domain from the manual edit in the /etc/email_send_limits file? Is email_send_limits the file that the server ultimately uses?

    0
  • vatra

    I think I found a bug. When changing a setting in WHM > Tweak Settings > Max hourly emails per domain, it doesn't get written to the /etc/email_send_limits file. The other (second) two settings do get written. I checked multiple times.

    *: 300,30,5
    0
  • vatra

    I just realized that the/etc/email_send_limits file gets overwritten anytime a subdomain or a domain gets created, when you save settings from the UI, or the /scripts/updateuserdomains gets run.

    So saving changes here for the MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION for a domain would be a maintenance hassle, and I still don't know if this is the ultimate file that the server considers for applying these three values.

    0
  • cPRex Jurassic Moderator

    With my testing I am only seeing global options for MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION, while the other two, MAX_EMAIL_PER_HOUR and MAX_DEFER_FAIL_PERCENTAGE have per-domain/package options.

    In general, we don't recommend editing any Exim files on the command line, as these often get written to multiple areas like local.conf files.

    0
  • vatra

    How to Set Email Send Limits | cPanel & WHM Documentation

    Take a look at the bottom of the page, you only document how to edit MAX_EMAIL_PER_HOUR per domain, but not the MAX_DEFER_FAIL_PERCENTAGE.

    1) Since this is a functionality, people are robbed of that info, so you might as well include it officially. I searched everywhere, and your docs never mention it.

    2) You might as well make it possible to edit MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION per domain as well.

    3) Still, when changing the Max hourly emails per domain setting in WHM > Tweak Settings, it doesn't get written to the /etc/email_send_limits file while the other do. You might want to check why that is.

    4) Can you confirm that /etc/email_send_limits is the actual end file used by Exim?

    0
  • cPRex Jurassic Moderator

    This makes sense - let me do some testing and I'll let you know!

    1
  • cPRex Jurassic Moderator

    I can confirm that /etc/email_send_limits is the correct file and used by cPanel/Exim to enforce those limits.  However, Tweak Settings is usually written to /var/cpanel/cpanel.config.

    Are you seeing something not work here how you're expecting?  I can make a feature request case to see if we can get MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION setup on a per-domain basis as well, but everything else is working correctly at this point, right?

    1
  • vatra

    Thank you Rex, I appreciate it! To structure my request a little bit better. There are 3 options at the moment:

    MAX_EMAIL_PER_HOUR - supported and documented
    MAX_DEFER_FAIL_PERCENTAGE - supported but NOT documented
    MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION - NOT supported and NOT documented

    By "supported", I mean available to set per domain via the cPanel account file.
    By "documented", I mean present on the following page.

    As for the issue that isn't working correctly: If you set the custom value for "Max hourly emails per domain" in Tweak Settings and save it, it doesn't get written to the /etc/email_send_limits file. The only way it does is if you make a change to any of the other options in Tweak Settings and then save.

    0
  • cPRex Jurassic Moderator

    Perfect - I'll play with this now and get back to you soon!

    1
  • cPRex Jurassic Moderator

    I'm having trouble reproducing the writing to the /etc/email_send_limits like how you are describing.  I changed the "max hourly" option and also changed the next value in the list "Number of emails a domain may send per day before the system sends a notification" but I'm still not seeing it write to the email_send_limits file.

    What value did you also change in Tweak Settings that triggered that on your end?

    There's definitely something up here that we need to fix.

    1
  • vatra

    1) Max hourly emails per domain only gets written to if /etc/email_send_limits I change any of these two:

    • Maximum percentage of failed or deferred messages a domain may send per hour
    • Number of failed or deferred messages a domain may send before protections can be triggered

    2) I tried what you did - change "Number of emails a domain may send per day before the system sends a notification" - and I got the same result.

    3) "Maximum percentage" and "Number of failed" options are written normally when saved on their own.

    4) I haven't tried other unrelated options to the email_send_limits file.

    0
  • cPRex Jurassic Moderator

    Ah - that makes sense!  Let me get a case written up and we'll go from there.

    1
  • vatra

    Great!

    0
  • cPRex Jurassic Moderator

    I've created case CPANEL-51547 to let the team know that the value isn't properly written to the /etc/email_send_limits file without other work in the interface.

    I've created case CPANEL-51548 to get “Number of failed or deferred messages a domain may send before protections can be triggered” configurable at the package or user level.

    Did we also need something for "Maximum percentage of failed or deferred messages a domain may send per hour" still?

    1
  • vatra

    Yes, we said "Maximum percentage of failed or deferred messages a domain may send per hour" to be added to the documentation, as well as “Number of failed or deferred messages a domain may send before protections can be triggered”, if it becomes an option.

    0
  • cPRex Jurassic Moderator

    DOCS-4010 created!

    1
  • vatra

    Is it possible to track the resolution on all of these somewhere?

    0
  • cPRex Jurassic Moderator

    Unfortunately no, but you can always poke me if you're wondering how a specific case is going!

    1

Please sign in to leave a comment.