How to stop Bulk mailing via WHM Root for the error *Exceeded LOCALRELAY limit* from XYZuser (101 in the last hour)
In order to fix this issue you first need to know what is the cause behind this issue and why this message gets displayed.
So let me explain you there is a Firewall setting in WHM to specify the maximum no. of emails that each domain can send per hour hence when any account has reached their limit of sending mails and have exceeded the limit then this error *Exceeded LOCALRELAY limit* from XYZuser (101 in the last hour) occurs.
You can check this error from your WHM by going inside Firewall option and clicking on Watch System Log.
How to Fix *Exceeded LOCALRELAY limit* from XYZuser (101 in the last hour)
To fix this issue you need to follow few steps:
Login to your WHM(Root)
Go to Server Configuration
Click on Tweak settings
Now click on the Mail section
Now Specify “Max hourly emails per domain” and “Number of emails a domain may send per day” as per your wish.
Click on Save changes.
Now let me tell you about these settings:
Max hourly emails per domain
This setting specifies the maximum number of emails that each domain can send per hour.
Number of emails a domain may send per day before the system sends a notification.
This setting specifies the number of emails per day that a domain can send before the system sends a notification.
Now after doing all these settings suppose you set the EXCEEDED LOCALRELAY alert at 100 and you are going to receive that alert or any account that has reached that limit.
Now moving ahead to stop the misuse you have to edit csf.conf file which is located at /etc/csf/csf.conf
To go to this Path you need find ConfigServer Explorer in your WHM
Then you have to enter etc>>csf>>csf.conf
Edit this csf.conf file and search for RT_Action
Then write /etc/csf/rt.sh after RT_ACTION in between the inverted commas.
This command will stop the exim services in the whole server. You can now find and block the user who is sending bulk mails. After getting done you can again restart the exim service from the following command:
mv /usr/sbin/exim_suspend /usr/sbin/exim
mv /usr/sbin/sendmail_suspended /usr/sbin/sendmail
service exim restart
We hope this article was clear enough to make you understand how to fix *Exceeded LOCALRELAY limit* from XYZuser (101 in the last hour) error via WHM(root)
If you have any questions or queries, feel free to leave them in the comments section below.