Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
WorkSpace: automatically filtering incoming e-emails (Sieve filters)
You have the option of setting up filtering rules in your WorkSpace. Unlike the filtering rules offered by e-mail software (Microsoft Outlook, Mozilla Thunderbird, Apple Mail...), the WorkSpace filters take effect directly on the server hosting your email boxes.
These filters in particular allow the following automatic actions:
- delete or move messages from addresses that you no longer wish to view to a folder of your choice
- transfer e-mails from a specific address to your spouse's account so that both of you can receive them
- copy messages containing a specific keyword to a particular folder
- etc.
If you use an email software configured in POP as well as WorkSpace, the messages filed in folders will no longer be downloaded by your software. Indeed, the POP protocol will only get the messages in your main inbox (Inbox). To view the filed messages from your email software, you will need to use IMAP protocol or your WorkSpace.
Activating filters from the Workspace
- open the WorkSpace (workspace.infomaniak.com)
- click on the icon showing grey envelopes in the top right
- choose Settings
- in the heading My email addresses, click on the email address in question
- click on the Filters tab (in the event of reduced display the tabs are available in the form of a drop-down menu by first clicking on General)
- click on the Add a filter button or enable the Advanced mode to import a Sieve file
Information about the advanced mode
Infomaniak does not provide support for the advanced mode.
The advanced mode requires the use of the Sieve language. When this mode is enabled, any existing filters are kept but they will be disabled.
Example of thefileinto function: the following code allows you to file all Facebook messages in the "fb" folder and all messages with an unsubscribe link in the "nl" folder.
require ["fileinto"];
if address :contains "from" "facebook.com" {
fileinto "fb";
} elsif header :matches "List-Unsubscribe" "*" {
fileinto "nl";
} else {
keep;
}
Second example: code allowing editing of the subject based on the From (add a prefix in the subject when an email goes through the filter for example)
require ["fileinto", "editheader", "variables", "regex"];
if address "sender" "owner-scientific-linux-devel at LISTSERV.FNAL.GOV" {
if header :regex "subject" "((Re|Fwd): *)\[SCIENTIFIC-LINUX-DEVEL\]
*(.*)" {
deleteheader "Subject";
addheader "Subject" "${1}${3}";
}
addheader "List-Post" "
fileinto "Mail List.SL-Devel";
}