next_inactive up previous


Removing Queued Mail

Zero Knowledge Systems Inc.

November 2000

Abstract:

This document shows the step to manually remove a message from the queue, but also shows how to use the mailRemove.py script to remove mail.


Contents

1 Removing a Mail Message from the Qmail Queue

To remove a Message from a Qmail queue requires a few basic steps. Once the message is located, it is just a matter of removing it from the different directories.


1.1 Locating the Message

To locate the message, there are different ways to do so:

  1. Use qmail-queue to see the list of message in the queue. From this the message number appears in the listing.
  2. Go in the queue/mess directory and do a grep -r {string} * as user root. This will show any messages with the 'string' in it.
Once the path to the message is known within the mess directory (this should be a number from 0 to 22) the message can now be removed from the system.

1.2 Removing a Message in the Queue

These steps all have to be done as user root. Once the step in section 1.1is done, these steps will remove the message from the queue:

  1. In the directory queue/mess/{sub_dir}1, do a ``rm {message_id}2''.
  2. In the directory queue/local/{sub_dir}, do a ``rm {message_id}''.
  3. In the directory queue/remote/{sub_dir}, do a ``rm {message_id}''.
  4. In the directory queue/info/{sub_dir}, do a ``rm {message_id}''.
  5. In the directory queue/intd/{sub_dir}, do a ``rm {message_id}''.
  6. In the directory queue/todo/{sub_dir}, do a ``rm {message_id}''.
Once these steps are followed, the message is removed from the queue and will not be delivered. One should notice that no notification will be sent to anyone that the message has been removed from the queue.

2 Removing Message from the Queue using the mailRemove.py script

Using this script, someone can remove mail for a message in the queue using any string within the message or by the id of the message in the queue. This script was written by Dru Nelson using the Python language.

2.1 Requirements for running mailRemove.py

To run the mailRemove.py script, some things are needed first:

  1. Must be run as root
  2. The filter directory must exists under the queue directory.
  3. Python 1.5.2 or above is needed.

2.2 Removing messages using mailRemove.py


2.2.1 Listing the messages to be removed before removing them

As user root, mailRemove.py can first be run to find either:

These steps will list any messages that will match the criteria given as arguments.

2.2.2 Removing the message

Once the list of messages listed from the steps in section 2.2.1 are checked to be the messages to be removed, the next step will actually remove the messages.

This will move all messages that match the criteria into the queue/filter directory. From there, all messages can be totally removed by doing a ``rm *''.

3 Cleaning the Queue using nukeQueue.sh

``nukeQueue.sh'' will wipe clean the queue when invoke as user root. It will go through all the queue directories and will remove all the messages contained within it.

3.1 Removing the messages

To remove the message, type:

nukeQueue.sh
This will come back with a message that the queue has been emptied. If the queue is listed for any messages, there are no messages left if no messages came in.

About this document ...

Removing Queued Mail

This document was generated using the LaTeX2HTML translator Version 99.2beta8 (1.43)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -no_subdir -split 0 -show_section_numbers Removing_Queued_Mail.tex

The translation was initiated by Serge Chevarie-Pelletier on 2000-12-15


Footnotes

... queue/mess/\{sub\_dir\}1
sub_dir is the dir number got from section 1.1
... \{message\_id\}2
message_id is taken from the id found in section 1.1

next_inactive up previous
Serge Chevarie-Pelletier 2000-12-15