• Notes Item not Found ( kSpam 1.4b)

    By Erik Klessens 2 decades ago

    I use KSpam on a windows server and a few days ago I'm getting a lot of "Note Item Not Found" messages on the server. I'm using the Bayesian filtering and some days ago my mailspam.nsf was corrupt. The corrupted db was fixed but since then I get this error message.



    Anybody some suggestions ?

    • same with me

      By Bastian Anthon 2 decades ago

      I got the same message since I replaced the design of the mailspam.nsf. I previosly used the one Christian provided in one of the discussion threads.



      Seems there are lots of documents broken, while the Notes Item isnĀ“t there. Any idea how I can solve this without too much efforts ?

    • Re:

      By Tom Lyne 2 decades ago

      Do these messages appear on the console?



      At what time do they appear, i.e. when bload runs?



      tom

      • They appear on console

        By Erik Klessens 2 decades ago

        Tom,



        Yes the message appear on the console, below you can see part of the server log



        02/09/2005 12:30:28 PM kSpam.bload: Loading words

        02/09/2005 12:30:34 PM Note item not found



        02/09/2005 12:31:16 PM Note item not found

        02/09/2005 12:31:18 PM 0000221E: Base64: Missing end pad chars

        02/09/2005 12:31:18 PM Note item not found



        02/09/2005 12:33:04 PM Note item not found

        02/09/2005 12:33:56 PM kSpam.bload: Finished loading words

        02/09/2005 12:33:56 PM kSpam.bload: Calculating probabilities

        02/09/2005 12:33:57 PM kSpam.bload: Finished calculating probabilities

        02/09/2005 12:33:57 PM kSpam.bload: Ready



        If you need any more information please let me know.

        Grtx,

        Erik

      • ...after deleting <$FILE>-Items

        By Daniel Stelter 2 decades ago

        Hello Tom & all -



        it's happening when bload collects its data from mailgood and mailspam.

        This "issue" started here after I ran an agent which removes all attachments (exactly: the $FILE - NotesItems)

        from the documents in the given DBs.

        It looks like bload finds the links/references to the attachments while collecting data from the RichText-Fields (Body).

        Does bload takes care about attachments? I think not. But it looks like bload is trying to access them…



        Is it a problem? I don't know… Cheers -Daniel.

        • Re:

          By Tom Lyne 2 decades ago

          It's not a problem as such, just annoying, especially if this happens on thousands of emails.



          It used to happen in an old version of bload quite a bit, even with no removed attachments. There's no fix for it unfortunately, the msg printed to the console is from the CAPI.



          Rgds,

          tom

          • Re: (my) Solution

            By Daniel Stelter 2 decades ago

            okay, I played a little bit with it. At least on my side (with 1.4b) it happens only after deleting

            attachments from the mailgood/mailspam-DBs.

            The "removeAttachments"-Agent from Francois Lafleur in the given DBs is doing its job, but on

            a rough way. It's just deleting the "$FILE"-NotesItems from the docs. And bload doesn't like that…

            I rewrote the Agent to do it on a clean way (delete the EmbeddedObjects from the RichText-field).

            Result: Attachments are gone and bload is still happy…

            If interested, I could share the code here or provide it to build in the DB-templates.



            Cheers -Daniel.

            • Re: code

              By Tom Lyne 2 decades ago

              Could you post the code for the re-written agent please, I'll add it to the template.



              thanks,

              tom

              • Re: here we go...

                By Daniel Stelter 2 decades ago

                sorry about the format… it's the TAB Notes is using…

                was written in 6.0.2; should be okay with 4.x, 5.x, 6.5, too.


                Sub Initialize

                ' Delete all files attachment in the message

                ' Kspam MailSpam DB

                ' Feb 2004 by Francois Lafleur

                ' mod: Mar 2005 by Daniel Stelter (clean deletion)

                ' ================================

                Dim S As New NotesSession<br/>
                Dim db As NotesDatabase <br/>
                Dim dc As NotesDocumentCollection<br/>
                Dim doc As NotesDocument<br/>
                Dim RTItem As NotesRichTextItem<br/>
                '<br/>
                Set db = S.currentDatabase<br/>
                Set dc = db.UnprocessedDocuments<br/>
                Set doc = dc.GetFirstDocument<br/>
                '<br/>
                On Error Resume Next 'I don't care about errors here<br/>
                '<br/>
                Do While Not(doc Is Nothing)<br/>
                    If doc.HasEmbedded Then<br/>
                        Set RTItem = doc.Getfirstitem(&quot;Body&quot;)<br/>
                        Forall o In RTItem.EmbeddedObjects<br/>
                            If o.type = 1454 Then 'attachment<br/>
                                Call o.Remove<br/>
                            End If<br/>
                        End Forall<br/>
                        Call doc.save(True,True)<br/>
                    End If<br/>
                    '<br/>
                    Call S.UpdateProcessedDoc(doc) 'touch doc only once<br/>
                    '<br/>
                    Set doc = dc.GetNextDocument(doc)<br/>
                Loop<br/>
                '<br/>
                

                End Sub




                Cheers -Daniel.

                • Re: Thanks Dan <eom>

                  By Tom Lyne 2 decades ago
    • Note Item Not Found

      By Dan Cihon 2 decades ago

      I had this problem also. I believe it is being caused by either a corrupted email in your mailspam database or an email that has a attachment that was deleted. The only way I was able to stop the messages from being displayed was to delete messages from the mailspam databases until it no longer appeared. There is no way that I no of to find the problem message or messages. You have to reload the bload dll to see the result. You can do this by restarting the server. I think there is an easier way to do this but I can't remember how at the moment. Maybe Tom can help here.

      Thanks

      Dan Cihon