Service: zimbraAdmin

Command: GetMailQueue
Namespace: urn:zimbraAdmin
Description: Summarize and/or search a particular mail queue on a particular server.
The admin SOAP server initiates a MTA queue scan (via ssh) and then caches the result of the queue scan. To force a queue scan, specify scan=1 in the request.
The response has two parts. The stale-flag in the response means that since the scan, some queue action was done and the data being presented is now stale. This allows us to let the user dictate when to do a queue scan.

The scan-flag in the response indicates that the server has not completed scanning the MTA queue, and that this scan is in progress, and the client should ask again in a little while.

The more-flag in the response indicates that more qi's are available past the limit specified in the request.
Properties:
Authorization token required true
Admin Authorization token required true

GetMailQueueRequest

    <GetMailQueueRequest> ## GetMailQueueRequest
        <server name="{mta-server}"> ## ServerMailQueueQuery
            <queue name="{queue-name}" [scan="{do-scan-flag} (0|1)"] [wait="{max-wait-seconds} (Long)"]> ## MailQueueQuery
                <query [offset="{offset} (Integer)"] [limit="{limit} (Integer)"]> ## QueueQuery
                    (<field name="{field-name}"> ## QueueQueryField
                        (<match value="{value}" /> ## ValueAttrib)*
                      </field>)*
                </query>
            </queue>
        </server>
    </GetMailQueueRequest>

elements and attributes you can define within a <GetMailQueueRequest> element:

XPath Required / Optional Description
/server Required (only 1) Server Mail Queue Query
/server@name Required (only 1) Type: String
MTA Server
/server/queue Required (only 1) Mail queue query details
/server/queue@name Required (only 1) Type: String
Queue name
/server/queue@scan Optional (0 or 1) Type: 0|1
To fora a queue scan, set this to 1 (true)
/server/queue@wait Optional (0 or 1) Type: Long
Maximum time to wait for the scan to complete in seconds (default 3)
/server/queue/query Required (only 1) Query
/server/queue/query@offset Optional (0 or 1) Type: Integer
Offset
/server/queue/query@limit Optional (0 or 1) Type: Integer
Limit the number of queue items to return in the response
/server/queue/query/field Optional (0 or more) Queue query field
/server/queue/query/field@name Required (only 1) Type: String
Field name
/server/queue/query/field/match Optional (0 or more) Match specification
/server/queue/query/field/match@value Required (only 1) Type: String
Value

GetMailQueueResponse

    <GetMailQueueResponse> ## GetMailQueueResponse
        <server name="{mta-server}"> ## ServerMailQueueDetails
            <queue name="{queue-name}" time="{scan-time} (long)" scan="{scan-flag} (0|1)"
                      total="{mail-queue-detail-total} (int)" more="{more-flag} (0|1)"> ## MailQueueDetails
                (<qs type="{reason|to|from|todomain|fromdomain|addr|host}"> ## QueueSummary
                    (<qsi n="{q-summ-count} (int)" t="{text-for-item}" /> ## QueueSummaryItem)+
                  </qs>)*
                (<qi id="{id}" time="{arrival-time}" fromdomain="{fromdomain}" size="{size}" from="{sender}"
                         to="{recipients-comma-separated}" host="{origin-host-name}" addr="{origin-ip-address}"
                         reason="{reason}" filter="{content-filter}" todomain="{todomain}" received="{received}" /> ## QueueItem)*
            </queue>
        </server>
    </GetMailQueueResponse>

elements and attributes you can define within a <GetMailQueueResponse> element:

XPath Required / Optional Description
/server Required (only 1) Server Mail Queue details
/server@name Required (only 1) Type: String
MTA Server
/server/queue Required (only 1) Mail queue details
/server/queue@name Required (only 1) Type: String
Queue name
/server/queue@time Required (only 1) Type: long
Scan time
/server/queue@scan Required (only 1) Type: 0|1
Indicates that the server has not completed scanning the MTA queue, and that this scan is in progress, and the client should ask again in a little while.
/server/queue@total Required (only 1) Type: int
/server/queue@more Required (only 1) Type: 0|1
Indicates that more qi's are available past the limit specified in the request.
/server/queue/qs Optional (0 or more) Queue summary. The <qs> elements summarize the queue by various types of data (sender addresses, recipient domain, etc). Only the deferred queue has error summary type.
/server/queue/qs@type Required (only 1) Type: String
Queue summary type - reason|to|from|todomain|fromdomain|addr|host
/server/queue/qs/qsi Required (1 or more) Queue summary items
/server/queue/qs/qsi@n Required (only 1) Type: int
Count
/server/queue/qs/qsi@t Required (only 1) Type: String
Text for item. e.g. "connect to 10.10.20.40 failed"
/server/queue/qi Optional (0 or more) The various queue items that match the requested query.
/server/queue/qi@id Required (only 1) Type: String
ID
/server/queue/qi@time Required (only 1) Type: String
Arrival time
/server/queue/qi@fromdomain Required (only 1) Type: String
From domain
/server/queue/qi@size Required (only 1) Type: String
Size
/server/queue/qi@from Required (only 1) Type: String
Sender
/server/queue/qi@to Required (only 1) Type: String
Comma separated list of recipients
/server/queue/qi@host Required (only 1) Type: String
Hostname of origin
/server/queue/qi@addr Required (only 1) Type: String
IP address of origin
/server/queue/qi@reason Required (only 1) Type: String
Reason
/server/queue/qi@filter Required (only 1) Type: String
Content filter
/server/queue/qi@todomain Required (only 1) Type: String
To domain
/server/queue/qi@received Required (only 1) Type: String
IP address message received from