Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764
cpanel
cpanel

A few days ago I was having a hard time figuring out what is wrong with my mail server. From the top the command I saw that dovecot/lmtp

was eating up my all CPU and my default inbox from the cPanel is over-flooded with emails. They were created by cronjob (absurd!) and build a mail queue over 3 million emails. Then I have done some research and found a solution.

Always use

>/dev/null 2>&1

after your cron command. For example

php -q /home/user/public_html/cron.php > /dev/null 2>&1

Note: What it will do is, it will stop creating email notification on each corn run. Image if you have multiple cron which runs each minute and creating multiple emails in a minute. Imagine if you have 100 domains and 1000 cron. How many emails it can create in the Exim mail queue. Its unimaginable. My panel creates over 3 Million emails in the queue which is meant to be delivered.

Then Clear your mail queue. There are multiple ways to do it. But I live the below process because it's fast and can remove all those queues in seconds. Exim creates those email queues in /var/spool/exim folder.

cd /var/spool
mv exim exim.old
mkdir -p exim/input
mkdir -p exim/msglog
mkdir -p exim/db
chown -R mail:mail exim
/sbin/service exim restart

Another process is below command.

exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash

Its faster when you have small mail in the queue. But slower with millions of emails.

Previous articleSolved – Unable to Copy and Paste From Windows PC to Remote Desktop Session

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

LEAVE A REPLY
Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Please enter your comment!
Please enter your name here