All rights reserved.
By using this file, you agree to the terms and conditions set
forth in the LICENSE file which can be found at the top level of
the sendmail distribution.
$Id: qtool.8,v 8.21 2013-11-22 20:51:18 ca Exp $
qtool.pl [-Q][-d|-b] [options] source [source ...]
With no options, qtool will move any queue files as specified by source into target_directory. Source can be either an individual queue control file, a queue file id, or a queue directory.
If the -d option is specified, qtool will delete the messages specified by source instead of moving them.
If the -b option is specified, the selected messages will be bounced by running sendmail with the -OTimeout.queuereturn=now option.
-b Bounce all of the messages specified by source. The messages will be bounced immediately. No attempt will be made to deliver the messages.
-C configfile Specify the sendmail config file. Defaults to /etc/mail/sendmail.cf.
-d Delete all of the messages specified by source.
-e perl_expression Evaluate perl_expression for each queue file as specified by source. If perl_expression evaluates to true, then that queue file is moved. See below for more detail on perl_expression.
-Q Operate on quarantined items (queue control file begins with hf instead of qf).
-s seconds Move only the queue files specified by source that have a modification time older than seconds.
auth AUTH= parameter.
body_type Body type (8BITMIME, 7BIT, or undefined).
body_last_mod_time The last time the body was modified since the epoch in seconds.
body_size The size of the body file in bytes.
content-length Content-Length: header value (Solaris sendmail only).
controlling_user The controlling user.
control_last_mod_time The last time the control file was modified since the epoch in seconds.
control_size The size of the control file in bytes.
creation_time The time when the control file was created.
data_file_name The data file name (deprecated).
deliver_by Deliver by flag and deadline for DELIVERBY ESMTP extension.
envid Original envelope id form ESMTP.
error_recipient The error recipient (deprecated).
final_recipient Final recipient (for DSNs).
flags Array of characters that can be the following values:
0
8 w warning message has been sent
8 r This is an error response or DSN
8 8 has 8 bit data in body
8 b delete Bcc: headers
8 d envelope has DSN RET= parameter
8 n don't return body
headers This is a Perl hash where the keys are rfc822 field names and the values are rfc822 field values. If a field has only one value it will be returned as a string. If a field has more than one value (e.g. 'Received') it will be returned as a list of strings.
inode_number The inode number for the data (body) file.
next_delivery_time Earliest time of next delivery attempt.
num_delivery_attempts Number of delivery attempts that have been made.
macro Defined macro.
message Envelope status message.
original_recipient Original recipient (ORCPT= parameter).
priority Adjusted priority of message.
quarantine_reason Quarantine reason for quarantined (held) envelopes.
recipient Array of character flags followed by colon and recipient name. Flags:
0
8 N Has NOTIFY= parameter.
8 S Success DSN requested.
8 F Failure DSN requested.
8 D Delay DSN requested.
8 P Primary address (not the result of alias/forward expansion).
sender Sender
version Version of control file.
qtool.pl q2 q1 Moves all of the queue files in queue q1 to queue q2.
qtool.pl q2 q1/d6CLQh100847 Moves the message with id d6CLQh100847 in queue q1 to queue q2.
qtool.pl q2 q1/qfd6CLQh100847 Moves the message with id d6CLQh100847 in queue q1 to queue q2.
qtool.pl -e '$msg{num_delivery_attempts} == 3' /q2 /q1 Moves all of the queue files that have had three attempted deliveries from queue q1 to queue q2.