Das Notes Forum
Domino 9 und frühere Versionen => ND6: Administration & Userprobleme => Thema gestartet von: tttonic am 16.02.05 - 08:21:11
-
Hi,
habe schon im forum gesucht und einiges gefunden, leider keine einfache Lösung.
Hat jemand es schon umgesetzt oder geschafft Quickrules an alle MA schnell zu verteilen?
gruß
tttonic
-
Hast Du dich schon einmal mit Rule beschäftigt?
Würde nie eine Rule in MailFile einbauen. IBM hat zu viele Probleme mit Rules und da noch selber rumbasteln kommt sicher nicht gut.
Gruss
Andy B
Noch etwas von IBM zum Lesen.
V. Background on Mail Rule Functionality:
When a mail rule is enabled, a $FilterFormula_# field is added to the Calendar Profile, where x equals the number of the rule in the list starting at 0. For example, if you have 3 rules in your Rules folder, and the 1st and 3rd rules in the list are enabled, the Calendar Profile will have $FilterFormula_0 and $FilterFormula_2. This field will have a formula that matches the condition of your rule and is used to perform the rule action when mail is deposited. When a rule is disabled, we remove the corresponding $FilterFormula_# field from the Calendar Profile. Note: The fact that the $FilterFormula_# field is not deleted when a mail rule is deleted prior to being disabled is the SPR issue discussed above. By design, the $FilterFormula_# entries are not renumbered when a rule is disabled or deleted.
The Calendar Profile also contains a field $FilterFormulaCount that should coincide with the total number of Rules within the mail file. The $FilterFormulaCount should always be at least one value higher than the highest $FilterFormula_# entry -- otherwise the rules that fall numerically above $FilterFormulaCount-1 will not run. For example if $FilterFormulaCount is 4, no $FilterFormula entries above $FilterFormula_3 will be executed. The reason for the offset by 1 is because the $FilterFormulaCount has a starting value of 1 and the $FilterFormula_# entries have a starting value of 0.
Note: In Notes 6.x, the numbering can be slightly different depending on whether the Calendar & Scheduling "Configure" button has been executed. When you click the C&S "Configure" button, an additional rule is created and is written to $FilterFormula_0 and any previously existing rules are re-written to a $FilterFormula_# entry 1 value higher. For example, $FilterFormula_0 is shifted to $FilterFormula_1, and $FilterFormula_1 is shifted to $FilterFormula_2, etc. The $FilterFormulaCount value is also incremented by 1. So, in the case where a user has clicked the C&S "Configure" button, the $FilterFormulaCount value will be equal to the number of user rules plus 1.
-
ja ich habe mich mal mit Rules beschäftigt.
Und bei ganz einfachen gibt es hier auch kein Problem.
Es geht hier nur um die Subjectüberprüfung und das verschieben in einen Ornder.
Warum sollte dieses Probleme bereiten?
Funktioniert einwandfrei bei allen wo die Regel läuft.
Nur möchte ich nicht jedes Mailfile anfassen um die Regel dort zu erstellen.
Das muss doch einfacher gehen.
gruß
tttonic
-
Eine Rule wird im als Formula-Dokument gespeichert und auch im Kalender Profil. In diesem zusammenspiel hat IBM Probleme . Siehe TN 1088058 vom 31.01.2005
Bekannte Probleme: Rule laufen auch nach dem löschen weiter oder Rule laufen nicht.
In Notes.net Forum hatte ich einmal ein Script gesehen welches Rule erstellen kann.
Versuche das mit den QuickRule den Beutzer "anzuhängen".
Gruss
Andy B
-
In Notes.net Forum hatte ich einmal ein Script gesehen welches Rule erstellen kann.
Versuche das mit den QuickRule den Beutzer "anzuhängen".
Gruss
Andy B
Kannst du dich erinnert wo? habe eben gesucht und leider nichts gefunden.
-
Subject: Create a mail rule in script
Posted by Alexandre Guerard on 30.07.2004 at 20:41 using a Web browser
Category: Domino Designer Release: 6.5 Platform: Windows 2000
Content:
Hi,
I want to create a mail rule using script when the database is open.
The script bellow verify if the Rules already exist and create if not.
1) In the Database Script, I verify if the rule exist and if not, I create the document
2) I pass the new Doc and I run the same code as the OK button in the New rules form. Call ButtonOKClient()
The rules get created but the problem is that it doesn't work.
Thank You
Alexandre
Database SCRIPT (Initialize):
Call SCISetJunkRule()
Sub SCISetJunkRule:
Sub SCISetJunkRule()
'// Verify if rules exist
Dim m_Session As New notessession
Dim m_Db As notesdatabase
Dim ViewEntry As Notesviewentry
Dim m_RulesView As notesview
Dim m_ViewCollection As NotesViewEntryCollection
Dim m_RuleDoc As notesdocument
Dim doc As NotesDocument
Set m_db = m_Session.currentdatabase
Set m_RulesView = m_Db.getview("Rules")
If m_RulesView Is Nothing Then Exit Sub
Set m_ViewCollection = m_RulesView.Allentries
If m_ViewCollection.count > 0 Then
Set ViewEntry = m_ViewCollection.Getfirstentry
While Not ViewEntry Is Nothing
Set doc = ViewEntry.Document
If Instr(doc.ConditionList(0),"[SPAM]") <> 0 Then
Exit Sub
End If
Set ViewEntry = m_ViewCollection.Getnextentry( ViewEntry )
Wend
End If
'//Find Highest Rules
Dim Highest As Integer
If m_RulesView Is Nothing Then Exit Sub
Highest = 0
Set m_ViewCollection = m_RulesView.Allentries
If m_ViewCollection.count > 0 Then
Set ViewEntry = m_ViewCollection.Getfirstentry
While Not ViewEntry Is Nothing
If highest < ViewEntry.Columnvalues( 1 ) Then
Highest = Cint( ViewEntry.Columnvalues( 1 ) )
End If
Set ViewEntry = m_ViewCollection.Getnextentry( ViewEntry )
Wend
End If
If Highest = 0 Then
Highest = 1
End If
'// Create rules
Dim exclude(1) As String
Dim FilterFormulaItem As NotesItem
Dim m_CalProfile As NotesDocument
Set m_CalProfile = m_db.GetProfileDocument("CalendarProfile")
Set FilterFormulaItem = m_CalProfile.getfirstitem("$FilterFormula")
If m_CalProfile Is Nothing Then
Exit Sub
End If
exclude(0)="A"
exclude(1)="D"
Set m_RuleDoc = m_Db.CreateDocument
Call m_RuleDoc.ReplaceItemValue("Form","Mailrule")
Call m_RuleDoc.ReplaceItemValue("action","1")
Call m_RuleDoc.ReplaceItemValue("condition","1")
Call m_RuleDoc.ReplaceItemValue("logic","1")
Call m_RuleDoc.ReplaceItemValue("Type","1")
Call m_RuleDoc.ReplaceItemValue("TokActionList","1|1|($JunkMail)")
Call m_RuleDoc.ReplaceItemValue("tokConditionList","2|1|[SPAM]|0")
Call m_RuleDoc.ReplaceItemValue("inportance","1")
Call m_RuleDoc.ReplaceItemValue("importancecond","1")
Call m_RuleDoc.ReplaceItemValue("operator","0")
Call m_RuleDoc.ReplaceItemValue("ExpireDates","D")
Call m_RuleDoc.ReplaceItemValue("ExpireNumber","5")
Call m_RuleDoc.ReplaceItemValue("ConditionList", " Subject contains [SPAM]")
Call m_RuleDoc.ReplaceItemValue("ActionList"," move to folder ($JunkMail)")
Call m_RuleDoc.ReplaceItemValue("ExcludeFromView",exclude)
Call m_RuleDoc.ReplaceItemValue("$FilterFormula","")
Call m_RuleDoc.ReplaceItemValue("$NoPurge","")
Call m_RuleDoc.ReplaceItemValue("Enable", "1")
Call m_RuleDoc.ReplaceItemValue("PROTECTFROMARCHIVE", "1")
Call m_RuleDoc.ReplaceItemValue("OrderNum",Highest)
Call m_RuleDoc.ComputeWithForm(False,False)
Dim ws As New NotesUIWorkspace
Dim uidoc As notesuidocument
Set uidoc = ws.editdocument(True,m_RuleDoc)
Call SaveRule(m_RuleDoc, uidoc)
End Sub
Script Library - Function SaveRule
Function SaveRule (m_RuleDoc As NotesDocument, m_uidoc As NotesUIDocument) As String
Set note = m_RuleDoc
Set uidoc = m_uidoc
Call ButtonOKClient()
End function
-
Mmmmh.
warum kann ich in dem o.a. Script eine Rule erstellen lassen indem Sonderzeichen drin sind?
Wenn ich eine normale rule erstelle ist dieses doch nicht möglich.
Das geht nur in einer Quick-Rule, komischerweise.
-
Ob das Script am ende läuft oder nicht, kann ich nicht sagen. Ich habe für dich das Script gesucht und hir gepostet.
Meine Meinung zu einem solchen Script kennst Du ja.
Gruss
Andy B
-
Ob das Script am ende läuft oder nicht, kann ich nicht sagen. Ich habe für dich das Script gesucht und hir gepostet.
Meine Meinung zu einem solchen Script kennst Du ja.
Gruss
Andy B
Verzeich, aber das steht doch nun überhaupt nicht im Zusammenhang mit meinem Kommentar .