Skip to content

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.

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”.

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

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

Checks the visible sender name.

Comparison Input
contains text
does not contain text
equals text

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

Checks Reply-To addresses or names.

Comparison Input
contains text
equals text

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)

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)

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

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

Checks for a colored flag.

Comparison Input
has color a color
does not have color a color

Checks whether the message contains attachments.

Comparison Input
is yes or no
is not yes or no

Checks whether the message contains a calendar invitation (.ics / text/calendar).

Comparison Input
is yes or no
is not yes or no

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

Checks an attachment’s MIME type.

Comparison Input
contains text
does not contain text
equals text
does not equal text
starts with text

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

Compares when the message was received.

Comparison Input
before a date
after a date
within last a duration

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

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

Checks local tags assigned to the message.

Comparison Input
contains tag a tag
does not contain a tag
contains any of multiple tags

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

Checks whether the message has a note attached.

Comparison Input
is yes or no
is not yes or no

Checks whether the message is snoozed.

Comparison Input
is yes or no
is not yes or no

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

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.