Check and delete spam emails from Exim Queue in cPanel server

1. To check the number of emails present in the queue:

# exim -bpc

2. To check the emails present in the queue with the mail id and sender ID: 

# exim -bp
# exim -bp | less

3. To check the script that will originate spam mails:

# grep "cwd=" /var/log/exim_mainlog|awk '{for(i=1;i<=10;i++){print $i}}'|sort| uniq -c|grep cwd|sort -n

4. To check which user have sent number of emails.

# grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n

5. To delete Frozen emails from the email queue: 

# grep -R -l '*** Frozen' /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm 
# exim -bp| grep frozen | awk '{print $3}'| xargs exim -Mrm
# exiqgrep -z -i | xargs exim -Mrm

6. To delete Spam emails from the email queue:

# grep -R -l [SPAM] /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm

 

  • exim spam emails, exim queue, cpanel spam emails, cpanel exim
  • 0 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

How to access server via Remote Desktop (RDP)?

Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft, which provides a...

How to install Let’s Encrypt on CentOS 7 with Apache?

Today, we will show you, How to install Let’s Encrypt on CentOS 7 with Apache. Let’s Encrypt is a...

Domains are not showing in WHM -> List accounts

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

HOW TO INSTALL LITESPEED WEB SERVER IN LINUX SERVER?

Litespeed Cache is useful to increase high performance for your Wordpress Website. Following are...

Remove ONLY_FULL_GROUP_BY in my.cnf file

Remove ONLY_FULL_GROUP_BY in my.cnf file First you need to find my.cnf file location and then...