[Spambayes] IMAP problem

Tony Meyer tameyer at ihug.co.nz
Fri Feb 4 01:20:36 CET 2005


> Here's the bottom of a screenscrape from just three messages getting
> processed, all of which were left in INBOX as well as being copied to 
> SUSPECT. Note that in the INBOX they were flagged as Seen, if 
> that helps at all.:

That makes it even weirder!  Assuming that it's not the mail client marking
them as Seen, then the "STORE X +FLAGS.SILENT (\Deleted \Seen)" command is
half working, in that it's storing the \Seen flag, but not the \Deleted one.

Unfortunately, all looks good in the IMAP conversation:

[...]
>   02:51.44 < HELB13 OK APPEND complete.
>   02:51.44 > HELB14 UID STORE 47325 +FLAGS.SILENT (\Deleted \Seen)
>   02:51.44 < HELB14 OK UID STORE complete.
>   02:51.44 untagged responses dump:
>                 EXISTS: "3" "4"
>                 PERMANENTFLAGS: "(\Deleted \Draft \Seen \Answered)"
>                 READ-WRITE: ""
>                 UIDNEXT: "47328" "47329"
>                 FLAGS: "(\Deleted \Draft \Seen \Answered)"
>                 UIDVALIDITY: "1095696076"
>                 RECENT: "0"
[...]

The only thing I can think of left is to try and manually set the \Deleted
flag for a message, and see if that works.  Something like this (in a
command window):

(You only type the first line (including the number), it returns the rest,
which might be slightly different)

---

1. Connect to the mail server:

$ telnet mail.example.com 143
Trying xxx.xxx.xxx.xxx...
Connected to mail.example.com.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS AUTH=LOGIN] mail.example.com
IMAP4rev1 2003.339-cpanel at Fri, 4 Feb 2005 13:11:05 +1300 (NZDT)

2. Log in to the mail server:

0 login username password
0 OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT
SCAN  SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User
username authenticated

3. Select the Inbox:

1 select inbox
* 12 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1091599302] UID validity status
* OK [UIDNEXT 49] Predicted next UID
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (\* \Answered \Flagged \Deleted \Draft \Seen)]
Permanent flags 1 OK [READ-WRITE] SELECT completed

4. Get the flags for message #1.

2 fetch 1 flags
* 1 FETCH (FLAGS (\Answered))
2 OK FETCH completed

5. Get the headers for message #1, so you know which one it is in your mail
client:

3 fetch 1 RFC822.HEADER
* 1 FETCH (RFC822.HEADER {746}
Return-Path: <kelly_c_harris at yahoo.com>
From: "Kelly Harris" <kelly at example.com>
To: "Meyer, Tony" <T.A.Meyer at local>
Subject: The play
Date: Tue, 9 Mar 2004 08:09:16 +1200
Message-ID: <20040308200916.93026.qmail at web41608.mail.yahoo.com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_0104_01C47A50.6035AFC0"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.4510
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-MS-TNEF-Correlator: <20040308200916.93026.qmail at web41608.mail.yahoo.com>
X-OlkEid: 48040E208A0983C242C67041AA6F5B5197C9F79A
x-originalarrivaltime: 08 Mar 2004 20:11:00.0779 (UTC)
FILETIME=[79D23FB0:01C405 49]

)
3 OK FETCH completed

(Obviously, your message headers will be completely different).

6. Try to set the \Deleted and \Seen flags:

4 store 1 +FLAGS.SILENT (\Deleted \Seen)
4 OK STORE completed

7. Read the flags again, to check that they are changed:

5 fetch 1 flags
* 1 FETCH (FLAGS (\Seen \Deleted \Answered))
5 OK FETCH completed

8. Logout

6 logout
* BYE kiwiwebhost.mitosis.net.nz IMAP4rev1 server terminating connection 6
OK LOGOUT completed

---

Using the header info from step 5, figure out which message this is in your
mail client, and see if it gets changed from not \Deleted to \Deleted, and
see if that matches the results from step 6.  (After this is done, you
probably want to use your mail client to reset the flags back to what they
were, too).

If neither the mail client nor the results from step 6 indicate that the
\Deleted flag is set, you could try using +FLAGS rather than +FLAGS.SILENT
and see if that makes a difference.

=Tony.Meyer

-- 
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes.
http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this.



More information about the Spambayes mailing list