How to organise your mail with rules

You can automatically perform actions on your mail as it is delivered to your account. To configure rules, open the Settings → Rules screen. There are 4 sections:

  1. Discard — if a message matches any of the rules you add in this section, it will automatically be permanently deleted and you will never see it. No further rules will be processed, even if they would have otherwise applied to the message.

    For extra safety if you use discard rules, tick the option "Do not discard messages sent by my contacts". This will help make sure you don't accidentally discard important email.

  2. Forward — redirect all or some of your email to another account. If you select the option to delete the message, the message will be permanently deleted from your account after it has been forwarded, unless an "Organise" rule applies to the message. In this case, it will be delivered to the appropriate folder as specified by the Organise rule.
  3. Autoreply — set a vacation message automatically in reponse to emails you receive. Optionally, you can only autoreply when the sender is in your contacts.
  4. Organise — Divert incoming messages to a folder other than the Inbox, and/or automatically mark them as read or pinned. These rules are tried in the order they are created: only the first one to match applies to the message. There is currently no way to reorder them after they have been created.

Rule criteria

When you discard, forward or organise your mail, you create a rule that only applies to messages matching a certain criteria.

  1. Decide which part of the message you want the rule to look at:

    • Always — the rule always applies to every message.
    • The sender's — looks at the From address of the message.
    • A recipient's — looks at the names and addresses in the To and Cc fields. It also looks at the X-Delivered-to header, which contains the recipient address from the original SMTP envelope (i.e. the email address the sender actually sent to). The rule will apply if any of the addresses in these fields match.
    • The subject — looks at the Subject of the message.
    • The message text — looks at the body of the message.
    • The mailing list ID — looks at the List-Id header of the message.
  2. Choose how it matches. For sender/recipient, the options are:

    • email matches — this will look at the email addresses only. You can enter a full email address to match, e.g. joebloggs@fastmail.fm, or just a domain, e.g. @example.com, or just a user part, e.g. joebloggs@. If you do not enter an '@', one will automatically be entered either at the beginning or end, depending on whether we think you're trying to match a user part or a domain.
    • name is — this looks for an exact match against the name component associated with each email address.

    For subject, message text or mailing list ID, the options are:

    • is
    • contains
    • begins with
    • ends with

    In general, we recommend you always use "contains", as there may be extra spaces or an unexpected < character at the beginning or end of the message text/mailing list id.

  3. Finally, type in the text you want to match against.

Advanced users may be interested to note we also support matching criteria via glob or regular expressions. For full control, we also support writing a custom sieve script to process your incoming mail.