You can set a custom message limit for your entire account within the Settings of the Mailgun Control Panel. When the custom message limit is reached, the account will be disabled until you choose to re-enable the account. When an account is disabled, sending will be halted, but the dashboard and its functionality will still be accessible.
Note: It is not possible within Mailgun to configure custom message limits for individual domains.
Note: At this time, messages sent from domains in the EU region will not count towards the custom message limit. We are currently working to bring this feature to the EU region.
Understanding The Context
Setting The Scene
Most of us probably are at least a little concerned about out-of-control sending - such as due to a coding loop or a malicious actor attempting to use a contact form to send as much spam as possible before being noticed - so it's only natural to desire some way to limit such possibilities.
The good news is that Mailgun offers a custom message limit that is configured at the account level. Once configured, if the total messages sent by all US domains on the account reach the specified limit, the account will be disabled. While disabled, you can review logs and statistics to determine if reaching the limit was expected or unexpected. In either case, you maintain control over the account, which means you can re-enable it when ready. However, keep in mind that if you do not enable the account before the start of a new calendar month, the account will automatically re-enable.
When an account is disabled for reaching the custom message limit, the primary account owner will receive an email alert from Mailgun informing them of the disablement. Moreover, the primary account owner is also notified when 50% and 75% of the limit have been reached.
Discerning The Nuance
The custom message limit applies to all messages sent during the billing cycle which begins on the first day of the month and ends on the last day of the month. Any sending that was conducted during the month before the limit was set will already be applied to the custom message limit message count. The custom message limit counter will reset to zero at the beginning of each month.
As an example, let's say your account has sent 4,000 messages as of the middle of March, and you have just set a custom message limit at 5,000. The count will start at 4,000. If the account sends another 1,000 messages, the account will reach the custom message limit and be disabled.
Finally, as mentioned above, the custom message limit is an account-level feature; as such, it cannot be configured for domains and will disable the whole account.
Things To Be Aware Of
This is a great tool to have, but keep in mind that there is a slight delay before the disablement occurs due to processing speed. For example, if a custom message limit set at 1,000 was exceeded, you may not see the disablement occur until 1,015 messages were processed. This delay is an inconsistent value that can not be calculated.
When enabling the account after a custom message limit disablement, the account will immediately be ready again for sending. However, the banner will not instantly go away. Both a little bit of time and a refresh will be needed to clear the banner and regain the ability to reset the custom message limit.
Implementing The Solution
We'll show you how to do this below:
- First, log in to the Mailgun Control Panel (if you have not already done so).
- Then, at the top-right corner of the page, click the Profile drop-down menu to expand its list of options.
- Next, click the Account option. Alternatively, you can use this direct link.
- On the resulting page in the Account settings section, locate the Custom message limit setting.
- Upon clicking the Edit button, enter the numerical value for the desired message limit and click the Save button.
Enabling The Account
To enable the account after a custom message limit disablement, you would go to the same location as mentioned in "Implementing the Solution". Here, you will click the green button to remove the disablement and the custom message limit.
Sinch Mailgun has answers! If you have any concerns or questions, please send us a Support ticket using the Support page within your Mailgun Control Panel. Our Support Team will be happy to assist!