How to Delete Exim Email For A Particular User From Mail Server Queue

Posted on in Categories , , , , , , last updated November 19, 2008

Q. I’m using Fedora 7 server with exim pre installed by someone else. How do I delete email for a particular user from exim queue (like [email protected])?

A. Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It is freely available under the GNU GPL and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.

Task: Delete Mail Linux Exim Server

To delete email for a particular user use shell pipes. By default the exim mail queue is located at /var/spool/exim/input directory. To delete email for a particular user called [email protected], enter:
# exiqgrep -ir [email protected] | xargs exim -Mrm
# exiqgrep -ir [email protected] | xargs exim -Mrm

Updated for accuracy.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

7 comment

  1. hi Good morning sir
    i have one doubt sir,
    we are using ubuntu mail server sir
    please help me ,my problem is how to delete perticular mail in all users account from server,
    what is the command,
    one spam mail coming from other side so that mail iwant to delete from all users account

    please reply sir

  2. Thanks for this, very useful after a user opted to get an email for a cron running every minute, which caused their Yahoo mail account to reject the messages and pile up in the queue!

Leave a Comment