Subject: Rule activated even after deleting it
To allow users to use Mail Rules:
Edit the Server document. The “allowed to use monitors” field should be set to * or should list the users allowed to use Mail Rules.
NOTE: Mail Rules have nothing whatsoever to do with Agents. Users do not need the ability to run agents on the server to use Mail Rules.
Mail Router
Just before a new email is saved in the mail database, the Router task on the server looks at the CalendarProfile document stored in that database. This
special document has hidden fields called $FilterFormula_xx.
Note that the individual “Mailrule” documents are not used by the Mail Router. Only the CalendarProfile is used. It’s therefore possible that the CalendarProfile document may not reflect the individual Mailrule documents found in the database. For example, if you paste a Mailrule document in to the database, the CalendarProfile document is not updated, and the Mailrule document has no effect.
Mailrule documents
Each user’s mail database contains a Folder called Rules. This will usually only contain documents created with the form “Mailrule”. Keep in mind that this is a Folder and not a View. (Iris should change this to a View.) If there are other documents in this Folder, then the CalendarProfile may get an invalid $FilterFormula.
The Mailrule form calculates two hidden fields that are stored on all Mailrule documents: $FilterFormula and OrderNum. When the user clicks the Enable/Disable Rule(s) buttons, the CalendarProfile document is updated. Each Mailrule document is identified on the CalendarProfile as $FilterFormula_OrderNum.
If the user did a copy&paste of an existing Mailrule document, then there will be two Mailrule documents with the same value for the OrderNum field. When the CalendarProfile is updated, each Mailrule document will try to store their information in the same $FilterFormula_OrderNum field. One Mailrule document is therefore not added to the CalendarProfile. To correct this problem, use the MoveUp and MoveDown buttons (this changes the OrderNum field). This will ensure that all Mailrule documents have a unique OrderNum field.
If you’re having trouble with Mailrules that are not working, or deleted Mailrules that are still being evaluated by the Mail Router, then remember:
-
The Mail Router looks at the CalendarProfile document only.
-
To recompute the CalendarProfile’s $FilterFormula_xx fields, select all Mailrule documents in the folder and click the Disable Rule(s) button, then select all Mailrule documents again and click the Enable Rule(s) button. It’s a good idea to use the MoveUp MoveDown buttons to make sure each Mailrule document has a unique OrderNum value.
Mailrules that MoveToFolder or CopyToFolder, store that folder’s UNID as part of the $FilterFormula. You should therefore never paste a Mailrule from one database to another.
if you delete a Rule document in the mail file, before disabling it, the calendar profile still has the field that stores the compiled version of that Rule, so it still runs