| 1 | qmHandle 1.2.0-bovine |
|---|
| 2 | ===================== |
|---|
| 3 | |
|---|
| 4 | Copyright 1998-2003 Michele Beltrame |
|---|
| 5 | Patch Copyright 2004-2006 Robert McLeay |
|---|
| 6 | |
|---|
| 7 | INTRO |
|---|
| 8 | ----- |
|---|
| 9 | |
|---|
| 10 | This is a simple program that allows you to view and manage (withing some |
|---|
| 11 | limits) the qmail queue, both remote and local. |
|---|
| 12 | |
|---|
| 13 | With this program you can: |
|---|
| 14 | |
|---|
| 15 | * Read the qmail queue, like you do with the qmail-qread program. However, |
|---|
| 16 | the output of this program is improved over qmail-qread, with the output |
|---|
| 17 | of the message subjects and color capabilities. |
|---|
| 18 | * Print queue statistics, like qmail-qstat, with color capabilities |
|---|
| 19 | * View a message in the queue. |
|---|
| 20 | * Remove one or more messages from the queue. |
|---|
| 21 | * Force qmail to send queued messages immediately. |
|---|
| 22 | |
|---|
| 23 | ************************************************************************** |
|---|
| 24 | * NOTE: This is a patched version of qmHandle, not the official version. |
|---|
| 25 | It has been tested, and appears to work well, but use at your own |
|---|
| 26 | risk, like any GPL software. BIG thanks to Michael Beltrame for |
|---|
| 27 | creating such useful software! It's certainly saved me from all |
|---|
| 28 | sorts of problems before. |
|---|
| 29 | ************************************************************************** |
|---|
| 30 | |
|---|
| 31 | CONFIGURATION |
|---|
| 32 | ------------- |
|---|
| 33 | |
|---|
| 34 | There are only a few variables to configure, and this has to be done depending |
|---|
| 35 | on your system and qmail installation. You can find the variables at the top of |
|---|
| 36 | the Perl script qmHandle (there's a configuration section properly marked). |
|---|
| 37 | The variables are: |
|---|
| 38 | |
|---|
| 39 | 1) my ($queue) = '/var/qmail/queue/'; |
|---|
| 40 | This is the path of your qmail queue directory. It's located here on 99.9% |
|---|
| 41 | of qmail installation. If yours seems not to be there, try using the "find" |
|---|
| 42 | command to locate it. |
|---|
| 43 | |
|---|
| 44 | 2) my ($stopqmail) = '/etc/init.d/qmail stop'; |
|---|
| 45 | This is the name of the script/command which stops qmail. The one you |
|---|
| 46 | see works on Debian GNU/Linux, if you have other you need to change it. |
|---|
| 47 | In the script configuration section you'll find some examples of |
|---|
| 48 | common options, including the one using DJB's daemontools. If you |
|---|
| 49 | don't have any script to stop qmail, you *must leave this string |
|---|
| 50 | empty*: |
|---|
| 51 | $stopqmail = ''; |
|---|
| 52 | |
|---|
| 53 | 3) my ($startqmail) = "/etc/init.d/qmail start"; |
|---|
| 54 | This is the name of the script/command which stops qmail. The one you |
|---|
| 55 | see works on Debian GNU/Linux, if you have other you need to change it. |
|---|
| 56 | In the script configuration section you'll find some examples of |
|---|
| 57 | common options, including the one using DJB's daemontools and the |
|---|
| 58 | standard qmail distribution. |
|---|
| 59 | |
|---|
| 60 | 4) my ($pidcmd) = 'pidof qmail-send'; |
|---|
| 61 | This is the command used to obtain qmail process id. The default |
|---|
| 62 | should work on most Unix systems, but if on yours doesn't you can |
|---|
| 63 | change it. |
|---|
| 64 | |
|---|
| 65 | Please note that variables from 2 to 4 are only needed to set properly |
|---|
| 66 | if you need to use qmHandle to delete messages in the queue. The first |
|---|
| 67 | one is however needed in any case. |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | USAGE |
|---|
| 71 | ----- |
|---|
| 72 | |
|---|
| 73 | Usage is fairly simple. Here goes the help screen: |
|---|
| 74 | |
|---|
| 75 | Available parameters are: |
|---|
| 76 | -a : try to send all queued messages now (qmail must be running) |
|---|
| 77 | -l : list message queues |
|---|
| 78 | -L : list local message queue |
|---|
| 79 | -R : list remote message queue |
|---|
| 80 | -s : show some statistics |
|---|
| 81 | -vN : display message number N |
|---|
| 82 | -dN : delete message number N |
|---|
| 83 | -Stext : delete all messages that have/contain text as Subject |
|---|
| 84 | -D : delete all messages in the queue (local & remote) |
|---|
| 85 | -V : print program version |
|---|
| 86 | |
|---|
| 87 | Additional (optional) parameters are: |
|---|
| 88 | -c : display colored output |
|---|
| 89 | -N : list message numbers only |
|---|
| 90 | (to be used either with -l, -L or -R) |
|---|
| 91 | |
|---|
| 92 | It's possible to specify multiple parameters for multiple actions, in any |
|---|
| 93 | order. |
|---|
| 94 | |
|---|
| 95 | Please note that you'll have to be superuser (root) in order to use this |
|---|
| 96 | program. |
|---|
| 97 | |
|---|
| 98 | A typical output of the command: |
|---|
| 99 | |
|---|
| 100 | qmHandle -l |
|---|
| 101 | |
|---|
| 102 | could be: |
|---|
| 103 | |
|---|
| 104 | ------------------------------------------------- |
|---|
| 105 | 143874 (9, R) |
|---|
| 106 | Return-path: m.beltrame@betamag.com |
|---|
| 107 | From: Michele Beltrame <m.beltrame@betamag.com> |
|---|
| 108 | To: beta-reg@nice.it |
|---|
| 109 | Subject: Re: [beta-reg] Server news pubblico. |
|---|
| 110 | Date: Fri, 10 Apr 1998 09:04:32 +0200 |
|---|
| 111 | Size: 1600 bytes |
|---|
| 112 | ------------------------------------------------- |
|---|
| 113 | |
|---|
| 114 | The first line shows the number the message has in queue (the name of the |
|---|
| 115 | files in which it's stored) and, between parentheses, the directory number |
|---|
| 116 | where it's located and the queue he's in (L=local, R=remote). |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | GPL SOFTWARE |
|---|
| 120 | ------------ |
|---|
| 121 | |
|---|
| 122 | This is open source software under the GPL (see 'GPL' file included in the |
|---|
| 123 | distribution). For more information on the license have a look at: |
|---|
| 124 | |
|---|
| 125 | http://www.gnu.org |
|---|
| 126 | |
|---|
| 127 | For any problem, just drop an e-mail to mb@italpro.net. |
|---|
| 128 | |
|---|
| 129 | This project is a SourceForge.Net shared project. For more information visit: |
|---|
| 130 | |
|---|
| 131 | http://qmhandle.sourceforge.net/ |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | qmHandle history |
|---|
| 135 | (c) Michele Beltrame |
|---|
| 136 | Patch (c) Robert McLeay |
|---|
| 137 | -------------------- |
|---|
| 138 | |
|---|
| 139 | 1.2.0-bovine |
|---|
| 140 | * Ported patch from 1.1.1 to 1.2.0, allowing more deletion options. |
|---|
| 141 | |
|---|
| 142 | 1.2.0 |
|---|
| 143 | * CHANGED SWITCH NAME: "-m" is now used to view messages (no more "-v") |
|---|
| 144 | * Added "-V" switch to print program version |
|---|
| 145 | * Added switch to delete messages based on subject [thanks Arne Bernin] |
|---|
| 146 | * Included GPL licence in the distribution |
|---|
| 147 | * Now qmail is stopped only once for multiple deletions of messages, which |
|---|
| 148 | makes things a bit faster |
|---|
| 149 | * Corrected a bug which might have caused wrong messages to be deleted |
|---|
| 150 | * Corrected several minor bugs |
|---|
| 151 | |
|---|
| 152 | 1.1.1-bovine |
|---|
| 153 | * Created switch -M to delete all MAILER-DAEMON bounces. This is a bad |
|---|
| 154 | idea in general, but if you're Joe-jobbed, it's a lifesaver. |
|---|
| 155 | * Added -tX switch to allow deletion on more header options. |
|---|
| 156 | |
|---|
| 157 | 1.1.1 (July 10, 2003) |
|---|
| 158 | * Corrected a bug which caused the -a switch not not work. |
|---|
| 159 | |
|---|
| 160 | 1.1.0 (June 4, 2003) |
|---|
| 161 | * First release as a Sourceforge.Net community project... development |
|---|
| 162 | resumes!!! |
|---|
| 163 | * Added -a option to immediately send queued messages. |
|---|
| 164 | |
|---|
| 165 | 1.0.0 (December 17, 2001) |
|---|
| 166 | * Made several functional and stylish adjustments to the code. |
|---|
| 167 | [Thanks Mike Marseglia] |
|---|
| 168 | * Much better handling of start/stop: qmHandle now can use system scripts |
|---|
| 169 | or DBJ daemontools if they are available. Also, it won't restart qmail |
|---|
| 170 | if it wasn't running when qmHandle was called. |
|---|
| 171 | [Thanks Philippe Gay] |
|---|
| 172 | * Updated the documentation. |
|---|
| 173 | * Finally named it version 1.0.0!!! Seems pretty stable, well I hope |
|---|
| 174 | it is. ;-) |
|---|
| 175 | |
|---|
| 176 | 0.5.1 (July 23, 2001) |
|---|
| 177 | * Added a -D option which deletes al message in both local and remote queue. |
|---|
| 178 | [Thanks Kasper Holtze] |
|---|
| 179 | * Fixed a bug with the CC field when displaying message list. |
|---|
| 180 | [Thanks anonymous qmHandle user] |
|---|
| 181 | |
|---|
| 182 | 0.5.0 (May 11, 2001) |
|---|
| 183 | * Added syntax check on message numbers passed to -v and -d, so that qmHandle |
|---|
| 184 | does not stop qmail or lookup messages if the argument is not valid. |
|---|
| 185 | [Thanks Bertu Barnard] |
|---|
| 186 | * Formatted the code in a more "Perlish" way. |
|---|
| 187 | * Added display of "Cc" fields in message list (-l). |
|---|
| 188 | * Empty fields in message list -l are not shown anymore. |
|---|
| 189 | |
|---|
| 190 | 0.4.1 (October 22, 1999) [Thanks Franky Van Liedekerke]: |
|---|
| 191 | * Fixed a bug that caused messages in queue subdir "0" not to be |
|---|
| 192 | displayed. |
|---|
| 193 | |
|---|
| 194 | 0.4.0 (February 2, 1999) [Thanks Rob]: |
|---|
| 195 | * Added multiple paramters and actions support. |
|---|
| 196 | * Added a more condensed queue display option. |
|---|
| 197 | * The program now show statistics also when listing queues. |
|---|
| 198 | * Added $pidcmd configuration variable, which allows to customize the |
|---|
| 199 | command used to get qmail process id (needed when deleting messages). |
|---|
| 200 | |
|---|
| 201 | 0.3.0 (October 25, 1998): |
|---|
| 202 | * Fixed to support qmail 1.03. If you're using an older version, be |
|---|
| 203 | sure to change the $qmcmd variable if using previous version. |
|---|
| 204 | * Now when listing messages also message size is displayed. Thanks |
|---|
| 205 | to Jodok Sutterluety. |
|---|
| 206 | |
|---|
| 207 | 0.2.0 (May 18, 1998): |
|---|
| 208 | * Fixed (with Rob help) a major problem in message deletion: qmHandle now |
|---|
| 209 | terminates qmail before deleting a message, and restarts it after doing |
|---|
| 210 | it. |
|---|
| 211 | * Improved documentation in README file. |
|---|
| 212 | * Changed executable file name from qmHandle.pl to qmHandle. |
|---|
| 213 | |
|---|
| 214 | 0.1.0 (March 10, 1998): |
|---|
| 215 | * First release. |
|---|