7.02 Mail Rule running when disabled or deleted!

I’ve read most of the posts regarding this issue. Some users have been kind enough to past some code to disable this feature by creating a new button however all the code that has been posted is not 7.02 compatible.

Does anyone have a simple way on how I can disable a mail rule that is still running after it has been deleted?

I downloaded and installed domain patrol 4.0 however I’m not having any luck locating the task to disable the rules for the user.

Subject: 7.02 Mail Rule running when disabled or deleted!

IBM - Deleted mail rules still run and/or enabled mail rules do …

www-1.ibm.com/support/docview.wss?rs=463&uid=swg21088058

Subject: RE: 7.02 Mail Rule running when disabled or deleted!

mail rules 101

http://www-10.lotus.com/ldd/nd6forum.nsf/11a0b6a64ffb3d8d85256a4c004f1bbd/c61d9bbeab0f9125852570df006d51f0?OpenDocument

Subject: 7.02 Mail Rule running when disabled or deleted!

we made a simple Agent available via the action menu doing this for us. But it is disabling all active rules, you have to enable the needed ones.

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Set db = session.currentdatabase

Dim workspace As New NotesUIWorkspace

'This folder contains all the Mail Rules.

Dim folder As NotesView

Set folder = db.GetView("(Rules)")

'Find the calendar profile document in the current database. (GetProfileDocument will create the named profile document if it does not already exist.)

Dim calendarProfile As NotesDocument

Set calendarProfile = db.GetProfileDocument( "CalendarProfile" )

'Mail Rules are compiled and saved in special fields named $FilterFormula_xx

'Remove all of these fields from the calendar profile.

Forall item In calendarProfile.Items

	If( Lcase$(Left$(item.Name,15)) = "$filterformula_" ) Then

		Print "Cleanup " & item.Name

		Call item.Remove

	End If

End Forall

'Save changes to the calendar profile.

Call calendarProfile.Save( False, False )

'Disable all Rules.

Dim mailrule As NotesDocument

Set mailrule = folder.GetFirstDocument

While Not( mailrule Is Nothing )

	Call mailrule.ReplaceItemValue( "Enable","0" )

	Call mailrule.Save( True,False,True )

	

	Set mailrule = folder.GetNextDocument( mailrule )

Wend

'Open the Rules folder

Call workspace.OpenDatabase( db.Server, db.FilePath, "(Rules)" )

'Message to the user.

Messagebox "all rules are disabled"

End Sub

regards

Peter

Subject: RE: 7.02 Mail Rule running when disabled or deleted!

I just tried your code and I get the following error when I try creating the agent.

"An Operation or semicolon was expected but none was encountered:‘Initialized’

Subject: RE: 7.02 Mail Rule running when disabled or deleted!

I take my last comment back I was pasted the code in @formula Vs Lotus Script. It works now!

Thanks to everyone who replied so quicky.