qtool.8
上传用户:xu_441
上传日期:2007-01-04
资源大小:1640k
文件大小:5k
- ." Copyright (c) 1999 Sendmail, Inc. and its suppliers.
- ." 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.9 1999/08/26 00:04:10 cying Exp $
- ."
- .TH QTOOL 8 "July 12, 1999"
- .SH NAME
- .B qtool
- - manipulate sendmail queues
- .SH SYNOPSIS
- .B qtool.pl
- .RB [options]
- target_directory source [source ...]
- .PP
- .B qtool.pl [-d/-b]
- .RB [options]
- source [source ...]
- .SH DESCRIPTION
- .B Qtool
- moves the queue files used by sendmail between queues. It uses the same
- locking mechanism as sendmail so can be safely used while sendmail is
- running.
- .PP
- With no options,
- .B qtool
- will move any queue files as specified by fIsourcefP into
- fItarget_directoryfP. fISourcefP can be either an individual
- queue control file, a queue file id, or a queue directory.
- .PP
- If the -d option is specified, qtool will delete the messages specified by
- source instead of moving them.
- .PP
- If the -b option is specified, the selected messages will be bounced by
- running sendmail with the -OTimeout.queuereturn=now option.
- .SS Options
- .TP
- fB-bfP
- Bounce all of the messages specified by source. The messages will be bounced
- immediately. No attempt will be made to deliver the messages.
- .TP
- fB-dfP
- Delete all of the messages specified by source.
- .TP
- fB-efP fIperl_expressionfP
- Evalute fIperl_expressionfP for each queue file as specified
- by fIsourcefP. If fIperl_expressionfP evaluates to true, then that
- queue file is moved. See below for more detail on fIperl_expressionfP.
- .TP
- fB-sfP fIsecondsfP
- Move only the queue files specified by fIsourcefP that have a
- modification time older than fIsecondsfP.
- .SS Perl Expressions
- You can use any valid perl expression. Inside the expression you have
- access to a hash that contains many of the fields in the control file as
- well as some other data about that queued message. The hash is called
- fI%msgfP. If a field has multiple values (e.g. 'Recipient'), it will be
- returned as an array, otherwise it will be returned as a scalar. Through
- fI%msgfP, you can access the following variables:
- .TP
- fBauthfP
- AUTH= parameter.
- .TP
- fBbody_typefP
- Body type (fB8BITMIMEfP, fB7BITfP, or undefined).
- .TP
- fBbody_last_mod_timefP
- The last time the body was modified since the epoch in seconds.
- .TP
- fBbody_sizefP
- The size of the body file in bytes.
- .TP
- fBcharsetfP
- Character set (for future use).
- .TP
- fBcontent-lengthfP
- Content-Length: header value (Solaris sendmail only).
- .TP
- fBcontrolling_userfP
- The controlling user.
- .TP
- fBcontrol_last_mod_timefP
- The last time the body was modified since the epoch in seconds.
- .TP
- fBcontrol_sizefP
- The size of the control file in bytes.
- .TP
- fBcreation_timefP
- The time when the control file was created.
- .TP
- fBdata_file_namefP
- The data file name (deprecated).
- .TP
- fBenvidfP
- Original envelope id form ESMTP.
- .TP
- fBerror_recipientfP
- The error recipient (deprecated).
- .TP
- fBflagsfP
- Array of characters that can be the following values:
- .PD 0
- .RS +8
- .TP 8
- w
- warning message has been sent
- .TP 8
- r
- This is an error respone or DSN
- .TP 8
- 8
- has 8 bit data in body
- .TP 8
- b
- delete Bcc: headers
- .TP 8
- d
- envelope has DSN RET= parameter
- .TP 8
- n
- don't return body
- .PD
- .RE
- .TP
- fBheadersfP
- 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.
- .TP
- fBinode_numberfP
- The inode number for the data (body) file.
- .TP
- fBnext_delivery_timefP
- Earliest time of next delivery attempt.
- .TP
- fBnum_delivery_attemptsfP
- Number of delivery attempts that have been made.
- .TP
- fBmacrofP
- Defined macro.
- .TP
- fBmessagefP
- Envelope status message.
- .TP
- fBoriginal_recipientfP
- Original recipient (ORCPT= parameter).
- .TP
- fBpriorityfP
- Adjusted priority of message.
- .TP
- fBrecipientfP
- Array of character flags followed by colon and recipient name. Flags:
- .PD 0
- .RS +8
- .TP 8
- N
- Has NOTIFY= parameter.
- .TP 8
- S
- Success DSN requested.
- .TP 8
- F
- Failure DSN requested.
- .TP 8
- D
- Delay DSN requested.
- .TP 8
- P
- Primary address (not the result of alias/forward expansion).
- .PD
- .RE
- .TP
- fBsenderfP
- Sender
- .TP
- fBversionfP
- Version of control file.
- .SH EXAMPLES
- .TP
- fBqtool.pl q2 q1fP
- Moves all of the queue files in queue q1 to queue q2.
- .TP
- fBqtool.pl q2 q1/d6CLQh100847fP
- Moves the message with id d6CLQh100847 in queue q1 to queue q2.
- .TP
- fBqtool.pl q2 q1/qfd6CLQh100847fP
- Moves the message with id d6CLQh100847 in queue q1 to queue q2.
- .TP
- fBqtool.pl q2 q1/dfd6CLQh100847fP
- Moves the message with id d6CLQh100847 in queue q1 to queue q2.
- .TP
- fBqtool.pl -e '$msg{num_delivery_attempts} == 3' /q2 /q1fP
- Moves all of the queue files that have had three attempted deliveries from
- queue q1 to queue q2.
- .SH SEE ALSO
- sendmail(8)
- .SH HISTORY
- The
- .B qtool
- command appeared in
- sendmail 8.10.