CMDCommand · run as root on the server · mail family
urbestack-mail-filter-add
First published 3 Oct 2026
0.1.0Unchanged since publicationUsage
# urbestack-mail-filter-add (--address ADDRESS | --name DOMAIN) --filter-name NAME [--match all|any] --rule FIELD:OP:VALUE [--rule ...] --action ACTION [--position N] [--owner USER]Description
From the command's --help outputAdds a mail filter to an account (--address) or a domain (--name). Domain filters run before the filters of each account on that domain. Give the filter a name of up to 64 characters with --filter-name. Supply 1 to 20 rules, each with its own --rule in FIELD:OP:VALUE form. FIELD is from, to, subject, header (any of the usual message headers), or body. OP is contains, not-contains, equals, begins, ends, or matches. The matches operator uses shell-style patterns with * and ?. Each VALUE can be up to 256 characters. --match all requires every rule to match and is the default. --match any requires at least one rule to match. The folder:NAME action delivers the message to that folder, creates it if needed and ends filtering for the message. Folder names can be up to 128 characters. The discard action drops the message. The redirect:ADDRESS action sends a copy to the specified email address and keeps the original. An account filter must use a destination email address other than the account's own. The stop action skips the remaining filters in the current list. Filters run in position order, starting at 1. The new filter goes last by default. Use --position to insert it at a specific position and shift later filters down. A position past the end puts it last. If Pigeonhole cannot compile the filter, the command reports Pigeonhole's error. With --owner, the account or domain must belong to the named customer.Usage: urbestack-mail-filter-add (--address ADDRESS | --name DOMAIN) --filter-name NAME [--match all|any] --rule FIELD:OP:VALUE [--rule ...] --action ACTION [--position N] [--owner USER] Adds a mail filter to an account (--address) or a domain (--name). Domain filters run before the filters of each account on that domain. Give the filter a name of up to 64 characters with --filter-name. Supply 1 to 20 rules, each with its own --rule in FIELD:OP:VALUE form. FIELD is from, to, subject, header (any of the usual message headers), or body. OP is contains, not-contains, equals, begins, ends, or matches. The matches operator uses shell-style patterns with * and ?. Each VALUE can be up to 256 characters. --match all requires every rule to match and is the default. --match any requires at least one rule to match. The folder:NAME action delivers the message to that folder, creates it if needed and ends filtering for the message. Folder names can be up to 128 characters. The discard action drops the message. The redirect:ADDRESS action sends a copy to the specified email address and keeps the original. An account filter must use a destination email address other than the account's own. The stop action skips the remaining filters in the current list. Filters run in position order, starting at 1. The new filter goes last by default. Use --position to insert it at a specific position and shift later filters down. A position past the end puts it last. If Pigeonhole cannot compile the filter, the command reports Pigeonhole's error. With --owner, the account or domain must belong to the named customer.
Options
Find other commands that accept these optionsSame in the API
This operation runs the command.urbestack-mail-autoresponder-urbestack-mail-check-urbestack-mail-dkim-urbestack-mail-hold-urbestack-mail-settings-urbestack-mail-smarthost-Generated from release 0.2.35 (current) · urbestack-mail-filter-add --help outputThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/commands/urbestack-mail-filter-add/