Navigation:  Accounts Menu > Account Manager > Account Editor >

IMAP Filters

Print this Topic Previous pageReturn to chapter overviewNext page

With MDaemon, IMAP and WorldClient users can have their mail routed automatically to specific folders on the server by using filters. Similar to the Content Filters, MDaemon will examine the headers of each of the account's incoming messages and then compare them to the account's filters. When a message for the account matches one of its filters, MDaemon will move it to the folder specified in that filter. This method is much more efficient (for both the client and server) than attempting to filter the messages at the client, and since some mail clients do not even support local message rules or filtering, mail filters provide this option to them.

Administrators can create filters via the IMAP Filters screen of the Account Editor, or by using WebAdmin. However, you can also grant your users permission to create and manage filters for themselves from within WorldClient or WebAdmin. These permissions are set on the Web Services screen.

IMAP filter rules

This box displays the list of all filters that have been created for the user's account. Filters are processed in the order in which they are listed until a match is found. Therefore, as soon as a message matches one of the filters it will be moved to the folder specified in that filter and then filter processing for that message will cease. Use the Up and Down buttons to move filters to different positions in the list.

Remove

Click a filter in the list and then click Remove to delete it from the list.

Clear all

Click this button to delete all of the user's filters.

Up

Click a filter in the list and then click this button to move it to a higher position in the list.

Down

Click a filter in the list and then click this button to move it to a lower position in the list.

If the... [message header/Size]

Choose "Message Size" or a header from this drop-down list box, or type a header into the box if the desired header is not listed. When a header is designated, MDaemon will scan that header in all of the account's incoming messages for the text contained in the "this value" box below. Then, based upon the type of comparison being made, it will determine which messages should be moved to the filter's specified folder.

Comparison-type

Use this drop-down list to choose the type of comparison that will be made to the message's header or size indicated in the filter. MDaemon will scan the specified header for the text contained in the "this value" field (or compare the message's size to that value) and then proceed based upon this option's setting—does the message size or header's complete text match exactly, not match exactly, contain the text, not contain it at all, start with it, and so on.

...this value

Enter the text that you want MDaemon to search for when scanning the message header that you have specified for the filter. When the filter is set to check the message's size, set this value to the desired number of KB.

...then move message to this folder

After specifying the various parameters for the filter, click the folder that you want messages matching it to be moved to and then click the Add filter button to create the filter. This list also contains the following three special entries: "!!Delete Message!!," "!!Redirect Message!!," and "!!Forward Message!!."

!! Delete Message !! – Choose your filter values, click this option in the folder list, and then click Add filter to create a filter that will cause a message to be deleted when it matches the filter's conditions.

!! Redirect Message !! – Choose your filter values, click this option in the folder list, click Add filter, and then enter an Email address. This will create a filter that will cause a message that meets the filter's conditions to be redirected to the designated email address. No changes to the message headers or body will be made. The only thing changed is the SMTP envelope recipient.

!! Forward Message !! – Choose your filter values, click this option in the folder list, click Add filter, and then enter an Email address. This will create a filter that will cause a message that meets the filter's conditions to be forwarded to the designated email address. A new message will be created and sent, with the Subject header and body content taken from the original message.

New folder

Click this button to create a new folder. This will open the Create Folder dialog on which you will assign a name for the folder. If you want it to be a subfolder of an existing folder then choose the folder from the drop-down list.

Add filter

When you are finished making your choices for a new filter, click this button to add it to the list.

Subaddressing

Subaddressing is a system for including a folder name in the mailbox portion of an account's email address. Using this system, messages addressed to the mailbox+folder name combination will be routed automatically to the account's folder included in the address (assuming that folder actually exists), without the need to create specific filtering rules to make that happen.

For example, if bill.farmer@example.com has an IMAP mail folder called "stuff," then mail arriving addressed to "bill.farmer+stuff@example.com" would be routed automatically to that folder. Subfolders can be designated by including the folder and subfolder names separated by an additional "+" character, and underscores are used to replace spaces in folder names. So, using the example above, if Bill's "stuff" folder had a subfolder called "my older stuff," then messages addressed to "bill.farmer+stuff+my_older_stuff@example.com" would be routed automatically to Bill's "\stuff\my older stuff\" mail folder.

Since subaddressing requires the use of the "+" character, mailboxes that contain "+" cannot be subaddressed. So, in the example above, if the actual address were "bill+farmer@example.com" instead of "bill.farmer@example.com" then it could not be subaddressed. Further, you cannot use an address alias in a subaddress. You can, however, create an alias that refers to an entire subaddressed form. So, even though "alias+stuff@example.com" is not permitted, using "alias@example.com" to point to "bill.farmer+stuff@example.com" would be fine.

To prevent exploits or abuse, the IMAP folder included in the subaddress must be valid. If a subaddressed message arrives for an account that does not have a folder matching the name of the folder defined in the subaddress, then the subaddress will be treated as an unknown email address and handled accordingly, based on your other MDaemon settings. For example, if bill.farmer@example.com does not have a folder named "stuff" and yet a message arrives for "bill.farmer+stuff@example.com" then that message will be treated as if were addressed to an unknown user, and it will most likely be rejected.

Enable subaddressing

Click this checkbox if you wish to permit subaddressing for this account.

By default, each account has the subaddressing feature disabled. You can, however, disable this feature globally via the Disable subaddressing feature for all accounts option located on the Miscellaneous screen of the Preferences dialog. If Subaddressing is disabled via that option, it will not be permitted for any account, regardless of the individual account settings.