NAME

qqtool.pl - A tool for viewing and purging messages from a qmail queue


SYNOPSIS

Qmail Queue Tool (qqtool.pl)

This program will allow you to search and view messages in your qmail queue. It will also allow you to remove them, via expiration or deletion. It was written by Matt Simerson for the toaster users on mail-toaster@simerson.net

ChangeLog - http://www.tnpi.biz/internet/mail/qqtool/changelog.shtml


INSTALL

Download Mail::Toaster from http://www.tnpi.biz/internet/mail/toaster/Mail-Toaster.tar.gz

   fetch Mail-Toaster.tar.gz
   tar -xzf Mail-Toaster.tar.gz
   cd Mail-Toaster-x.xx
   perl Makefile.PL
   make install
   rehash

Run the script without any parameters and it will show you a menu of options.

   qqtool.pl

Sample Output

 # qqtool.pl
          Qmail Queue Tool   v 1.2
 .
   -a  action (delete, expire, list)
   -h  header to match (From, To, Subject, Date)
   -q  queue to search (local/remote)
   -s  search  (pattern to search for)
   -v  verbose

If no -h is specified, then the pattern is searched for in any header. If no -q is specified, then both queues are searched.

To list messages in queue from matt:

   ./Mail-Toaster/qqtool.pl -a list -s matt -h From

To list messages in queue with string ``foo'' in the headers:

   ./Mail-Toaster/qqtool.pl -a list -s foo

User Preferences

There are two settings you can alter:

  $qdir is the path to your qmail queue
  $qcontrol is your qmail-send control directory

If you aren't using the defaults (/var/qmail/queue, /service/send``), edit qqtool.pl and adjust those values.

Message Expiration

Expiring messages does not remove them from the queue. It merely alters their expiration time. The messages will be removed from the queue after qmail attempts to deliver them one last time.


AUTHOR

Matt Simerson <matt@tnpi.biz>


CREDITS

Idea based on mailRemove.py by Dru Nelson <dru@redwoodsoft.com>, ideas borrowed from qmHandle by Michele Beltrame <mick@io.com>

Community funding was contributed by the following mail-toaster@simerson.net mailing list subscribers:

 erik erik at microcontroller.nl (organizer)
 Rick Romero  rick at valeoinc.com
 Chris Eaton  Chris.Eaton at med.ge.com
 Marius Kirschner marius at agoron.com
 J. Vicente Carrasco carvay at teleline.es
 Chris Odell  chris at redstarnetworks.net
 Pat Hayes pat at pathayes.net
 Dixon Cole dixon at levee.net
 Randy Meyer rjmeyer at humbleguys.net
 kristian kristian at waveit.com
 Michael Andreasen michael at subwire.dk (beer)
 Nathan Nieblas nnieblas at microtosh.net
 Randy Jordan ctech at pcwarp.com


BUGS

Report any to author.


TODO

In list mode, when showing messages in the queue, show which addresses delivery has failed for, so you know exactly why a message is still in the queue (useful for mailing lists with many recipients)

Interactive mode - step through messages offering to delete/expire/skip each

Clean mode - Leave qmail down after stopping it, useful for multiple invocations

Write the messages into a ``inactive'' queue before deleting them.

Ability to restore messages from ``inactive'' to the real queue.


SEE ALSO

http://www.tnpi.biz/internet/mail/toaster/


COPYRIGHT

Copyright 2003, Matt Simerson. All Rights Reserved.