tecotype_

Writing queries for Split Inboxes

toyou

A Split Inbox shows mail that matches your rules. You write those rules in Tecotype Query Language (TQL).

Match a sender or subject

For mail from a particular sender:

is from notifications@example.com

is matches the full email address in the from field. Use contains to match part of a subject:

contains subject "quarterly report"

Quote text that includes spaces. Matching ignores case and surrounding whitespace, so this also matches “Quarterly Report.”

Operators

These comparisons work with every field:

  • is: matches the full value.
  • contains: matches text anywhere in the value.
  • starts-with: matches the beginning.
  • ends-with: matches the end.

If a field has several values, such as multiple recipients, any one can make the rule match.

exists checks whether a field is present. For example, this matches mail with an attachment filename:

exists attachment.name

Combine rules

Use and when both conditions must match the same message:

and
  is from notifications@example.com
  is to developer@example.com

With or, either condition is enough:

or
  is from notifications@example.com
  starts-with subject alert

Groups can be nested. The indentation shows which rules belong together:

or
  and
    ends-with from.domain example.com
    not contains participant blocked@example.com
  starts-with subject alert

Reverse a rule with not

Put not before a condition to reverse it:

not is from notifications@example.com

TQL checks each message separately. A conversation appears in a split when any of its messages matches. For example, a conversation containing mail from notifications@example.com can still appear if your reply comes from a different email address.

not can also reverse a whole group:

not and
  is from notifications@example.com
  is to developer@example.com

Fields

For senders and recipients, match an email address, display name, or domain:

  • from, from.name, from.domain: who the mail is from.
  • to, to.name, to.domain: direct recipients.
  • cc, cc.name, cc.domain: Cc recipients.
  • bcc, bcc.name, bcc.domain: Bcc recipients.
  • participant, participant.name, participant.domain: anyone in From, To, Cc, or Bcc.

For the message itself:

  • subject: the subject line.
  • content: visible body text from plain text or HTML mail.
  • attachment.name: attachment filenames.
  • message: participants, subject, body text, and attachment filenames combined into one value.

Match a domain and its subdomains

Use is from.domain example.com for that exact domain. To include subdomains such as mail.example.com, combine it with a suffix match that starts with a dot:

or
  is from.domain example.com
  ends-with from.domain .example.com