[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3273
  • Last Modified:

How do i stop a mail rule in lotus notes

Hello,

For any employee when he/she is going for vacation, I use to create a RULE from the user database in order to forward the emails to another user till the user is back, but now for some reason even if i disable first and then delete, still its active and running although you don't see the RULE. Earlier I use to create a new rule and then the previous one use to stop but now even the first one is still active. Is there a way to disable it.

Domino version is 8.5.2
0
sns-emea
Asked:
sns-emea
  • 9
  • 8
  • 2
  • +1
2 Solutions
 
Getsum_BloodlustCommented:
Convert to Exchange Server
0
 
sns-emeaAuthor Commented:
Sound easy but i have 200(users) clients running lotus notes.
0
 
Sjef BosmanGroupware ConsultantCommented:
> ... I use to create a RULE from the user database...
Meaning: you recently upgraded to R8.5.2? From which earlier release? And which exact release do you run now, which FixPack?
It could be that there are some left-overs from an earlier release...

More info that might be relevant:
http://www-01.ibm.com/support/docview.wss?rs=899&uid=swg21217940

@Getsum_Bloodlust: ROTFLMAO
Got nothing better to do?

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
umeliCommented:
Hi
The rules are stored in the calendar profile in hidden fields "$FilterFormula_"
Remove those fields to stop the rules engine even if the rule  documents (in the mailbox) were deleted.
0
 
sns-emeaAuthor Commented:
How can I find this hidden field "$FilterFormula_" ?

We upgraded from 6.02 to 8.5.2 to entirely new server but ofcourse same NSF files.
0
 
umeliCommented:
Hi
In the comments section of this article is an example agent
http://itknowledgeexchange.techtarget.com/itanswers/email-still-forwarding-after-forwarding-rule-has-been-deleted/
search for ron jarvis
0
 
Sjef BosmanGroupware ConsultantCommented:
> How can I find this hidden field "$FilterFormula_" ?
Did you check the link I posted??

Did you upgrade the mail file to the new template? As far as I can tell, the problem should be solved then.
0
 
sns-emeaAuthor Commented:
Even after upgrading the template to mail85.ntf still the same, I can see that $FilterFormula_0 still contain the forward rule which was created earlier, How to delete this ? I can view it by using notespeek but cannot edit.
0
 
Sjef BosmanGroupware ConsultantCommented:
0
 
sns-emeaAuthor Commented:
Print "Removing field '" & sFieldName & "' from
Calendar Profile."

This field is in RED... ??
0
 
Sjef BosmanGroupware ConsultantCommented:
C'mon! You've done some LotusScript before, haven't you? So you should know that a Carriage Return got inserted in the line...

Print "Removing field '" & sFieldName & "' from Calendar Profile."
0
 
sns-emeaAuthor Commented:
Seriously this is the very first time i will be working on lotus script.

The agent is save now but now when i right click and run it says "This agent must be run from a view window".
0
 
Sjef BosmanGroupware ConsultantCommented:
Seriously?? What took you so long? ;-)

Either do what it says, i.e. open a view, click one document (it won't change the document) and run the agent, or set the agent's selection to None (in the Designer, in the Agent's properties)
0
 
sns-emeaAuthor Commented:
Well I did it myself by creating a button which clear the calender profile, Its just that the user have to create his signature again and thats it. But is this a bug ? There is no fix for it?
Sub Click(Source As Button) 
      Dim session As New NotesSession 
      Dim db As NotesDatabase 
      Dim doc As NotesDocument 
      Set db=session.CurrentDatabase 
      Set doc=db.GetProfileDocument("CalendarProfile") 
      Call doc.remove(True) 
      If doc Is Nothing Then 
              Msgbox "Profile Document Was Successfully Removed" 
      Else 
              Msgbox "Profile Document WAS NOT Removed",48 
      End If 
      
End Sub

Open in new window

0
 
Sjef BosmanGroupware ConsultantCommented:
You 'cleared' the whole CalendarProfile?? Then you really *did* it, because that removes all the user's mail and calendar preferences! Not a good idea...
0
 
sns-emeaAuthor Commented:
How can i change the code for this agent into a button so whenever I need to run for a particular user he/she just have to click on it and this will wipe out the rule which doesn't exist in UI but exist in calender profile ??
'(Options)
Option Public
Option Explicit

Sub Initialize
%REM
Author: Ron Jarvis
Purpose: Removes all mail rules contained in caledar profile. Needed to handle 
situations where the rule has been removed from the UI but still exitsts in the 
calendar profile.
%END REM

Dim i As Integer
Dim iDocNeedsSaving As Integer
Dim sFieldName As String

Dim ns As New notessession
Dim ndb As notesdatabase
Dim nd As notesdocument
Dim niTemp As notesitem

Set ndb = ns.currentdatabase
Set nd = ndb.getprofiledocument("CalendarProfile")
Print "Handle on Calendar Profile...."

iDocNeedsSaving = False

'Kill the rules
For i = 0 To 50
sFieldName = "$FilterFormula_" & i
Set niTemp = nd.getFirstItem(sFieldName)
If Not niTemp Is Nothing Then
Print "Removing field '" & sFieldName & "' from 
Calendar Profile."
Call niTemp.Remove
iDocNeedsSaving = True
End If
Next

'Kill the rule counter field
sFieldName = "$FilterFormulaCount"
Set niTemp = nd.getFirstItem(sFieldName)
If Not niTemp Is Nothing Then
Print "Removing field '" & sFieldName & "' from Calendar 
Profile."
Call niTemp.Remove
iDocNeedsSaving = True
End If

If iDocNeedsSaving Then
Call nd.Save(True, False)
Print "All rule information removed from the Calendar Profile."
Else
Print "No rule information found on Calendar Profile."
End If	

End Sub

Open in new window

0
 
Sjef BosmanGroupware ConsultantCommented:
The code above removes all info regarding Rules from the Preferences as stored in the profile document. The code can run in an agent but also in a button. Where do you want to show the button? In a mail? Create a new mail, and while in the text, click Create/Hotspot/Button. Set it to run LotusScript and paste the code in.
0
 
sns-emeaAuthor Commented:
is this better then the code (button) which i mentioned earlier ? the only thing is after clicking it the signature is gone
0
 
Sjef BosmanGroupware ConsultantCommented:
The code you added in http:#37052088 removes all mail and calendar preferences, so you'd better not use it.

The code in http:#37056339 seems okay to me. What happens if you run it??
0
 
sns-emeaAuthor Commented:
Thanks a lot the code did it !!! As i create as a button.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 9
  • 8
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now