1 .\" Copyright (c) 1999 Sendmail, Inc. and its suppliers.
2 .\" All rights reserved.
4 .\" By using this file, you agree to the terms and conditions set
5 .\" forth in the LICENSE file which can be found at the top level of
6 .\" the sendmail distribution.
9 .\" $Id: qtool.8,v 8.9.16.2 2000/12/15 19:50:41 gshapiro Exp $
11 .\" Japanese Version Copyright (c) 2000-2002 Yuichi SATO
12 .\" all rights reserved.
13 .\" Translated Tue Nov 14 20:51:09 JST 2000
14 .\" by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
15 .\" Updated and Modified Thu Feb 15 03:19:13 JST 2001 by Yuichi SATO
16 .\" Updated and Modified Mon Jan 14 17:58:43 JST 2002
17 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
19 .TH QTOOL 8 "$Date: 2000/12/15 19:50:41 $"
23 .\"O \- manipulate sendmail queues
24 \- sendmail ¤Î¥¥å¡¼¤òÁàºî¤¹¤ë
29 target_directory source [source ...]
37 .\"O moves the queue files used by sendmail between queues. It uses the same
38 .\"O locking mechanism as sendmail so can be safely used while sendmail is
41 ¤Ï sendmail ¤¬»ÈÍѤ¹¤ë¥¥å¡¼¥Õ¥¡¥¤¥ë¤ò¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê´Ö¤Ç°ÜÆ°¤¹¤ë¡£
42 sendmail ¤ÈƱ¤¸¥í¥Ã¥¯µ¡¹½¤ò»È¤¦¤Î¤Ç¡¢
43 sendmail ¤¬²ÔƯ¤·¤Æ¤¤¤ë´Ö¤â°ÂÁ´¤Ë»ÈÍѤǤ¤ë¡£
47 .\"O will move any queue files as specified by \fIsource\fP into
48 .\"O \fItarget_directory\fP. \fISource\fP can be either an individual
49 .\"O queue control file, a queue file id, or a queue directory.
50 ¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
52 ¤Ï \fIsource\fP ¤Ç»ØÄꤵ¤ì¤¿Á´¤Æ¤Î¥¥å¡¼¥Õ¥¡¥¤¥ë¤ò
53 ¥Ç¥£¥ì¥¯¥È¥ê \fItarget_directory\fP ¤Ë°ÜÆ°¤¹¤ë¡£
54 \fIsource\fP ¤Ï¡¢¥¥å¡¼À©¸æ¥Õ¥¡¥¤¥ë¡¦¥¥å¡¼¥Õ¥¡¥¤¥ë¤Î ID¡¦
55 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê¤Î¤É¤ì¤Ç¤â¤è¤¤¡£
57 .\"O If the -d option is specified, qtool will delete the messages specified by
58 .\"O source instead of moving them.
59 -d ¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢qtool ¤Ï source ¤Ç»ØÄꤵ¤ì¤¿¥á¥Ã¥»¡¼¥¸¤ò
60 °ÜÆ°¤Ç¤Ï¤Ê¤¯ºï½ü¤¹¤ë¡£
62 .\"O If the -b option is specified, the selected messages will be bounced by
63 .\"O running sendmail with the -OTimeout.queuereturn=now option.
64 -b ¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢ÁªÂò¤µ¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ï
65 -OTimeout.queuereturn=now ¥ª¥×¥·¥ç¥ó¤ò¤Ä¤±¤¿ sendmail ¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ë¤è¤ê
66 ¥Ð¥¦¥ó¥¹¤µ¤ì¤ë (Á÷¿®¼Ô¤ËÁ÷¤êÊÖ¤µ¤ì¤ë)¡£
71 .\"O Bounce all of the messages specified by source. The messages will be bounced
72 .\"O immediately. No attempt will be made to deliver the messages.
73 source ¤Ç»ØÄꤵ¤ì¤¿Á´¤Æ¤Î¥á¥Ã¥»¡¼¥¸¤ò¥Ð¥¦¥ó¥¹¤¹¤ë¡£
74 ¥á¥Ã¥»¡¼¥¸¤Ï¤¹¤°¤Ë¥Ð¥¦¥ó¥¹¤µ¤ì¤ë¡£
75 ¥á¥Ã¥»¡¼¥¸¤ÎÇÛÁ÷¤ò»î¤ß¤Ê¤¤¡£
78 .\"O Specify the sendmail config file.
79 .\"O Defaults to /etc/mail/sendmail.cf.
80 sendmail ¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£
81 ¥Ç¥Õ¥©¥ë¥È¤Ï /etc/mail/sendmail.cf ¤Ç¤¢¤ë¡£
84 .\"O Delete all of the messages specified by source.
85 source ¤Ç»ØÄꤵ¤ì¤¿Á´¤Æ¤Î¥á¥Ã¥»¡¼¥¸¤òºï½ü¤¹¤ë¡£
87 \fB\-e\fP \fIperl_expression\fP
88 .\"O Evalute \fIperl_expression\fP for each queue file as specified
89 .\"O by \fIsource\fP. If \fIperl_expression\fP evaluates to true, then that
90 .\"O queue file is moved. See below for more detail on \fIperl_expression\fP.
91 \fIsource\fP ¤Ç»ØÄꤵ¤ì¤¿¥¥å¡¼¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¡¢
92 \fIperl_expression\fP ¤òɾ²Á¤¹¤ë¡£
93 \fIperl_expression\fP ¤¬¿¿¤Èɾ²Á¤µ¤ì¤¿¾ì¹ç¡¢¤½¤Î¥¥å¡¼¥Õ¥¡¥¤¥ë¤Ï°ÜÆ°¤µ¤ì¤ë¡£
94 \fIperl_expression\fP ¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢²¼µ¤ò»²¾È¤¹¤ë¤³¤È¡£
96 \fB\-s\fP \fIseconds\fP
97 .\"O Move only the queue files specified by \fIsource\fP that have a
98 .\"O modification time older than \fIseconds\fP.
99 \fIsource\fP ¤Ç»ØÄꤵ¤ì¤¿¥¥å¡¼¥Õ¥¡¥¤¥ë¤Î¤¦¤Á
100 ½¤Àµ»þ¹ï¤¬ \fIseconds\fP Éäè¤êÁ°¤Î¤â¤Î¤À¤±¤ò°ÜÆ°¤¹¤ë¡£
101 .\"O .SS Perl Expressions
103 .\"O You can use any valid perl expression. Inside the expression you have
104 .\"O access to a hash that contains many of the fields in the control file as
105 .\"O well as some other data about that queued message. The hash is called
106 .\"O \fI%msg\fP. If a field has multiple values (e.g. 'Recipient'), it will be
107 .\"O returned as an array, otherwise it will be returned as a scalar. Through
108 .\"O \fI%msg\fP, you can access the following variables:
109 ¤³¤Î¥×¥í¥°¥é¥à¤Ç¤Ï Perl ɽ¸½¤ò»È¤¦¤³¤È¤¬¤Ç¤¤ë¡£
110 Perl ɽ¸½¤ÎÃæ¤Ç¤Ï¡¢¥¥å¡¼¤ËÆþ¤ì¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Î¥Ç¡¼¥¿¤À¤±¤Ç¤Ê¤¯¡¢
111 À©¸æ¥Õ¥¡¥¤¥ë¤Î¥Õ¥£¡¼¥ë¥É¤ÎÆâÍƤò´Þ¤à¥Ï¥Ã¥·¥å¤Ë¤â¥¢¥¯¥»¥¹¤Ç¤¤ë¡£
112 ¥Ï¥Ã¥·¥å¤Ï \fI%msg\fP ¤È¤¤¤¦Ì¾Á°¤Ç¤¢¤ë¡£
113 ¥Õ¥£¡¼¥ë¥É¤ËÊ£¿ô¤ÎÃͤ¬¤¢¤ë ('Recipient' ¤Î¤è¤¦¤Ê) ¾ì¹ç¡¢
114 ÃͤÏÇÛÎó¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
115 Ãͤ¬ 1 ¤Ä¤Î¾ì¹ç¡¢Ãͤϥ¹¥«¥é¡¼¤ÇÊÖ¤µ¤ì¤ë¡£
116 ¥Ï¥Ã¥·¥å \fI%msg\fP ¤ò»È¤Ã¤Æ¡¢°Ê²¼¤ÎÃͤ˥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
119 .\"O AUTH= parameter.
123 .\"O Body type (\fB8BITMIME\fP, \fB7BIT\fP, or undefined).
124 ¥Ü¥Ç¥£¥¿¥¤¥× (\fB8BITMIME\fP, \fB7BIT\fP, ¤Þ¤¿¤Ï̤ÄêµÁ)¡£
126 \fBbody_last_mod_time\fP
127 .\"O The last time the body was modified since the epoch in seconds.
128 ¥Ü¥Ç¥£¤¬ºÇ¸å¤Ë½¤Àµ¤µ¤ì¤¿»þ¹ï¡£µª¸µÇ¯ (epoch) ¤«¤éÉÿô¤Çɽ¤¹¡£
131 .\"O The size of the body file in bytes.
132 ¥Ü¥Ç¥£¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º (¥Ð¥¤¥Èñ°Ì)¡£
135 .\"O Character set (for future use).
136 ʸ»ú¥»¥Ã¥È (¾Íè»ÈÍѤ¹¤ë¤¿¤á¤Ë¤¢¤ë)¡£
139 .\"O Content-Length: header value (Solaris sendmail only).
140 Content-Length: ¥Ø¥Ã¥À¡¼ÃÍ (Solaris ¤Î sendmail ¤Î¤ß)¡£
142 \fBcontrolling_user\fP
143 .\"O The controlling user.
144 À©¸æ¤·¤Æ¤¤¤ë¥æ¡¼¥¶¡¼¡£
146 \fBcontrol_last_mod_time\fP
147 .\"O The last time the body was modified since the epoch in seconds.
148 À©¸æ¥Õ¥¡¥¤¥ë¤¬ºÇ¸å¤Ë½¤Àµ¤µ¤ì¤¿»þ¹ï¡£µª¸µÇ¯ (epoch) ¤«¤éÉÿô¤Çɽ¤¹¡£
151 .\"O The size of the control file in bytes.
152 À©¸æ¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º (¥Ð¥¤¥Èñ°Ì)¡£
155 .\"O The time when the control file was created.
156 À©¸æ¥Õ¥¡¥¤¥ë¤¬À¸À®¤µ¤ì¤¿»þ¹ï¡£
159 .\"O The data file name (deprecated).
160 ¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë̾ (»È¤ï¤Ê¤¤Êý¤¬Îɤ¤)¡£
163 .\"O Original envelope id form ESMTP.
164 ESMTP ¤ÇÁ÷¤é¤ì¤Æ¤¤¿¥ª¥ê¥¸¥Ê¥ë¤Î¥¨¥ó¥Ù¥í¡¼¥×¤Î ID¡£
166 \fBerror_recipient\fP
167 .\"O The error recipient (deprecated).
168 ¥¨¥é¡¼¤Î¾ì¹ç¤Î¼õ¿®¼Ô (»È¤ï¤Ê¤¤Êý¤¬Îɤ¤)¡£
171 .\"O Array of characters that can be the following values:
172 °Ê²¼¤ÎÃͤò»ý¤Ä¤³¤È¤Ç¤¤ëʸ»úÇÛÎó¡£
177 .\"O warning message has been sent
178 ·Ù¹ð¥á¥Ã¥»¡¼¥¸¤¬Á÷¿®¤µ¤ì¤¿¡£
181 .\"O This is an error respone or DSN
182 ¥¨¥é¡¼±þÅú¡¢¤Þ¤¿¤Ï DSN¡£
185 .\"O has 8 bit data in body
186 ¥Ü¥Ç¥£¤Ë 8 ¥Ó¥Ã¥È¤Î¥Ç¡¼¥¿¤¬¤¢¤ë¡£
189 .\"O delete Bcc: headers
190 Bcc: ¥Ø¥Ã¥À¡¼¤òºï½ü¤¹¤ë¡£
193 .\"O envelope has DSN RET= parameter
194 ¥¨¥ó¥Ù¥í¡¼¥×¤Ë DSN RET= ¥Ñ¥é¥á¡¼¥¿¤¬¤¢¤ë¡£
197 .\"O don't return body
203 .\"O This is a Perl hash where the keys are rfc822 field names and the values
204 .\"O are rfc822 field values. If a field has only one value it will be returned
205 .\"O as a string. If a field has more than one value (e.g. 'Received') it will
206 .\"O be returned as a list of strings.
207 ¤³¤ì¤Ï Perl ¤Î¥Ï¥Ã¥·¥å¤Ç¡¢rfc822 ¥Õ¥£¡¼¥ë¥É̾¤ò¥¡¼¡¢
208 rfc822 ¥Õ¥£¡¼¥ë¥ÉÃͤòÃͤˤ·¤Æ¤¤¤ë¡£
209 ¥Õ¥£¡¼¥ë¥É¤Ë 1 ¤Ä¤·¤«Ãͤ¬¤Ê¤¤¾ì¹ç¡¢ÃͤÏʸ»úÎó¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
210 ('Received' ¤Î¤è¤¦¤Ë) ¥Õ¥£¡¼¥ë¥É¤Ë 2 ¤Ä°Ê¾å¤ÎÃͤ¬¤¢¤ë¾ì¹ç¡¢
211 ÃͤÏʸ»úÎó¤Î¥ê¥¹¥È¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
214 .\"O The inode number for the data (body) file.
215 ¥Ç¡¼¥¿ (¥Ü¥Ç¥£) ¥Õ¥¡¥¤¥ë¤Î i ¥Î¡¼¥ÉÈֹ档
217 \fBnext_delivery_time\fP
218 .\"O Earliest time of next delivery attempt.
219 ¼¡¤ÎÇÛÁ÷¤¬»î¤ß¤é¤ì¤ëºÇ¤âÁᤤ»þ¹ï¡£
221 \fBnum_delivery_attempts\fP
222 .\"O Number of delivery attempts that have been made.
230 .\"O Envelope status message.
231 ¥¨¥ó¥Ù¥í¡¼¥×¾õÂ֤Υá¥Ã¥»¡¼¥¸¡£
233 \fBoriginal_recipient\fP
234 .\"O Original recipient (ORCPT= parameter).
235 ËÜÍè¤Î¼õ¿®¼Ô (ORCPT= ¥Ñ¥é¥á¡¼¥¿)¡£
238 .\"O Adjusted priority of message.
239 Êѹ¹¤µ¤ì¤¿¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¡£
242 .\"O Array of character flags followed by colon and recipient name. Flags:
243 ¥³¥í¥ó¤È¼õ¿®¼Ô̾¤¬¸å¤Ë³¤¯Ê¸»ú¥Õ¥é¥°¤ÎÇÛÎ󡣥ե饰¤ò°Ê²¼¤Ë¼¨¤¹¡£
248 .\"O Has NOTIFY= parameter.
249 NOTIFY= ¥Ñ¥é¥á¡¼¥¿¤¬¤¢¤ë¡£
252 .\"O Success DSN requested.
253 Í׵ᤷ¤¿ DSN ¤¬À®¸ù¤·¤¿¡£
256 .\"O Failure DSN requested.
257 Í׵ᤷ¤¿ DSN ¤¬¼ºÇÔ¤·¤¿¡£
260 .\"O Delay DSN requested.
261 Í׵ᤷ¤¿ DSN ¤¬ÃÙ¤ì¤Æ¤¤¤ë¡£
264 .\"O Primary address (not the result of alias/forward expansion).
265 (alias ¤Þ¤¿¤Ï forward ¤ÇŸ³«¤µ¤ì¤ëÁ°¤Î) ¸µ¡¹¤Î¥¢¥É¥ì¥¹¡£
274 .\"O Version of control file.
275 À©¸æ¥Õ¥¡¥¤¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¡£
280 .\"O Moves all of the queue files in queue q1 to queue q2.
281 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q1 ¤Ë¤¢¤ë¥¥å¡¼¥Õ¥¡¥¤¥ë¤ò
282 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q2 ¤Ë°ÜÆ°¤¹¤ë¡£
284 \fBqtool.pl q2 q1/d6CLQh100847\fP
285 .\"O Moves the message with id d6CLQh100847 in queue q1 to queue q2.
286 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q1 ¤Ë¤¢¤ë ID ¤¬ d6CLQh100847 ¤Î¥á¥Ã¥»¡¼¥¸¤ò
287 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q2 ¤Ë°ÜÆ°¤¹¤ë¡£
289 \fBqtool.pl q2 q1/qfd6CLQh100847\fP
290 .\"O Moves the message with id d6CLQh100847 in queue q1 to queue q2.
291 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q1 ¤Ë¤¢¤ë ID ¤¬ d6CLQh100847 ¤Î¥á¥Ã¥»¡¼¥¸¤ò
292 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q2 ¤Ë°ÜÆ°¤¹¤ë¡£
294 \fBqtool.pl -e '$msg{num_delivery_attempts} == 3' /q2 /q1\fP
295 .\"O Moves all of the queue files that have had three attempted deliveries from
296 .\"O queue q1 to queue q2.
297 º£¤Þ¤Ç¤Ë 3 ²óÇÛÁ÷¤¬»î¤ß¤é¤ì¤¿Á´¤Æ¤Î¥¥å¡¼¥Õ¥¡¥¤¥ë¤ò
298 ¥¥å¡¼¥Ç¥£¥ì¥¯¥È¥ê q1 ¤«¤é q2 ¤Ë°ÜÆ°¤¹¤ë¡£
301 .\"O In sendmail 8.12, it is possible for a message's qf and df files
302 .\"O to be stored in different queues.
303 .\"O In this situation, you must give qtool the pathname of the qf file,
304 .\"O not of the df file.
305 .\"O To be safe, never feed qtool the pathname of a df file.
306 sendmail 8.12 ¤Ç¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤Î qf ¥Õ¥¡¥¤¥ë¤È df ¥Õ¥¡¥¤¥ë¤ò
307 ÊÌ¡¹¤Î¥¥å¡¼¤Ë³ÊǼ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
308 ¤³¤Î¾ì¹ç¡¢qtool ¤Ë¤Ï df ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾¤Ç¤Ï¤Ê¤¯¡¢
309 qf ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
310 °ÂÁ´¤Î¤¿¤á¡¢ÀäÂÐ¤Ë qtool ¤Ë df ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾¤ò»ØÄꤷ¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
318 .\"O command appeared in