CQUEUE(1L)

NAME
cqueue - check sendmail queue for problems

SYNOPSIS

cqueue
    [ -abdms ] [ -q queue-dir ] [ -t time ] [ -u users ] [ -w width ]

DESCRIPTION
Reports on problems in the sendmail queue. With no options this simply means listing messages that have been in the queue longer than a default period along with a summary of queue mail by host and status message.

OPTIONS

-a  Report on all messages in the queue. This is equivalent to saying -t 0s. You may like this command so much that you use it as a replacement for mqueue. For example:

        alias mqueue cqueue -a

-b  Also report on bogus queue files. Those are files that have data files and no control files or vice versa.

-d  Print a detailed report of mail messages that have been queued longer than the specified or default time. Information that is presented includes:
        Sendmail queue identifier. Date the message was first queued. Sender of the message. One or more recipients of the message. An optional status of the message. This usually indicates why the message has not been delivered.

-m  Mail off the results if any problems were found. Normaly results are printed to stdout. If this option is specified they are mailed to one or more users. Results are not printed to stdout in this case. Results are only mailed if cqueue found something wrong.

-q queue-dir
    The sendmail mail queue directory. Default is /usr/spool/mqueue or some other site configured value.

-t time
    List messages that have been in the queue longer than time. Time should of the form:

        (<number>(s|m|h|d))+

    The second portion of the above definition specifies seconds, minutes, hours, or days, respectfully. The first portion is the number of those units. There can be any number of such specifiers. As an example, 1h30m means 1 hour and 30 minutes.

    The default is 2 hours.

-s  Print a summary of messages that have been queued longer than the specified or default time. Two separate types of summaries are printed. The first summarizes the queue messages by destination host. The host name is gleaned from the recipient addresses for each message. Thus the actual host names for this summary should be taken with a grain of salt since ruleset 0 has not been applied to the address the host was taken from nor were MX records consulted. It would be possible to add this; however, the execution time of the script would increase dramatically. The second summary is by status message.

-u users
    Specify list of users to send a mail report to other than the invoker. This option is only valid when -m has been specified. Multiple recipients may be separated by spaces.

-w width
    Specify the page width to which the output should tailored. width should be an integer representing some character position. The default is 80 or some other site configured value. Output is folded neatly to match width.

EXAMPLES
% date
Tue Jan 19 12:07:20 CST 1993
% cqueue -t 21h45m -w 70
Summary of messages in queue longer than 21:45:00 by destination
host:
   Number of
   Messages    Destination Host
   ---------   ----------------
   2           cigseg.rtsg.mot.com
   1           mnesouth.corp.mot.com
   ---------
   3
Summary of messages in queue longer than 21:45:00 by status message:
   Number of
   Messages    Status Message
   ---------   --------------
   1           Deferred: Connection refused by mnesouth.corp.mot.com
   2           Deferred: Host Name Lookup Failure
   ---------
   3
Detail of messages in queue longer than 21:45:00 sorted by creation
date:
   ID:        AA20573
   Date:      02:09:27 PM 01/18/93
   Sender:    melrose-place-owner@ferkel.ucsb.edu
   Recipient: pbaker@cigseg.rtsg.mot.com
   Status:    Deferred: Host Name Lookup Failure
   ID:        AA20757
   Date:      02:11:30 PM 01/18/93
   Sender:    90210-owner@ferkel.ucsb.edu
   Recipient: pbaker@cigseg.rtsg.mot.com
   Status:    Deferred: Host Name Lookup Failure
   ID:        AA21110
   Date:      02:17:01 PM 01/18/93
   Sender:    rd_lap_wg@mdd.comm.mot.com
   Recipient: jim_mathis@mnesouth.corp.mot.com
   Status:    Deferred: Connection refused by mnesouth.corp.mot.com

AUTHOR
Michael S. Muegel (mmuegel@mot.com)
UNIX Applications Startup Group
Corporate Information Office, Schaumburg, IL
Motorola, Inc.

COPYRIGHT NOTICE
Copyright 1993, Motorola, Inc.

Permission to use, copy, modify and distribute without charge this software, documentation, etc. is granted, provided that this comment and the author's name is retained. The author nor Motorola assume any responsibility for problems resulting from the use of this software.

SEE ALSO
sendmail(8)
Sendmail Installation and Operation Guide.