# Filters

Rules that sort new mail as it arrives: move it to a folder, label it, mark it read or star it.

Rules sort mail as it arrives. Find them under Settings, Filters. Each rule has conditions and actions, runs on new messages in the order shown, and the first match wins unless the rule says to keep checking.

## Conditions

From, To, Subject, Body, Mailing list (the `List-Id` header) and Has attachment, with contains, is exactly, starts with and ends with. Matching ignores case. "To" also matches Cc and the address the message was actually delivered to, so plus-tags work.

## Actions

Move to a folder or Trash, add labels, mark as read, star. At least one is required.

## What to know

- Rules apply to new mail only. Messages already in your mailbox stay where they are when you add or change a rule.
- Spam is checked before rules run, so a rule can't pull a flagged message past the filter.
- Up to 50 rules, each with up to 10 conditions. The page shows how many messages each rule has matched.
