Space Rules
Space rules in mailto.wiki – Email for Confluence are similar to filter rules in email programs such as Outlook or Gmail. They provide you with precise control over where (which space and parent page) and how (page or blog post) emails are posted to Confluence.
1 – Creating your first Space Rule
Let’s assume you want to move all emails with a subject line starting with “Chess:” to a space called “Chess”:
- Go to the configuration page of the “mailto.wiki – Email for Confluence” Add-On (refer to the Getting Started section for instructions).
- Click on the Space Rules tab.
- Click on the Add Rule button.
This will open a dialog that will guide you through the process of creating a new Space Rule:
- In the Condition section, select Subject and starts with from the drop-down menus. Then enter “Chess:” as the Value in the textbox.
- In the Action section, select move email to from the Operation drop-down menu and “Chess” from the Space drop-down menu.
- In the row below, select Page from the Type drop-down menu.
- Click on the save button in the bottom right corner of the dialog. The button will be grayed out if there are any errors with your configuration.
The dialog will close, and you will now see your newly created space rule in the Space Rules tab. Finally, don’t forget to click on the Save Settings button.
From now on, when you send an email to one of your mailto.wiki email addresses with a subject line starting with “Chess:”, it will automatically be posted to the “Chess” space as a page instead of being posted to the default space.
2 – Delete a Space Rule
To delete a space rule, click on the Delete button next to it and then click on Save Settings.
3 – Editing a Space Rule
To edit a space rule, click on the small Edit button next to it. This will reopen the space rule dialog. Once you have made the desired changes to your space rule, remember to click on the Save Settings button.
4 – The Difference between “Move To” and “Copy To”
When creating a space rule, you have the option to choose between Move To and Copy To actions for an email. Understanding the difference between these two actions is important.
- Moving an email to a space makes it final, and all subsequent space rules will not be evaluated for that email. The email will only be posted to the specified space.
- Copying an email to a space means it will be posted to the specified space, but it will also be posted to any subsequent matching spaces, including the default space specified in the Mandatory Settings. It allows for multiple copies of the email to be created and posted.
It’s important to note that space rules are evaluated from top to bottom, so the order in which they are defined can impact the outcome.
For example, if you have the following space rules defined:
The following example emails would be posted to the specified spaces based on the subject:
Subject | Spaces |
Chess: Boris Spassky vs. Mikhail Tal, USSR Championship, Riga 195 | TAL, CHESS |
Jan Hendrik Winter named employee of the month | Hendrik Winter, the default space |
Chess: Chess Queen on the move | CHESS |
You have the flexibility to rearrange and modify the order of space rules using the small arrows next to each space rule. Remember to click on the Save Settings button after making any changes to your rules.
5 – Posting to a Subpage instead of the Space Root
By default, when you select Page as the content type in space rules, emails are added to the root of the page tree in the selected space. However, you also have the option to select a specific page under which the emails should be created instead. This can be done in the space rule dialog by specifying the desired page.
Then new emails will get posted as sub page of that page:
6 – Posting to a Subpage by Default
Currently, it is not possible to directly set a subpage as the default location for the default space in the Mandatory Settings. If you want to post emails to a subpage by default, you will need to create a space rule to achieve this. As a workaround, you can create a catch-all rule like the following:
Since every email address will contain an @ character, the catch-all rule described earlier will always match. By placing the catch-all rule at the end, any email that doesn’t match the conditions of previous rules will be caught by this rule and directed to the specified subpage.
Remember to save your settings after arranging and finalizing your space rules.
7 – Adding Labels
You can enhance the organization of your pages or blog posts by utilizing space rules to add labels. To accomplish this, simply enter one or more labels that you want to assign to the page into the “Labels” textbox within the space rule dialog.
Then pages and blog posts that match the space rule will get automatically tagged with these labels.
Conclusion
By leveraging Space Rules, you can customize the posting behavior in mailto.wiki based on various criteria such as subject, from and to email addresses. Additionally, you have the flexibility to post directly to subpages and add labels to pages and blog posts. This level of control goes beyond the default space and content type configurations available in the Mandatory Settings.
If you have any further questions regarding Space Rules or if you have suggestions for improvements, please feel free to contact us via email at support@mailto.wiki or through our Service Desk. We greatly value your feedback and suggestions for enhancing this manual and the Add-On.