Все таки предлагаю не изобретать велосипед, а разобраться с правилами. Это очень мощная встроенная штука. Единственное что нужно знать, что правило не так то просто удалить, если удалить его как обычный документ, оно все равно останется и будет продолжать отрабатывать, а противоречивые правила вообще могут привести к тому, что почта не будет поступать, и придется подкладывать новый ящик.
Удалять правило необходимо вот так. Подробнее ищите полный докумет на ibmовском сайте, ссылку не помню.
Scenario #1:
1. Create a rule in a mail file. Add some conditions and actions, then click OK.
NOTE: The Preview pane must not be open at this point.
2. Disable the rule.
3. Open the Preview pane and note that the new rule appears.
4. Click Edit Rule on the action bar. You must edit the rule while the Preview pane is open or you cannot recreate the problem.
5. Select "This rule is on" and click OK.
6. Click Delete Rule on the action bar. The rule is marked as deleted in the Rules folder.
7. Press F9 to delete the rule completely.
8. Using NotesPeek or LotusScript, notice that the relative $FilterFormula_ entry still exists in the Calendar Profile document.