Newsgroup: it.comp.appl.notes-domino
Titolo: Regola di posta

Buon giorno a tutti,
vorrei sapere se qualcuno ha avuto il mio stesso problema :
inserendo una regola di posta (invio di una copia dell' e-mail ad un
utente esterno)
la regola inserita non viene visualizzata ma sembra funzionare.
Nb.
Domino 7.02
il problema e su un solo archivio
già riorganizzato l' archivio
già sostituito il template
ringrazio in anticipo


Potrebbe essere che hai creato la regola e poi, inavvertitamente l'hai
cancellata.
in questo caso la regola resta attiva anche se non la vedi
Se questo fosse il caso ti inserisco qui le istruzioni per
eliminarla...(in inglese)
Devi scaricarti il programma NotesPeek che serve per analizzare il
contenuto dei DB da fuori Notes (anche se, ovviamente ti chiede l'ID e
la password).
Normally this comes from deleting a rule BEFORE disabling it, but who
knows. I used to have to hunt these down with NotesPeek, if I
remember
correctly. I would find out how many "phantom" rules were still in
the
mailbox, create n+1 new rules, then disable all the new rules, then
delete
all the rules. That would take out the "phantoms", along with the new
rules.
INOLTRE:
Mail rules are stored in two places - in the Rule document, and in
the
Calendar Profile document (enabled rules only).  The server's ROUTER
task is
what processes rules, and rather than reading the Rules documents, it
reads
the rules from the Calendar Profile document prior to delivering a
message
(there is some caching too).
As you've discovered, a user can delete a Rule document.  The problem
is
with R5 clients, and maybe some Notes 6 clients, deleting a Rule
document
without first enabling it leaves the Rule in the Calendar Profile
document.
And once the Rule document is gone, there is no easy way to get it out
of
the Calendar Profile.  Sometimes you can create enough new rules,
enable
them,and disable them - but I've had minimal success with that.
If you open the database with NotesPeek and look at the Calendar
Profile
document, you'll see at least two fields - $FilterFormulaCount and one
or
more $FilterFormula_x fields (one for each enabled rule).  While the
content
of the $FilterFormula_x field is not totally readable, If you are
familiar
with Formula language, you'll be able to figure out which rule is in
the
Calendar Profile that doesn't have a corresponding Rule document.
The only real reliable way is to write an agent to manipulate the
Calendar
Profile document by deleting the $FilterFormula_x field, and setting
the
$FilterFormulaCount to the right value.  I think that number is
supoosed to
be the total number of Rules documents, whether they are enabled or
not.  If
there are no Rules documents, you can delete the $FilerFormulaCount
field.
When I deal with this problem, I find it best to disable all rules,
and
delete all of the $FilterFormula_x fields.  Then go back and re-enable
the
rules you want.
In definitiva per risolvere il problema si deve andare con Notes Peek
nel db interessato, aprire la cartella "profiles" cercare il documento
"calendar Profile" e controllare la presenza della regola incriminata
tra le $filterFormula poi leggere il contenuto del campo
$FilterFormulaCount. Creare N+1 regole, disabilitarle e cancellarle. A
questo punto la regola "dovrebbe" essere eliminata.
Questo codice potrebbe risolvere il problema ma al momento non
funziona e non ho avuto il tempo di analizzarlo... se qualcuno ne
avese voglia...
========================================================
Sub Initialize
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Set db=session.CurrentDatabase
    Print db.Title
    Set doc=db.GetProfileDocument("CalendarProfile")
    Call doc.RemoveItem( "$FilterFormula_0" )
    Call doc.ReplaceItenValue( "$FilterFormulaCount", 0 )
togliere rem quando non da errori e provarlo su una copia.
REM Call doc.Save( True, False )
End Sub
========================================================
Ciao e buon lavoro
Mariano

 avese voglia...
Io ho usato questo in passato e funziona, prima bisogna disabilitare 
tutte le rules esistenti e visibili.
Creare un pulsante nel forder 'Rules' con il seguente codice:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim folder As NotesView
Set db = session.currentdatabase 
Set folder = db.GetView("(Rules)")
Dim calendarProfile As NotesDocument
Set calendarProfile = db.GetProfileDocument( "CalendarProfile" )
Forall item In calendarProfile.Items
If( Lcase$(Left$(item.Name,15)) = "$filterformula_" ) Then
Print "Cleanup " & item.Name
Call item.Remove
End If
End Forall
Call calendarProfile.Save( False, False )
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
Call workspace.OpenDatabase( db.Server, db.FilePath, "(Rules)" )
Messagebox "Ok." 
End Sub 
-- 
Michele.