# POST /domains/{name}/mail/greylist/pass

First published 19 Nov 2026 (release 0.2.30) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Release greylisted mail from a sender domain

- Who may call it: administrator, reseller, customer
- Token scope, any of: mail, all
- Answers: 200 OK

Every message currently held for the recipient domain from sender can pass greylisting on its next delivery attempt, whenever that occurs. Spam scoring still applies. As after the normal wait, later mail with the same sender, sending network and recipients bypasses greylisting for as long as Rspamd remembers the sender.

With always set to true, UrbeStack also exempts the sender domain from future greylisting through the recipient domain's nogreylist list. The request is refused if none of the held messages came from that sender domain as verified by SPF or DKIM.

The 200 response identifies the recipient domain and sender in domain and sender, and reports the number released in messages. When always is true, the response also includes the nogreylist entry and whether the request added it in always.

Administrators, the customer who owns the domain and that customer's reseller can call this operation with a token that has the mail scope.

## As a command

- [urbestack-mail-greylist-pass](https://urbestack.com/docs/commands/urbestack-mail-greylist-pass.md): Lets mail deferred by greylisting pass at its next retry, whenever it arrives.

## Parameters

- `name` (path, DomainName, required)

## Request body

JSON.

- `sender` (string, up to 253 characters, required): Sender domain as listed by GET /domains/{name}/mail/greylist.
- `always` (boolean): Whether to add the sender domain to the recipient domain's nogreylist list to exempt it from future greylisting. Defaults to false and requires at least one held message verified by SPF or DKIM as coming from the sender domain when set to true.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/domains/example.com/mail/greylist/pass" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "always": true,
    "sender": "text"
  }'
```

Response, 200 OK:

```
{
  "always": {
    "added": 1,
    "entry": "text",
    "kind": "profile",
    "scope": "text"
  },
  "domain": "example.com",
  "id": 1,
  "messages": 1,
  "sender": "text"
}
```

## Errors

- 400: --always is ip or domain
- 400: --id goes alone
- 400: <what> must be text without control characters, 1 to <max> characters
- 400: An entry is named by lowercase letters and digits
- 400: Domain name required
- 400: Domain name too long
- 400: Give --id ID, or --domain DOMAIN with --sender SENDER_DOMAIN
- 400: Give an entry, or a domain and the sender domain held for it
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid boolean
- 400: Invalid domain name
- 400: Invalid port
- 400: Invalid setting key
- 400: With --domain, --always is domain: a customer lists a sender by its domain
- 400: always is ip or domain
- 401: Authentication required
- 403: Only an administrator can let through an individual held message.
- 404: No held message <id>
- 404: No mail from <sender> is held for <name>
- 404: Setting '<key>' not found
- 409: Mail from <sender> is no longer held: its records have expired.
- 409: That message has no sender domain. You can list its sending server's IP address instead.
- 409: That message has no sending server IP address on record
- 409: That message is no longer held: its record expired. Its next delivery attempt will be checked again.
- 409: That message was let in already
