# urbestack-botmail-domain-on

First published 22 Oct 2026 (release 0.2.15) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-botmail-domain-on --name DOMAIN [--label LABEL] [--owner USER] [--queue | --job ID]
```

## Description

Turns on BotMail for a domain whose mail is hosted on this server or changes its BotMail hostname. The customer's package must allow BotMail. Use --owner to require that the domain belong to that customer.

Use --label to set the label in LABEL.DOMAIN. The label can be up to 32 characters. By default, UrbeStack tries mcp, then mcp2 through mcp20. If a site, domain alias, or DNS record already uses the hostname, choose another label. Requesting the current hostname of a ready domain keeps its setup. Changing the hostname disables the old one immediately.

UrbeStack publishes the DNS records when the zone is hosted on this server or distributed from it. It checks once whether the hostname resolves to this server. If the check fails, setup stops and the job reports which A or AAAA records to add or update. All retries are manual. Correct the records and run the command again.

UrbeStack uses the domain's wildcard certificate if it covers the hostname. Otherwise, it obtains a dedicated certificate using HTTP-01. Apache serves the hostname over HTTPS on port 443. Once the domain is ready, you can create bot keys for its mailboxes. Bots connect only through that hostname.

--queue validates the request and hands setup to the job worker, as the web interface does. --job identifies the job the worker runs. With neither option, the command creates and runs its own job immediately. A queued or running setup job for the domain must finish before you can submit another.

## Same in the API

- [PUT /botmail/domains/{name}](https://urbestack.com/docs/api/put-botmail-domains-name.md): Enable BotMail for a domain or change its BotMail hostname

## Command family: botmail

- [urbestack-botmail-domain-list](https://urbestack.com/docs/commands/urbestack-botmail-domain-list.md): Lists domains whose mail is hosted on this server.
- [urbestack-botmail-domain-off](https://urbestack.com/docs/commands/urbestack-botmail-domain-off.md): Turns off BotMail for a domain and immediately revokes every BotMail key for its mailboxes.
- [urbestack-botmail-events](https://urbestack.com/docs/commands/urbestack-botmail-events.md): Runs one round of BotMail webhook delivery, the same work the timer runs every minute.
- [urbestack-botmail-key-add](https://urbestack.com/docs/commands/urbestack-botmail-key-add.md): Creates a named BotMail key for the mailbox specified by --address.
- [urbestack-botmail-key-address](https://urbestack.com/docs/commands/urbestack-botmail-key-address.md): Issues a new MCP URL for an existing bot key by rotating its secret.
- [urbestack-botmail-key-del](https://urbestack.com/docs/commands/urbestack-botmail-key-del.md): Revokes a bot key immediately and removes its webhook.
- [urbestack-botmail-key-list](https://urbestack.com/docs/commands/urbestack-botmail-key-list.md): Lists all bot keys on the server by default.
- [urbestack-botmail-key-set](https://urbestack.com/docs/commands/urbestack-botmail-key-set.md): Changes selected rules for a bot key, pauses it, or resumes it.
- [urbestack-botmail-prune](https://urbestack.com/docs/commands/urbestack-botmail-prune.md): Deletes BotMail key activity, counters from expired rate-limit windows, and webhook events that have reached a final status when they are older than the retention period set by mail.botmail_activity_days.
- [urbestack-botmail-webhook-del](https://urbestack.com/docs/commands/urbestack-botmail-webhook-del.md): Removes a bot key's webhook and its stored bearer token, ending new-mail notifications for that key.
- [urbestack-botmail-webhook-resume](https://urbestack.com/docs/commands/urbestack-botmail-webhook-resume.md): Resumes a bot key's webhook after BotMail paused it following seven failed delivery attempts.
- [urbestack-botmail-webhook-set](https://urbestack.com/docs/commands/urbestack-botmail-webhook-set.md): Creates or updates the webhook for the bot key identified by --key.
- [urbestack-botmail-webhook-test](https://urbestack.com/docs/commands/urbestack-botmail-webhook-test.md): Sends an immediate test ping through BotMail to the webhook for the bot key identified by --key.
