Skip to main content

Name

reroute queue — move messages from queues of one domain to queues of the other

Synopsis

reroute queue [ --meta key value | --header header_name header_line ] { domain_name1 | all } { domain_name2 }

Description

The reroute queue command requires two domain names as its arguments. It will move messages from queues of the first domain to the queues of the second domain.

10:47:35 /tmp/2025> reroute queue relay.com newrelay.com
Moved 100 messages from 'relay.com' to 'newrelay.com'

You may substitute all for domain_name1 to move messages out of every source domain's queues into domain_name2.

Selective reroute (optional filter)

Optional --meta / --header filtering uses the same matching rules as the fail family of commands. --header compares physical header lines only — see folded headers. Place at most one clause immediately after reroute queue and before the source domain. With a filter, only matching messages are moved; non-matching messages stay in the source domain's queues. Without a filter, every queued message for the source domain is moved (original behavior).

You cannot combine --meta and --header in the same command.

10:47:35 /tmp/2025> reroute queue --meta mo_campaign_id summer-sale relay.com newrelay.com
Moved 12 messages from 'relay.com' to 'newrelay.com'
10:47:35 /tmp/2025> reroute queue --header X-Reroute-Pick alpha all newrelay.com
Moved 4 messages from 'all' to 'newrelay.com'

See Also

The same --meta / --header filtering clause is accepted by the fail-family commands: fail domain · fail domain quiet · fail all · fail all quiet · binding fail domain · binding fail domain quiet

Was this page helpful?