All conditions and actions
A rule consists of conditions (when does it apply?) and actions (what should happen?). There are 28 condition fields and 20 actions.
How to create your first rule is covered in Creating your first rule.
Conditions
Section titled “Conditions”Each condition checks one field of the incoming email. Multiple conditions can be combined.
Text comparisons ignore upper and lower case. All conditions see the email as it arrived: what another rule changes, such as a tag, a flag or the folder, is not seen by any rule.
The comparison matches regex takes a regular expression in JavaScript notation, at most 500 characters long. If the pattern takes longer than 50 ms on an email, YouniqMail skips that email and reports “Regex pattern too slow”.
Subject
Section titled “Subject”Checks the message subject.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| starts with | text |
| ends with | text |
| equals | text |
| does not equal | text |
| matches regex (Pro) | text |
Checks the sender’s address.
For domain ends with, the end of the whole address counts: example.com also matches x@badexample.com. With @example.com, only this domain matches.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| domain ends with | text |
From (address or name)
Section titled “From (address or name)”Checks sender address or display name. The sender picks the display name freely.
Here the display name counts as well, also for domain ends with. A value with an @ turns the condition into From.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| domain ends with | text |
Sender name
Section titled “Sender name”Checks the visible sender name.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
Any recipient
Section titled “Any recipient”Checks To, Cc and Bcc together.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| ends with | text |
Checks recipients in the To field.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| ends with | text |
Checks recipients in the Cc field.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| ends with | text |
Checks recipients in the Bcc field.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| ends with | text |
Reply-To
Section titled “Reply-To”Checks Reply-To addresses or names.
| Comparison | Input |
|---|---|
| contains | text |
| equals | text |
Body Pro
Section titled “Body Pro”Searches the text of the email and the addresses its links point to.
| Comparison | Input |
|---|---|
| contains | text (multi-line) |
| does not contain | text (multi-line) |
Raw headers Pro
Section titled “Raw headers Pro”Searches all headers (e.g. X-Spam-Flag).
Enter a header line as it appears in the email, such as X-Spam-Flag: YES; the condition checks all headers at once. It only works for new email, because YouniqMail does not keep the headers of stored email. A rule with it cannot run with Apply….
| Comparison | Input |
|---|---|
| contains | text (multi-line) |
| does not contain | text (multi-line) |
| matches regex (Pro) | text (multi-line) |
Mailbox / folder
Section titled “Mailbox / folder”Matches the mailbox the message is stored in.
| Comparison | Input |
|---|---|
| is | a folder |
| is not | a folder |
| is any of | multiple folders |
| is none of | multiple folders |
Mail account
Section titled “Mail account”Limits the rule to specific accounts.
| Comparison | Input |
|---|---|
| is | an account |
| is not | an account |
| is any of | multiple accounts |
| is none of | multiple accounts |
Flag color
Section titled “Flag color”Checks for a colored flag.
| Comparison | Input |
|---|---|
| has color | a color |
| does not have color | a color |
Has attachments
Section titled “Has attachments”Checks whether the message contains attachments.
| Comparison | Input |
|---|---|
| is | yes or no |
| is not | yes or no |
Has calendar invite
Section titled “Has calendar invite”Checks whether the message contains a calendar invitation (.ics / text/calendar).
| Comparison | Input |
|---|---|
| is | yes or no |
| is not | yes or no |
Attachment filename Pro
Section titled “Attachment filename Pro”Looks for attachment file names.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| starts with | text |
| ends with | text |
| equals | text |
| does not equal | text |
| matches regex (Pro) | text |
Attachment MIME type Pro
Section titled “Attachment MIME type Pro”Checks an attachment’s MIME type.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| does not equal | text |
| starts with | text |
Attachment file extension Pro
Section titled “Attachment file extension Pro”Checks the file extension of attachments (e.g. pdf, docx, jpg).
For is any of, separate the extensions with commas; a leading dot does not matter (pdf, .docx).
| Comparison | Input |
|---|---|
| is | a choice from a list |
| is not | a choice from a list |
| is any of | text |
| contains text | text |
Compares the message size.
| Comparison | Input |
|---|---|
| at least | a size in KB, MB or GB |
| at most | a size in KB, MB or GB |
| greater than | a size in KB, MB or GB |
| less than | a size in KB, MB or GB |
Date received
Section titled “Date received”Compares when the message was received.
| Comparison | Input |
|---|---|
| before | a date |
| after | a date |
| within last | a duration |
PGP status
Section titled “PGP status”Checks PGP messages: whether an encrypted message could be decrypted and whether a signature is valid, also for messages that are only signed. The signature of a message from the first sync is only checked once you open it. A signature that covers only part of the message counts as neither valid nor invalid.
| Comparison | Input |
|---|---|
| is | a choice from a list: Encrypted; Signed, not encrypted; Signature valid; Signature invalid; Passphrase required; Key missing; Decryption failed |
| is not | a choice from a list: Encrypted; Signed, not encrypted; Signature valid; Signature invalid; Passphrase required; Key missing; Decryption failed |
S/MIME status
Section titled “S/MIME status”Checks S/MIME messages: whether an encrypted message could be decrypted and whether a signature is valid, also for messages that are only signed. A signature from a certificate that does not belong to the sender counts as invalid. The signature of a message from the first sync is checked later and counts as neither valid nor invalid until then.
| Comparison | Input |
|---|---|
| is | a choice from a list: Encrypted; Signed, not encrypted; Signature valid; Signature invalid; Passphrase required; Key missing; Decryption failed |
| is not | a choice from a list: Encrypted; Signed, not encrypted; Signature valid; Signature invalid; Passphrase required; Key missing; Decryption failed |
Tags / labels
Section titled “Tags / labels”Checks local tags assigned to the message.
| Comparison | Input |
|---|---|
| contains tag | a tag |
| does not contain | a tag |
| contains any of | multiple tags |
Thread message count
Section titled “Thread message count”Compares how many mails are already in the thread.
The email itself counts: exactly 1 means it starts a conversation. For new email, the count is what is stored when the rule runs. If a question and its answer arrive in the same sync, for example after the app was closed, the question already counts 2.
| Comparison | Input |
|---|---|
| at least | number |
| at most | number |
| exactly | number |
Has note
Section titled “Has note”Checks whether the message has a note attached.
| Comparison | Input |
|---|---|
| is | yes or no |
| is not | yes or no |
Snoozed
Section titled “Snoozed”Checks whether the message is snoozed.
| Comparison | Input |
|---|---|
| is | yes or no |
| is not | yes or no |
Note text
Section titled “Note text”Searches within the note content.
| Comparison | Input |
|---|---|
| contains | text |
| does not contain | text |
| equals | text |
| starts with | text |
| ends with | text |
| matches regex (Pro) | text |
Actions
Section titled “Actions”When a rule matches, YouniqMail runs its actions in order.
| Action | Description | Input |
|---|---|---|
| Move to mailbox | Moves the message to another mailbox. | a folder |
| Copy to mailbox | Copies the message to an additional mailbox. | a folder |
| Move to trash | Moves the message to the trash folder. | no value |
| Archive | Moves the message to the archive. | no value |
| Mark as spam | Moves the message to the junk folder. | no value |
| Mark as read | Marks the message as read. | no value |
| Mark as unread | Marks the message as unread. | no value |
| Set flag color | Applies a colored flag. | a color |
| Clear flag color | Removes any colored flag. | no value |
| Add tag | Assigns an existing tag to the message. | a tag |
| Remove tag | Removes a tag from the message. | a tag |
| Set note | Stores a short internal note on the message. | text (multi-line) |
| In-app notice | Shows a notice in the YouniqMail window. | text |
| Play sound | Plays a short system beep. | no value |
| Send webhook (Pro) | Sends an HTTP request to a configured webhook endpoint. | a webhook endpoint |
| Add to calendar (Pro) | Creates a calendar event via CalDAV from the email. | a calendar |
| Run script (Pro) | Executes a configured local script or command. | a script |
| Send to Trello (Pro) | Creates a Trello card from the email on a configured board. | a Trello list, or the default from the settings |
| Send to Asana (Pro) | Creates an Asana task from the email. | an Asana project, or the default from the settings |
| Send to Notion (Pro) | Creates a Notion page from the email in a database. | a Notion database, or the default from the settings |
Set note replaces a note the email already has; an empty text removes it.