Basic exim commands

1. REMOVE MAILS BY ID - /usr/sbin/exim -v -Mrm (MAIL ID HERE)

2. LIST QUEUED MAILS - 
/usr/sbin/exim -bp

3. LIST QUEUED MAILS COUNT - 
/usr/sbin/exim -bpc

4. REMOVE ALL MAILS - 
exiqgrep -i|xargs exim -Mrm

5. DELETE FROZEN MAILS - 
/usr/sbin/exim -bpr | grep '*** frozen ***' | awk '{print $3}' | xargs exim -Mrm

6. REMOVE <> MAILS FROM THE QUEUE - 
exim -bp | grep "<>"| awk '{system ("exim -Mrm "$3)}'

7. DELIVER FORCEFULLY EMAILS - 
/usr/sbin/exim -qff -v -C /etc/exim.conf &

8. FREEZE MAILS FROM SENDER - 
/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf

9. REMOVE MAILS FROM SENDER - 
/usr/sbin/exiqgrep -i -f abc@example.com | xargs exim -Mrm

10. FORCE DELIVERY OF ONE MESSAGE - 
exim -M email-id

11. FORCE ANOTHER QUEUE RUN - 
exim -qf

12. FORCE ANOTHER QUEUE RUN AND ATTEMPT TO FLUSH THE FROZEN MESSAGE - 
exim -qff

13. VIEW THE MESSAGE LOGS
 - exim -Mvl messageID

14. VIEW BODY OF THE MESSAGE - 
exim -Mvb messageID

15. VIEW HEADER OF THE MESSAGE - 
exim -Mvh messageID

16. NUMBER OF MAILS IN THE QUEUE - 
exim -bpr | grep "<" | wc -l

Was this answer helpful?

 Print this Article

Also Read

How to perform LAMP installation on CentOS?

LAMP stands for Linux, Apache, MySQL, and PHP. It is nothing but Linux operating system with...

Daily Useful Linux Commands

Finding the username from provided hosting service name - /script/whoowns domain_name Finding...

Disk Usage Useful Command

Note - You can replace /home with correct '/' drive on your server. 1. Checking the disk usage -...

How to backup and restore large MySQL databases using mysqldump?

1. Backup database:#mysqldump -u username -p[username_password] databasename >...

How to change the port number of Apache Web Server?

Default port to access the Apache is 80. Secure port for communicating with world for Apache is...