API operation · mail group
GET
/mail/greylist
First published 19 Nov 2026
0.2.30Unchanged since publicationList messages deferred by greylisting
Who may call it
AdministratorResellerCustomer
Token scope, any of
mailreadallAnswers200 OK
Returns a page of messages in greylist, ordered by most recent delivery attempt first. Greylisting defers suspicious mail. Each message appears from its first deferral and remains listed for as long as Rspamd remembers it.
Each entry includes the sending server's IP address and its verified name if available, the sender and recipients, the first and last deferral times, the number of deferrals, when a retry can pass and when a retry passed if one has. The response counts text matches by state before applying the state filter or pagination.
The API returns 400 for an invalid match or state, or when limit or offset fails integer validation. Requires an administrator token with the mail scope.
As a command
Run as root on the serverParameters
matchquery ·string, up to 200 charactersSubstring to match in the sender or recipient email addresses, the sending server's IP address or its name. Accepts up to 200 characters with no control characters.
statequery ·string, one of waiting, ready, let_through, passedState to include. Use waiting if a retry would still be deferred, ready if the next retry can pass, let_through if the message was released manually and awaits a retry, or passed if a retry passed greylisting.
limitquery ·integer, 1 to 1000Maximum number of messages to return, from 1 to 1000. Defaults to 200.
offsetquery ·integer, 0 to 1000000Number of matching messages to skip, from 0 to 1,000,000.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X GET "$API/mail/greylist?match=text&state=waiting&limit=1&offset=1" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"greylist": {
"available": 1,
"error": "Domain 'example.com' already exists",
"held": [
{
"dkim": [
"text"
],
"first_at": "text",
"host": "text",
"id": 1,
"ip": "203.0.113.7",
"last_at": "text",
"let_through_at": "text",
"passed_at": "text",
"passes_from": "text",
"recipients": [
"text"
],
"sender": "text",
"sender_domain": "text",
"spf": 1,
"state": "waiting",
"tries": 1,
"verified_by": [
"spf"
]
}
],
"read_at": "text",
"states": {
"let_through": 1,
"passed": 1,
"ready": 1,
"waiting": 1
},
"total": 1,
"waiting": 1
}
}Errors
9 errors, each a status and a sentence400--<k> is a whole number up to <max>400--match is text without control characters, 200 characters at most400--state is waiting, ready, let_through or passed400<what> must be a whole number from 0 to <max>400<what> must be text without control characters, 1 to <max> characters400state is one of: 400state is waiting, ready, let_through or passed401Authentication required403Only an administrator can view the complete list of held senders.No error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/api/get-mail-greylist/