From ae61bd81e1b23b6daf0d1eece316efafe488c376 Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Wed, 20 May 2026 16:08:08 -0300 Subject: [PATCH 1/2] New arguments --meta and --header in `reroute queue` (SparkPost/Momentum#1226) Signed-off-by: Doug Koerich --- .../4/console-commands/reroute-queue.md | 31 ++++++++++++++++--- content/momentum/changelog/5/5-3-0.md | 1 + 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/content/momentum/4/console-commands/reroute-queue.md b/content/momentum/4/console-commands/reroute-queue.md index 2910a5b85..f7eaf9be7 100644 --- a/content/momentum/4/console-commands/reroute-queue.md +++ b/content/momentum/4/console-commands/reroute-queue.md @@ -1,7 +1,7 @@ --- -lastUpdated: "03/26/2020" +lastUpdated: "05/20/2026" title: "reroute queue" -description: "reroute queue move messages from queues of one domain to queues of the other reroute queue domain name 1 domain name 2 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..." +description: "reroute queue ec_console move messages between domain queues selectively by metadata or RFC822 header match optional --meta --header filter" --- @@ -11,7 +11,7 @@ reroute queue — move messages from queues of one domain to queues of the other ## Synopsis -`reroute queue` { *`domain_name1`* } { *`domain_name2`* } +`reroute queue` [ `--meta` *`key`* *`value`* | `--header` *`header_name`* *`header_line`* ] { *`domain_name1`* | `all` } { *`domain_name2`* } ## Description @@ -21,4 +21,27 @@ The **reroute queue** command requires two domain names as its arguments. ``` 10:47:35 /tmp/2025> reroute queue relay.com newrelay.com Moved 100 messages from 'relay.com' to 'newrelay.com' -``` \ No newline at end of file +``` + +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 [**fail domain quiet**](/momentum/4/console-commands/fail-domain-quiet#fail_domain_quiet_selective). **`--header`** compares **physical header lines** only — see [**folded headers**](/momentum/4/console-commands/fail-domain-quiet#header_filter_physical_lines). 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](/momentum/4/console-commands/fail-domain) · [fail domain quiet](/momentum/4/console-commands/fail-domain-quiet) · [fail all](/momentum/4/console-commands/fail-all) · [fail all quiet](/momentum/4/console-commands/fail-all-quiet) · [binding fail domain](/momentum/4/console-commands/binding-fail-domain) · [binding fail domain quiet](/momentum/4/console-commands/binding-fail-domain-quiet) diff --git a/content/momentum/changelog/5/5-3-0.md b/content/momentum/changelog/5/5-3-0.md index 66b1633f3..9b0bc4b4c 100644 --- a/content/momentum/changelog/5/5-3-0.md +++ b/content/momentum/changelog/5/5-3-0.md @@ -12,3 +12,4 @@ This section will list all of the major changes that happened with the release o | --- | --- | --- | | Feature | I-1064 | Added support for [license](/momentum/4/before-you-begin#momentum-license) signatures using ECDSA P-256 with SHA-256. | | Feature | I-1214 | Removed `msys-nodejs` RPM from the Momentum bundle, to be replaced with the 3rd-party `nodejs` package. Node.js LTS 24+ must be installed separately from the system or a vendor repository. | +| Feature | I-1225 | Added optional `--meta` / `--header` filtering to the [`reroute queue`](/momentum/4/console-commands/reroute-queue#reroute_queue_selective) console command, to selectively move queued messages by metadata or RFC822 header match. | From 1833d9ce60563aecb11b6566e44d7278a8e8780f Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Wed, 20 May 2026 16:15:01 -0300 Subject: [PATCH 2/2] Minor reword of reroute page (SparkPost/Momentum#1228) Signed-off-by: Doug Koerich --- content/momentum/4/console-commands/reroute-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/momentum/4/console-commands/reroute-queue.md b/content/momentum/4/console-commands/reroute-queue.md index f7eaf9be7..4da25a0f0 100644 --- a/content/momentum/4/console-commands/reroute-queue.md +++ b/content/momentum/4/console-commands/reroute-queue.md @@ -28,7 +28,7 @@ You may substitute `all` for *`domain_name1`* to move messages out of **every** ### Selective reroute (optional filter) -Optional **`--meta`** / **`--header`** filtering uses the same matching rules as [**fail domain quiet**](/momentum/4/console-commands/fail-domain-quiet#fail_domain_quiet_selective). **`--header`** compares **physical header lines** only — see [**folded headers**](/momentum/4/console-commands/fail-domain-quiet#header_filter_physical_lines). 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). +Optional **`--meta`** / **`--header`** filtering uses the same matching rules as the `fail` family of commands. **`--header`** compares **physical header lines** only — see [**folded headers**](/momentum/4/console-commands/fail-domain-quiet#header_filter_physical_lines). 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.