Wesbytes Knowledge Base

Search our articles or browse by category below

How to Clean Exim Mail

Last modified: July 2, 2022
You are here:
Estimated reading time: 1 min

How to clean the Exim Mail Server Queue?

To flush the Exim queue, log in to the server using PuTTY and switch to the root user.

After that, type in the following command:

$ exim -qff

or

$ exim -qff -d9 (For more details)

Not Sure How to Show the Exim Mail Queue?

One of the many command-line options available for the Exim mail server is the ability to view the mail queue’s contents.

The command to execute in order to inspect the Exim mail queue is displayed below.

Command to view the queue:

Please issue this command

mailq

or

exim -bp

If your path does not include /usr/sbin and exim is located there, you must prefix the command with the entire path as follows:

/usr/sbin/exim -bp

Example Output:

The output from the above commands will look like this:

3d 1.2K 1Ka6u5-00032Z-Eb <[email protected][email protected]

66h 1.2K 1KaRH0-0007QZ-B5 <[email protected][email protected]

9h 22K 1KbLHr-0004ev-An <[email protected][email protected]

In the aforementioned illustration, the user sends emails from “[email protected]” and receives emails from “[email protected].” These would frequently be actual email addresses.

The 3d, 66h, and 9h values, respectively, show how long the email message has been in the queue. They stand for three days, 66 hours, and nine hours. The message size is also represented by the x.xK values.

Additionally, the 1Ka6u5-00032Z-Eb, etc., is both the message’s filename on disc and its message identification number. Both /var/spool/exim/msglog and /var/spool/exim/input have it. According to the Linux/Unix distribution and/or compiled-in settings, the folders may change, though.

Finding the files with the find command

The find command is provided below, which you may use to find all the necessary files:

find /var/spool/exim -name "1Ka6u5-00032Z-Eb*"

After you’ve given the command, it will then show something like this:

/var/spool/exim/msglog/1Ka6u5-00032Z-Eb
/var/spool/exim/input/1Ka6u5-00032Z-Eb-D
/var/spool/exim/input/1Ka6u5-00032Z-Eb-H
Was this article helpful?
Dislike 0
Views: 8