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