Mail Filters enable you to use scripts to analyze and process incoming emails. You can use the post processor for the latter task, for instance, by automatically sending emails from a particular sender or with specific contents directly to a predefined folder. The mail filters are then saved for each user in Open-Xchange in a unique script file. To create mail filters for your user account or to edit existing mail filters, go to the Mail Filter tab in the setup.
When you first open the Mail filters tab, there is no filter script available. This has to be created by you first. To do this, click on the Add New Rule link on the overview page. If a filter script has already been created, then the procedure is identical; however, all established mail filters will be displayed in the overview. If you would like to delete an existing mail filter, then click on the symbol
to the right of the corresponding rule. If you would like to edit an existing rule, then click on the symbol
next to the corresponding rule. The dialog for editing a mail filter corresponds to the dialog for the creation of a new mail filter; however, all established conditions and actions of this rule will be automatically displayed.
In the window that opens, you now have the possibility of setting a new mail filter. To do this, proceed as follows:
Under Execute action if, first set when the mail filter is to be implemented. Via the list field you can choose between two different options: the simpler option is the setting Some condition met. If you have selected the default setting Some condition met, then one of the following adjustable conditions must be fulfilled. As an alternative to that, you can select the Meets all conditions option via the list field. In this case, all the following conditions must be fulfilled in order for the action to be carried out. In the case that you want to simply set one condition, then it does not matter which of the two options you have selected.
Using the If list field and the input fields next to it, you can create a condition that must be fulfilled in order for the action assigned to the mail filter to be carried out. Using the If field you can first establish an e-mail element for which a certain condition must be examined. The following e-mail elements can be used:
From |
Recipient |
Cc |
Bcc |
Subject |
Date |
Reply to |
Return path |
Sender |
Received |
You can, via corresponding choices, filter e-mails based on their sender, subject line or date, for example. Besides that, you can choose among condition variants to be utilized for the filtering. The following operations are thereby available:
contains |
contains (Regexp) |
equals |
not equals |
contains not |
contains not (Regexp) |
If you choose the contains relational operator using the list field, then incoming e-mail messages will be examined by the filter script to determine if the text entered under If is contained in the e-mail. Example: You selected the Subject e-mail element under If and entered OX5 as a text operator. The filter script will examine the subject lines of all incoming e-mail messages to determine whether the text contains OX5.
The Contains (Regexp) operator corresponds to the Contains conditional operator. E-mails will also be examined here to determine if the selected e-mail element contains the value entered in the text field. Continuing, this conditional operator also allows the use of regular expressions in the text field, so that complex conditional requests are possible.
If you have selected the Equals list field, then the filter script will determine if there is an exact match. The conditional operator can also be used, for example, with all incoming e-mails to check if the sender's e-mail address matches a certain pre-set address.
This conditional operator is similar to the "Equals" operator; however, the desired option will only be performed if the given text for the selected e-mail element does not agree with the corresponding content of the element in an incoming e-mail. This is practical when there is a mail filter with multiple conditions for which all e-mails from a certain sender are to be moved to a certain folder, and at the same time all e-mail messages from the sender that have a certain CC address must be placed into another mail folder.
When using this conditional operator, the defined mail filter action will only be carried out when the given text for the selected e-mail element is not contained in an incoming e-mail message. You can use this conditional operator to sort e-mail messages based on their subject or content, for example. As a counterpart to the Contains operator, the configuration of mail filters in individual cases can be made much easier.
This conditional operator functions exactly like Contains not; however, you can also use regular phrases in the text field when you select this conditional operator.
As mentioned before, a mail filter can be used to examine incoming messages for the fulfillment of a certain condition. In practice, you will often desire in many cases to have an action carried out if multiple conditions are fulfilled. After entering the first condition, you must add additional conditions when creating a mail filter. To do this, click on the New Condition button. An additional condition that you can configure as you wish will now be added to the web interface. Please note that all conditions are by default connected with an OR operator. The action to be configured will only be carried out if one of the given conditions is fulfilled. You can optionally set the Perform action when list field so that the individual conditions are linked by AND. In this case, all conditions must be fulfilled in order for the action to be carried out on an incoming e-mail message. A combination of AND and OR operators is not possible.
Finally, you must specify what is to happen to incoming e-mail messages that meet the condition or conditions defined. The mail filter configuration menu provides the following options:
Move mail to folder |
Forward to |
Return message because |
Discard message |
If you choose the Move mail to folder option, then all incoming e-mail messages that fulfill the condition described before will automatically be moved to another folder. You can freely select a corresponding folder via the folder list field. The automatic transfer of messages is suited for the assurance of a better overview of your mailbox. As an alternative to that, you can select the Forward to action. Incoming e-mail messages that fulfill the given conditions will then be automatically forwarded to the given e-mail addresses. Optionally, you can reject incoming e-mail messages with a freely defined reason. If you have selected the Discard message option, then all incoming e-mail messages that contain the selected conditions will be directly thrown away when they enter the server. Thus, these e-mail messages will not appear in your mailbox. If you have defined the conditions and actions for the current mail filter that you desire, then you only have to save them. To do that, click on the Complete button.
Mail filters are set for every user in an individually designed script. If you have already created a filter script, then this will be displayed under the Mail filters tab. Using the corresponding buttons, you can Edit or Delete the script. Using the Activate list field, you can turn the filter script on and off. Click on the button and you will get an overview of all mail filters that have already been created in the filter script.