Rules
File, label or forward new email as it arrives.
On this page
mailset rules list
List the rules on your mailboxes, in the order they run.
Flags
Only this mailbox’s rules.
Returns
With --json it prints a list of Rule objects.
mailset rules list [--mailbox <mailbox>]
mailset rules list --mailbox moc.elpmaxe@ana
mailset rules add
Add a rule.
Flags
The mailbox the rule runs on.
A name for the rule, up to 120 characters.
Mail from this sender: an address, a domain or a name.
Mail sent to this address.
Mail with these words in its subject.
Mail with these words anywhere in it.
Mail without these words.
Mail that carries a file.
Mail larger than this: bytes, or
5M,500K.Mail smaller than this: bytes, or
5M,500K.Archive it as it arrives.
Mark it read.
Star it.
Put this label on it, by name.
Forward it to this address. Asks for a passkey.
Move it to Trash.
Never send it to Junk.
Mark it important.
Never mark it important. Beats
important.File it in this inbox tab.
One of
primaryupdatesnewsletterspromotionsAlso run it over the conversations already here.
It can ask for your passkey. It prints “This needs your passkey. Open <link>”, then waits until the link is approved or refused. Read its output as it comes: through head or tail, the link shows only after the wait.
Returns
With --json it prints the Rule object.
mailset rules add --mailbox <mailbox> [--name <name>] [--from <from>] [--to <to>] [--subject <subject>] [--has-words <has-words>] [--doesnt-have <doesnt-have>] [--has-attachment] [--larger <larger>] [--smaller <smaller>] [--skip-inbox] [--mark-read] [--star] [--label <label>] [--forward <forward>] [--delete] [--never-junk] [--important] [--never-important] [--tab primary|updates|newsletters|promotions|] [--apply-existing]
mailset rules add --mailbox moc.elpmaxe@ana --from stripe.com --label Finance --skip-inbox
mailset rules update
Change a rule.
Flags
The rule’s id, from
rules list.A name for the rule, up to 120 characters.
Mail from this sender: an address, a domain or a name.
Mail sent to this address.
Mail with these words in its subject.
Mail with these words anywhere in it.
Mail without these words.
Mail that carries a file.
Mail larger than this: bytes, or
5M,500K.Mail smaller than this: bytes, or
5M,500K.Archive it as it arrives.
Mark it read.
Star it.
Put this label on it, by name.
Forward it to this address. Asks for a passkey.
Move it to Trash.
Never send it to Junk.
Mark it important.
Never mark it important. Beats
important.File it in this inbox tab.
One of
primaryupdatesnewsletterspromotionsAlso run it over the conversations already here.
It can ask for your passkey. It prints “This needs your passkey. Open <link>”, then waits until the link is approved or refused. Read its output as it comes: through head or tail, the link shows only after the wait.
Returns
With --json it prints the Rule object.
mailset rules update <id> [--name <name>] [--from <from>] [--to <to>] [--subject <subject>] [--has-words <has-words>] [--doesnt-have <doesnt-have>] [--has-attachment] [--larger <larger>] [--smaller <smaller>] [--skip-inbox] [--mark-read] [--star] [--label <label>] [--forward <forward>] [--delete] [--never-junk] [--important] [--never-important] [--tab primary|updates|newsletters|promotions|] [--apply-existing]
mailset rules update rl_1c7e3a9f5b2d4068e4a9c2f1 --label Invoices --mark-read
mailset rules remove
Delete a rule.
Flags
The rule’s id, from
rules list.
Returns
With --json it prints what the API returns.
mailset rules remove <id>
mailset rules remove rl_1c7e3a9f5b2d4068e4a9c2f1
mailset rules reorder
Set the order a mailbox’s rules run in.
Flags
The mailbox whose rules these are.
Every rule’s id, in the order they should run.
Or @<path>, to read the JSON from a file.
Returns
With --json it prints a list of Rule objects.
mailset rules reorder --mailbox <mailbox> --ids <a,b,…>
mailset rules reorder --mailbox moc.elpmaxe@ana --ids rl_9a2f6c1e8b4d3057c1e6a3b8,rl_1c7e3a9f5b2d4068e4a9c2f1
mailset rules test
Show what a rule would match, without doing anything.
Flags
A rule you have, by its id. Left out: the flags describe one.
The mailbox to test against, for a rule described by flags.
A name for the rule, up to 120 characters.
Mail from this sender: an address, a domain or a name.
Mail sent to this address.
Mail with these words in its subject.
Mail with these words anywhere in it.
Mail without these words.
Mail that carries a file.
Mail larger than this: bytes, or
5M,500K.Mail smaller than this: bytes, or
5M,500K.Archive it as it arrives.
Mark it read.
Star it.
Put this label on it, by name.
Forward it to this address. Asks for a passkey.
Move it to Trash.
Never send it to Junk.
Mark it important.
Never mark it important. Beats
important.File it in this inbox tab.
One of
primaryupdatesnewsletterspromotions
Returns
With --json it prints what the API returns.
mailset rules test [<id>] [--mailbox <mailbox>] [--name <name>] [--from <from>] [--to <to>] [--subject <subject>] [--has-words <has-words>] [--doesnt-have <doesnt-have>] [--has-attachment] [--larger <larger>] [--smaller <smaller>] [--skip-inbox] [--mark-read] [--star] [--label <label>] [--forward <forward>] [--delete] [--never-junk] [--important] [--never-important] [--tab primary|updates|newsletters|promotions|]
mailset rules test --mailbox moc.elpmaxe@ana --from stripe.com
mailset rules apply
Run a rule over the conversations already here, in the background.
Flags
The rule’s id, from
rules list.
Returns
With --json it prints what the API returns.
mailset rules apply <id>
mailset rules apply rl_1c7e3a9f5b2d4068e4a9c2f1
mailset rules import
Turn a Gmail mailFilters.xml export into rules.
Flags
The mailbox the rules go on.
The file to send, read from this machine.
It can ask for your passkey. It prints “This needs your passkey. Open <link>”, then waits until the link is approved or refused. Read its output as it comes: through head or tail, the link shows only after the wait.
Returns
With --json it prints what the API returns.
mailset rules import <mailbox> --file <path>
mailset rules import moc.elpmaxe@ana --file mailFilters.xml