wiki:debugging

Version 2 (modified by octo, 12 years ago) (diff)

--

Debugging

Writing a bug report

If you run into an "Unknown error" in LogicMail, chances are that you have found a bug. However, simply telling me about it really won't do any good. If you want to write a useful bug report, you first need to collect the following information:

  • What you did that triggered the error
  • What mail server software you were connecting to (i.e. Cyrus, Courier, Dovecot, Exchange, etc.)
  • What was happening in the network conversation between LogicMail and the mail server when the error occurred
    • You can find this out by packet sniffing the connection between your BlackBerry, or a simulator, and your mail server.
    • You can also find this out by simulating the same commands LogicMail uses, using something like telnet

Capturing IMAP traffic

Using something like telnet (or an SSL-enabled telnet), you can connect to your mail server and send the same commands that program like LogicMail would. Below are some examples of common operations that could be used to produce bug reports for LogicMail issues.

View messages in a mailbox

octo@hyperion:~$ telnet mail.example.org 143
Trying 192.168.20.10...
Connected to mail.example.org.
Escape character is '^]'.
* OK mail.example.org Cyrus IMAP4 v2.3.0 server ready
A1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE IDLE STARTTLS AUTH=GSSAPI SASL-IR URLAUTH
A1 OK Unknown code imap 54
A2 LOGIN testuser testpass
A2 OK User logged in
A3 SELECT "INBOX"
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
* 20 EXISTS
* 0 RECENT
* OK [UNSEEN 14]
* OK [UIDVALIDITY 1084720106]
* OK [UIDNEXT 21]
A3 OK [READ-WRITE] Unknown code imap 54
A4 FETCH 19:20 (FLAGS ENVELOPE)
* 19 FETCH (FLAGS (\Seen) ENVELOPE ("Sat, 17 Mar 2007 15:51:48 -0400" {19}
[blah] "quote test" (("Derek Konigsberg" NIL "octo" "logicprobe.org")) (("Derek Konigsberg" NIL "octo" "logicprobe.org")) (("Derek Konigsberg" NIL "octo" "logicprobe.org")) ((NIL NIL "foo" "genericfoo.org")) NIL NIL NIL "<200703171551.48597.octo@logicprobe.org>"))
* 20 FETCH (FLAGS (\Seen) ENVELOPE ("Sun, 18 Mar 2007 09:04:29 -0700" {23}
[list] "this is a test" (("Bill Smith" NIL "bsmith" "XXXX")) (("Bill Smith" NIL "bsmith" "XXXX")) (("Bill Smith" NIL "bsmith" "XXXX")) ((NIL NIL "bsmith" "XXXXXXXX")) NIL NIL NIL "<45FD630D.1040808@XXXXX>"))
A4 OK Unknown code imap 54 (0.000 sec)
A5 LOGOUT
* BYE Unknown code imap 53
A5 OK Unknown code imap 54
Connection to mail.example.org closed by foreign host.