                            qmHandle.pl v0.5.1
                            ==================

INTRO
-----

This is a simple program that allows you to view and manage (withing some
limits) the qmail queue, both remote and local.

With this program you can:

  * Read the qmail queue, like you do with the qmail-qread program. However,
    the output of this program is improved over qmail-qread, with the output
    of the message subjects and color capabilities.
  * Print queue statistics, like qmail-qstat, with color capabilities
  * View a message in the queue.
  * Remove a message from the queue.


CONFIGURATION
-------------

There are only two variables to configure, and this has to be done only if
your qmail installation has not been made using the default paths. You can
find the variables at the top of the Perl script qmHandle. They are:

	$queue = '/var/qmail/queue/';
        $qmcmd = "csh -cf '/var/qmail/rc &'";
	$pidcmd = 'pidof qmail-send';

In the first you should specify where you queue is located, in the second
you'll have to enter the name and parameters of the command you use to
start qmail (qmail-start, in most cases). This is needed because, when you
delete a message, qmail, if it is in execution, has to be terminated and then
restarted. If you're using qmail version < 1.03 you need to change it with:

	$qmcmd = '/var/qmail/bin/qmail-start ./Mailbox splogger qmail &';

If you installed qmail from a .deb or similiar package you should use
something like this instead:

	$qmcmd = '/etc/init.d/qmail start';

Remember to include the trailing slash in $queue variable.
The third variable contains the command used to obtain qmail process id
(needed when deleting messages). The default should work on most Unix
systems, but if on yours doesn't you can change it.


USAGE
-----

Usage is fairly simple. Here goes the help screen:

Available parameters are:
  -l   : list message queues
  -L   : list local message queue
  -R   : list remote message queue
  -s   : show some statistics
  -vN  : display message number N
  -dN  : delete message number N
  -dN  : delete all messages in the queue (local & remote)

Additional (optional) parameters are:
  -c  : display colored output
  -N  : list message numbers only
        (to be used either with -l, -L or -R)

It's possible to specify multiple parameters for multiple actions, in any
order.

Please note that you'll have to be superuser (root) in order to use this
program.

A typical output of the command:

	qmHandle -l

could be:

-------------------------------------------------
143874 (9, R)
  Return-path: m.beltrame@betamag.com
  From: Michele Beltrame <m.beltrame@betamag.com>
  To: beta-reg@nice.it
  Subject: Re: [beta-reg] Server news pubblico.
  Date: Fri, 10 Apr 1998 09:04:32 +0200
  Size: 1600 bytes
-------------------------------------------------

The first line shows the number the message has in queue (the name of the
files in which it's stored) and, between parentheses, the directory number
where it's located and the queue he's in (L=local, R=remote).


FREEWARE
--------

This software is freeware/GPL. Read the COPYRIGHT section for more information
about this. However, if you use it please send me and e-mail (mick@io.com),
so that I know how many people are using my software.
I like travelling, so I'd also appreciate a postcard, although is not required
by the license. ;-)
The address is:

	Michele Beltrame
	Via S. Francesco, 16
	33085 Maniago PN
	Italy


COPYRIGHT
---------

Copyright 1998, 2001 Michele Beltrame <mick@io.com>.  All Rights Reserved.

This program may be used and modified free of charge by anyone so long as 
the name of the author remains displayed at the top of the source. If you
are going to redistribute this program, you should include this README file
with it.

This program is under the GPL license, you can read it at:

http://www.gnu.org
