Software⏱️ 4 min read📅 2026-06-15

How to Fix error 421 Error – mail rejected with error 421 connection rate limit exceeded

Error 421 Connection rate limit exceeded in sendmail on Debian Jessie, solution to disable connection limit for certain domains.

Quick Answer: Check the /etc/sendmail.cf file and look for the 'conf CONNECTION_RATE_THROTTLE' and 'conf CONNECTION_RATE_WINDOW_SIZE' settings. You can modify these values or add a new setting to disable the rate limit for specific domains by recompiling sendmail with custom configuration.

The error 'Connection rate limit exceeded' (421) is a common issue in sendmail that occurs when an excessive number of connections are made to a mail server within a certain time frame. This can happen due to spam or abuse, and it prevents the mail from being delivered. The error message indicates that the connection rate limit has been exceeded for a specific IP address (x.x.x.x) on your Debian Jessie system.

This issue can be frustrating because it may prevent legitimate emails from reaching their intended recipients. Fortunately, there are steps you can take to resolve this problem and configure sendmail to allow certain hosts or domains to bypass the connection rate limit.

🛑 Root Causes of the Error

  • The primary reason for this error is that the default configuration of sendmail on Debian Jessie has a built-in connection rate limiting feature. This feature is designed to prevent abuse and spam by limiting the number of connections made to a mail server within a certain time frame.
  • An alternative cause could be that your system's IP address or network configuration is causing an excessive number of connections to be made to the mail server, leading to the connection rate limit being exceeded.

✅ Best Solutions to Fix It

Configuring sendmail to disable connection rate limiting for specific hosts

  1. Step 1: To configure sendmail to allow certain hosts or domains to bypass the connection rate limit, you need to add a 'check_relay' rule to your sendmail.cf file. This rule allows you to specify IP addresses or domains that are exempt from the connection rate limiting feature.
  2. Step 2: Edit the /etc/mail/sendmail.cf file using a text editor and add the following line: `DMAIL_RATESLIMIT_EXEMPT= x.x.x.x`, where x.x.x.x is the IP address of the host you want to exempt. You can also specify multiple hosts by separating them with commas (e.g., DMAIL_RATESLIMIT_EXEMPT= x.x.x.x, y.y.y.y).
  3. Step 3: After making this change, save and close the file. Then, restart the sendmail service using the command `sudo service sendmail restart` or `sudo systemctl restart sendmail`. This will apply the new configuration to your mail server.

Downgrading sendmail or recompiling with custom configuration

  1. Step 1: If you prefer not to modify the default configuration of sendmail, you can try downgrading to a previous version of sendmail that does not have this feature. However, please note that downgrading may also remove other features and security patches, so use this approach with caution.
  2. Step 2: Alternatively, you can recompile sendmail from source with a custom configuration file that disables the connection rate limiting feature for specific hosts. This requires some technical expertise and knowledge of sendmail's configuration options.

✨ Wrapping Up

To summarize, the 'Connection rate limit exceeded' error (421) on your Debian Jessie system is likely caused by the default connection rate limiting feature in sendmail. By configuring sendmail to exempt specific hosts or domains from this feature using a 'check_relay' rule, you can resolve this issue and allow legitimate emails to reach their intended recipients.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions