[Spambayes] IMAP problem

Hans Henderson hans at pobox.com
Fri Jan 28 07:16:50 CET 2005


> Sorry

No worries at all Tony, thanks for your help (and your past work, and your 
ongoing coding!)

> So unsure/spam mail does get copied to the unsure/spam folders, but the 
originals are left undeleted in the inbox?

Exactly.

> Are they definitely not marked as deleted?

Yes. My mailer shows messages MFD with a red, strikethrough font. I can sit 
there and watch the flagging process, duplicates being made, then deleted, 
copies going into the suspect/unsure/ham folders, etc. But 99% of the time 
there is a full set of all three types left in the inbox.

>> Sometimes it does delete the spam from the INBOX, but never when there's 
a  big batch (first thing in the morning). When there's only a dozen or so 
incoming, it may work properly, but only sometimes.

> I guess if it sometimes does delete it, then it's probably not a display 
issue (unless your mailer is doing an expunge/purge and getting rid of the 
copies).

No, it's not. I was going to add that for the last dozen passes, it hasn't 
deleted any messages at all, but this morning it did work once, with about 
40 spam, but an hour later it left 25 new ones in the inbox (along with two 
suspect and one ham).

>> don't know where to find my logs, if there are any.
> Any 'log' type information is just output to the console, so if you're 
running in a console window, then it will be there, otherwise it goes 
nowhere.

There there aren't any error/exception messages showing during my regular 
runs, no differences that I can see between the times the messages do get 
deleted and the times they don't.


> I probably need a copy of the IMAP conversation. To get that, run 
sb_imapfilter.py with "-i4" and save the output somewhere. Then EDIT IT TO 
REMOVE YOUR USERNAME AND PASSWORD from the top and send it to me/the list.

=============================
FYI, here's the batch file I use to run SB. I end it by just closing the 
window when it's between cycles.
---
D:
cd "D:\Data\SpamBayes\"
"C:\Program Files\SpamBayes\scripts\sb_imapfilter.py" -c -t -v -l 5
exit
---

Here's the output from with "-i4 >temp.txt" added to the above:

===
>From the redirected text file:
---
SpamBayes IMAP Filter Version 0.5 (November 2004)
and engine SpamBayes Engine Version 0.3 (January 2004).

Loading database D:\Data\SpamBayes\hammie.db... Done.
Training
   Training ham folder SENT
.....       0 trained.
   Training ham folder Spambayes/SBTr_ham
       0 trained.
   Training spam folder Spambayes/SBTr_spam
       0 trained.
Training took 0.1100 seconds, 0 messages were trained
Classifying
*.*.*.*.*.*.
Classified 0 ham, 6 spam, and 0 unsure.
Classifying took 2.0000 seconds.
===
>From the console (looks like it's just the tail end of it, hope that's 
enough - if not, please tell me another way to capture the output):
---
  09:53.88 < * OK [UIDVALIDITY 1096726907] UID Validity
  09:53.90 < * OK [UIDNEXT 11154] Predicted next UID
  09:53.90 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable me
ssage flags
  09:53.90 < DMPL66 OK [READ-WRITE] SELECT completed.
  09:53.90 > DMPL67 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892593-2")
  09:53.93 < * SEARCH
  09:53.93 < DMPL67 OK SEARCH complete.
  09:53.93 > DMPL68 UID SEARCH RECENT
  09:53.96 < * SEARCH
  09:53.96 < DMPL68 OK SEARCH complete.
  09:53.96 > DMPL69 UID SEARCH ALL
  09:53.98 < * SEARCH 11145 11146 11147 11148 11149 11150 11151 11152 11153
  09:53.98 < DMPL69 OK SEARCH complete.
  09:53.98 > DMPL70 SELECT INBOX
  09:53.98 < * 21 EXISTS
  09:53.98 < * 0 RECENT
  09:53.98 < * FLAGS (\Deleted \Draft \Seen \Answered)
  09:53.98 < * OK [UIDVALIDITY 1095696076] UID Validity
  09:53.98 < * OK [UIDNEXT 45404] Predicted next UID
  09:53.98 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable message flags
  09:53.98 < DMPL70 OK [READ-WRITE] SELECT completed.
  09:53.98 > DMPL71 UID FETCH 45398 RFC822.HEADER
  09:53.98 < * 16 FETCH (UID 45398 RFC822.HEADER {1544}
  09:53.98 read literal size 1544
  09:53.98 < )
  09:53.98 < DMPL71 OK UID FETCH complete.
  09:54.01 > DMPL72 UID FETCH 45398 (BODY.PEEK[])
  09:54.01 < * 16 FETCH (UID 45398 BODY[] {18756}
  09:54.01 read literal size 18756
  09:54.01 < )
  09:54.01 < DMPL72 OK UID FETCH complete.
  09:54.01 > DMPL73 UID FETCH 45398 (FLAGS INTERNALDATE)
  09:54.01 < * 16 FETCH (UID 45398 FLAGS () INTERNALDATE "28-Jan-2005 
00:50:36 -0500")
  09:54.01 < DMPL73 OK UID FETCH complete.
  09:54.02 > DMPL74 APPEND INBOX "28-Jan-2005 00:50:36 -0500" {18786}
  09:54.02 < + Ready to receive 18786 bytes
  09:54.02 write literal size 18786
  09:54.04 < * 22 EXISTS
  09:54.04 < * OK [UIDNEXT 45405] Predicted next UID
  09:54.04 < DMPL74 OK APPEND complete.
  09:54.04 > DMPL75 UID STORE 45398 +FLAGS.SILENT (\Deleted \Seen)
  09:54.04 < DMPL75 OK UID STORE complete.
  09:54.04 untagged responses dump:
                EXISTS: "21" "22"
                PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
                READ-WRITE: ""
                UIDNEXT: "45404" "45405"
                FLAGS: "(\Deleted \Draft \Seen \Answered)"
                UIDVALIDITY: "1095696076"
                RECENT: "0"
  09:54.07 > DMPL76 NOOP
  09:54.07 < DMPL76 OK NOOP complete.
  09:54.07 > DMPL77 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892594")
  09:54.09 < * SEARCH
  09:54.09 < DMPL77 OK SEARCH complete.
  09:54.09 > DMPL78 UID SEARCH RECENT
  09:54.10 < * SEARCH
  09:54.10 < DMPL78 OK SEARCH complete.
  09:54.10 > DMPL79 UID SEARCH ALL
  09:54.10 < * SEARCH 45383 45384 45385 45386 45387 45388 45389 45390 45391 
45392 45393 45394 45395 45396 45397 45398 45399 5400 45401 45402 45403 45404
  09:54.10 < DMPL79 OK SEARCH complete.
  09:54.18 > DMPL80 UID FETCH 45404 (FLAGS INTERNALDATE)
  09:54.18 < * 22 FETCH (UID 45404 FLAGS () INTERNALDATE "28-Jan-2005 
00:50:36 -0500")
  09:54.18 < DMPL80 OK UID FETCH complete.
  09:54.20 > DMPL81 APPEND "Spambayes/SB_suspect" "28-Jan-2005 00:50:36 
-0500" {19942}
  09:54.20 < + Ready to receive 19942 bytes
  09:54.20 write literal size 19942
  09:54.20 < DMPL81 OK APPEND complete.
  09:54.20 > DMPL82 UID STORE 45404 +FLAGS.SILENT (\Deleted \Seen)
  09:54.21 < DMPL82 OK UID STORE complete.
  09:54.21 untagged responses dump:
                EXISTS: "21" "22"
                PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
                READ-WRITE: ""
                UIDNEXT: "45404" "45405"
                FLAGS: "(\Deleted \Draft \Seen \Answered)"
                UIDVALIDITY: "1095696076"
                RECENT: "0"
  09:54.21 > DMPL83 NOOP
  09:54.21 < DMPL83 OK NOOP complete.
  09:54.21 > DMPL84 SELECT "Spambayes/SB_suspect"
  09:54.21 < * 10 EXISTS
  09:54.21 < * 0 RECENT
  09:54.21 < * FLAGS (\Deleted \Draft \Seen \Answered)
  09:54.21 < * OK [UIDVALIDITY 1096726907] UID Validity
  09:54.21 < * OK [UIDNEXT 11155] Predicted next UID
  09:54.24 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable message flags
  09:54.24 < DMPL84 OK [READ-WRITE] SELECT completed.
  09:54.24 > DMPL85 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892594")
  09:54.27 < * SEARCH
  09:54.27 < DMPL85 OK SEARCH complete.
  09:54.27 > DMPL86 UID SEARCH RECENT
  09:54.32 < * SEARCH
  09:54.32 < DMPL86 OK SEARCH complete.
  09:54.32 > DMPL87 UID SEARCH ALL
  09:54.32 < * SEARCH 11145 11146 11147 11148 11149 11150 11151 11152 11153 
11154
  09:54.32 < DMPL87 OK SEARCH complete.
  09:54.32 > DMPL88 SELECT INBOX
  09:54.32 < * 22 EXISTS
  09:54.32 < * 0 RECENT
  09:54.32 < * FLAGS (\Deleted \Draft \Seen \Answered)
  09:54.32 < * OK [UIDVALIDITY 1095696076] UID Validity
  09:54.32 < * OK [UIDNEXT 45405] Predicted next UID
  09:54.32 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable message flags
  09:54.32 < DMPL88 OK [READ-WRITE] SELECT completed.
  09:54.32 > DMPL89 UID FETCH 45399 RFC822.HEADER
  09:54.32 < * 17 FETCH (UID 45399 RFC822.HEADER {1708}
  09:54.32 read literal size 1708
  09:54.32 < )
  09:54.35 < DMPL89 OK UID FETCH complete.
  09:54.35 > DMPL90 UID FETCH 45399 (BODY.PEEK[])
  09:54.35 < * 17 FETCH (UID 45399 BODY[] {2223}
  09:54.35 read literal size 2223
  09:54.35 < )
  09:54.35 < DMPL90 OK UID FETCH complete.
  09:54.35 > DMPL91 UID FETCH 45399 (FLAGS INTERNALDATE)
  09:54.35 < * 17 FETCH (UID 45399 FLAGS () INTERNALDATE "28-Jan-2005 
00:50:30 -0500")
  09:54.35 < DMPL91 OK UID FETCH complete.
  09:54.37 > DMPL92 APPEND INBOX "28-Jan-2005 00:50:30 -0500" {2224}
  09:54.37 < + Ready to receive 2224 bytes
  09:54.37 write literal size 2224
  09:54.37 < * 23 EXISTS
  09:54.37 < * OK [UIDNEXT 45406] Predicted next UID
  09:54.37 < DMPL92 OK APPEND complete.
  09:54.37 > DMPL93 UID STORE 45399 +FLAGS.SILENT (\Deleted \Seen)
  09:54.40 < DMPL93 OK UID STORE complete.
  09:54.40 untagged responses dump:
                EXISTS: "22" "23"
                PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
                READ-WRITE: ""
                UIDNEXT: "45405" "45406"
                FLAGS: "(\Deleted \Draft \Seen \Answered)"
                UIDVALIDITY: "1095696076"
                RECENT: "0"
  09:54.40 > DMPL94 NOOP
  09:54.40 < DMPL94 OK NOOP complete.
  09:54.40 > DMPL95 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892594-2")
  09:54.42 < * SEARCH
  09:54.42 < DMPL95 OK SEARCH complete.
  09:54.42 > DMPL96 UID SEARCH RECENT
  09:54.43 < * SEARCH
  09:54.43 < DMPL96 OK SEARCH complete.
  09:54.43 > DMPL97 UID SEARCH ALL
  09:54.45 < * SEARCH 45383 45384 45385 45386 45387 45388 45389 45390 45391 
45392 45393 45394 45395 45396 45397 45398 45399 45400 45401 45402 45403 
45404 45405
  09:54.45 < DMPL97 OK SEARCH complete.
  09:54.49 > DMPL98 UID FETCH 45405 (FLAGS INTERNALDATE)
  09:54.49 < * 23 FETCH (UID 45405 FLAGS () INTERNALDATE "28-Jan-2005 
00:50:30 -0500")
  09:54.49 < DMPL98 OK UID FETCH complete.
  09:54.51 > DMPL99 APPEND "Spambayes/SB_suspect" "28-Jan-2005 00:50:30 
-0500" {3258}
  09:54.51 < + Ready to receive 3258 bytes
  09:54.51 write literal size 3258
  09:54.52 < DMPL99 OK APPEND complete.
  09:54.52 > DMPL100 UID STORE 45405 +FLAGS.SILENT (\Deleted \Seen)
  09:54.52 < DMPL100 OK UID STORE complete.
  09:54.52 untagged responses dump:
                EXISTS: "22" "23"
                PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
                READ-WRITE: ""
                UIDNEXT: "45405" "45406"
                FLAGS: "(\Deleted \Draft \Seen \Answered)"
                UIDVALIDITY: "1095696076"
                RECENT: "0"
  09:54.52 > DMPL101 NOOP
  09:54.52 < DMPL101 OK NOOP complete.
  09:54.52 > DMPL102 SELECT "Spambayes/SB_suspect"
  09:54.52 < * 11 EXISTS
  09:54.52 < * 0 RECENT
  09:54.52 < * FLAGS (\Deleted \Draft \Seen \Answered)
  09:54.52 < * OK [UIDVALIDITY 1096726907] UID Validity
  09:54.52 < * OK [UIDNEXT 11156] Predicted next UID
  09:54.56 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable message flags
  09:54.56 < DMPL102 OK [READ-WRITE] SELECT completed.
  09:54.56 > DMPL103 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892594-2")
  09:54.59 < * SEARCH
  09:54.59 < DMPL103 OK SEARCH complete.
  09:54.59 > DMPL104 UID SEARCH RECENT
  09:54.62 < * SEARCH
  09:54.62 < DMPL104 OK SEARCH complete.
  09:54.62 > DMPL105 UID SEARCH ALL
  09:54.62 < * SEARCH 11145 11146 11147 11148 11149 11150 11151 11152 11153 
11154 11155
  09:54.62 < DMPL105 OK SEARCH complete.
  09:54.62 > DMPL106 SELECT INBOX
  09:54.62 < * 23 EXISTS
  09:54.62 < * 0 RECENT
  09:54.62 < * FLAGS (\Deleted \Draft \Seen \Answered)
  09:54.62 < * OK [UIDVALIDITY 1095696076] UID Validity
  09:54.62 < * OK [UIDNEXT 45406] Predicted next UID
  09:54.62 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable message flags
  09:54.62 < DMPL106 OK [READ-WRITE] SELECT completed.
  09:54.62 > DMPL107 UID FETCH 45400 RFC822.HEADER
  09:54.63 < * 18 FETCH (UID 45400 RFC822.HEADER {1503}
  09:54.63 read literal size 1503
  09:54.63 < )
  09:54.65 < DMPL107 OK UID FETCH complete.
  09:54.65 > DMPL108 UID FETCH 45400 (BODY.PEEK[])
  09:54.65 < * 18 FETCH (UID 45400 BODY[] {1759}
  09:54.65 read literal size 1759
  09:54.65 < )
  09:54.65 < DMPL108 OK UID FETCH complete.
  09:54.67 > DMPL109 UID FETCH 45400 (FLAGS INTERNALDATE)
  09:54.67 < * 18 FETCH (UID 45400 FLAGS () INTERNALDATE "27-Jan-2005 
21:58:09 -0800")
  09:54.67 < DMPL109 OK UID FETCH complete.
  09:54.67 > DMPL110 APPEND INBOX "27-Jan-2005 21:58:09 -0800" {1801}
  09:54.67 < + Ready to receive 1801 bytes
  09:54.67 write literal size 1801
  09:54.68 < * 24 EXISTS
  09:54.68 < * OK [UIDNEXT 45407] Predicted next UID
  09:54.68 < DMPL110 OK APPEND complete.
  09:54.68 > DMPL111 UID STORE 45400 +FLAGS.SILENT (\Deleted \Seen)
  09:54.68 < DMPL111 OK UID STORE complete.
  09:54.68 untagged responses dump:
                EXISTS: "23" "24"
                PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
                READ-WRITE: ""
                UIDNEXT: "45406" "45407"
                FLAGS: "(\Deleted \Draft \Seen \Answered)"
                UIDVALIDITY: "1095696076"
                RECENT: "0"
  09:54.71 > DMPL112 NOOP
  09:54.71 < DMPL112 OK NOOP complete.
  09:54.71 > DMPL113 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892594-3")
  09:54.73 < * SEARCH
  09:54.73 < DMPL113 OK SEARCH complete.
  09:54.73 > DMPL114 UID SEARCH RECENT
  09:54.76 < * SEARCH
  09:54.76 < DMPL114 OK SEARCH complete.
  09:54.76 > DMPL115 UID SEARCH ALL
  09:54.76 < * SEARCH 45383 45384 45385 45386 45387 45388 45389 45390 45391 
45392 45393 45394 45395 45396 45397 45398 45399 45400 45401 45402 45403 
45404 45405 45406
  09:54.76 < DMPL115 OK SEARCH complete.
  09:54.81 > DMPL116 UID FETCH 45406 (FLAGS INTERNALDATE)
  09:54.81 < * 24 FETCH (UID 45406 FLAGS () INTERNALDATE "27-Jan-2005 
21:58:09 -0800")
  09:54.81 < DMPL116 OK UID FETCH complete.
  09:54.81 > DMPL117 APPEND "Spambayes/SB_suspect" "27-Jan-2005 21:58:09 
-0800"{2823}
  09:54.81 < + Ready to receive 2823 bytes
  09:54.81 write literal size 2823
  09:54.82 < DMPL117 OK APPEND complete.
  09:54.82 > DMPL118 UID STORE 45406 +FLAGS.SILENT (\Deleted \Seen)
  09:54.82 < DMPL118 OK UID STORE complete.
  09:54.82 untagged responses dump:
                EXISTS: "23" "24"
                PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
                READ-WRITE: ""
                UIDNEXT: "45406" "45407"
                FLAGS: "(\Deleted \Draft \Seen \Answered)"
                UIDVALIDITY: "1095696076"
                RECENT: "0"
  09:54.82 > DMPL119 NOOP
  09:54.82 < DMPL119 OK NOOP complete.
  09:54.82 > DMPL120 SELECT "Spambayes/SB_suspect"
  09:54.82 < * 12 EXISTS
  09:54.82 < * 0 RECENT
  09:54.82 < * FLAGS (\Deleted \Draft \Seen \Answered)
  09:54.85 < * OK [UIDVALIDITY 1096726907] UID Validity
  09:54.85 < * OK [UIDNEXT 11157] Predicted next UID
  09:54.85 < * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] 
Settable message flags
  09:54.85 < DMPL120 OK [READ-WRITE] SELECT completed.
  09:54.85 > DMPL121 UID SEARCH (UNDELETED HEADER X-Spambayes-MailId 
"1106892594-3")
  09:54.88 < * SEARCH
  09:54.88 < DMPL121 OK SEARCH complete.
  09:54.88 > DMPL122 UID SEARCH RECENT
  09:54.92 < * SEARCH
  09:54.92 < DMPL122 OK SEARCH complete.
  09:54.92 > DMPL123 UID SEARCH ALL
  09:54.93 < * SEARCH 11145 11146 11147 11148 11149 11150 11151 11152 11153 
11154 11155 11156
  09:54.93 < DMPL123 OK SEARCH complete.
  09:54.93 > DMPL124 LOGOUT
  09:54.93 < * BYE IMAP4rev1 server terminating connection.
  09:54.93 BYE response: IMAP4rev1 server terminating connection.
  09:54.93 < DMPL124 OK LOGOUT completed.
---
<eom>




More information about the Spambayes mailing list