Knowledgebase

Setting Up Cronjob to Kill Exim Mail Queue

Posted by kenbiz, 04-19-2009, 07:30 AM
Hi, Do anyone know how to setup hourly cronjob to kill exim mail queues on the cpanel server? I know this question may sounds a little tedious as I have tried to find an answer to this but still have no clue yet. Any helps from anyone would be gratefully appreciated. Regards, Kenny

Posted by serveradmin4u, 04-19-2009, 07:47 AM
But can I know why you want to do it ? You may clear the frozen mails using the command exim -bp | awk '/frozen/ {print $3 }'| xargs exim -Mrm Also what is the count of messages in queue ? You can find this using exim -bpc serveradmin4u

Posted by kenbiz, 04-19-2009, 08:00 AM
Hi serveradmin4u, Thanks for the tips. The reason i want to kill exim mail queues are due to heavy mail sending from one of the server I have, as you can see when the server mail sending limits been set to like 1200 per hour then if any user sent more than 1200 the rest of the mails will attempt to queue on the exim for retrying until it gets all delivered. Just wondering is that possible to set a cron to delete the mail queues on hour basis so that server will not be congested on mail transport. The current count on messages are like 9000 and sometimes it went to 5,000, this depends on the user sending mass mailing from their VB forum system. Any thought would be appreciated.

Posted by bear, 04-19-2009, 08:14 AM
If you have one or two sites that are hitting that limit and clogging the mail system, rather than deleting their mail () why not simply increase the per account limit? Assuming you're using Cpanel, you will need to SSH into your server and edit the file /var/cpanel/maxemails (which won't exist) and add domain=number pairs for those that you want to restrict/increase to a certain number of emails per hour, e.g: somedomain.com=100

Posted by ServerManagement, 04-19-2009, 08:19 AM
They should try sending it in small batches. Instead of sending all at once and wind up deleting half of them, try sending a few hundred per hour. That way they don't lose the mail and it eventually will get sent.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Is LiquidWeb down? (Views: 644)
VPS has been hacked (Views: 574)
prevent ddos ? (Views: 592)


Language:

Client Login

Email

Password

Remember Me

Search