

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in net.sourceforge.lists.courier-users[courier-users] IMAP protocol error i...| From | Sent On | Attachments |
|---|---|---|
| Donald L. Nash | Apr 19, 2001 3:43 pm | .txt |
| Sam Varshavchik | Apr 19, 2001 4:30 pm | .txt |
| Donald L. Nash | Apr 20, 2001 9:05 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [courier-users] IMAP protocol error in Courier-IMAP 1.3.7 | Actions... |
|---|---|---|
| From: | Donald L. Nash (D.N...@utexas.edu) | |
| Date: | Apr 19, 2001 3:43:34 pm | |
| List: | net.sourceforge.lists.courier-users | |
| Attachments: | ||
I've tumbled upon a small buglet in Courier-IMAP 1.3.7. I received a spam that contained a syntactically incorrect To: header:
To: "jul...@vental.com" jul...@vental.com
Note the missing <> around the actual address, it should be this:
To: "jul...@vental.com" <jul...@vental.com>
Well, that confuses Courier-IMAP so that it sends an invalid IMAP response to a FETCH ENVELOPE command. Here's the relevent snip from my mail client's IMAP log:
("jul...@vental.com" NIL "\"julia" "vental.com"")
Courier-IMAP isn't quoting the literal '"' after vental.com. It should be this:
("jul...@vental.com" NIL "\"julia" "vental.com\"")
That would at least be syntactically correct even though it would result in the address having spurrious quote marks in it. Ideally it should just leave the literal quote marks out entirely. I realize that this is in response to a message with incorrect headers, but Courier-IMAP should probably handle this a bit more gracefully. It makes my mail client (Mulberry) stop dead in its tracks. Neither the broken message nor the any messages after it in my mailbox show up in Mulberry's mailbox window, so I can't delete a bad messages without logging in interactively and looking for it in my maildir.
I've attached the entire spam message (it's short), but as text/plain rather than message/rfc822 since it has the syntax error. I've also attached the complete IMAP log for the incident.
On a totally different subject, Mulberry lets me toggle the state of the \Draft flag arbitrarily for any message. However, Courier-IMAP ignores these attempts and only sets \Draft for messages in the Draft folder (currently a disabled feature). I made a small modification to Courier-IMAP to allow \Draft to be set. It's a grand total of 15 lines difference in imap/imapd.c (fewer if you remove my conditional compilation directives), 2 in imap/search.c and 2 in imap/storeinfo.c. I'm new to this list and haven't quite got the list etiquette down yet. If source patches are welcome here I'll gladly post them if anyone is interested. FYI, they do contain a bug fix, but since the bug only manifests when dealing with the \Draft flag it evidently never got noticed. Briefly, the function get_flagname() in imap/imapd.c has these two lines:
else if (strcmp(p, "\\DRAFTS") == 0) flags->drafts=1;
However, the flag is called \DRAFT, not \DRAFTS. Further, the string DRAFTS is a C preprocessor macro defined in config.h:
/* Special drafts folder */ #define DRAFTS "Drafts"
The correct code for get_flagname() is:
else if (strcmp(p, "\\DRAFT") == 0) flags->drafts=1;
Even if no one is interested in the rest of my patch, this part at least is necessary if support for the Draft folder is ever enabled.
Enjoy,
-- Donald L. Nash, <D.N...@utexas.edu>, PGP Key ID: 0x689DA021 Telecommunication and Internet Services The University of Texas at Austin
Received: (qmail 23638 invoked by uid 0); 18 Apr 2001 05:16:06 -0000 Received: from mojo.ots.utexas.edu (128.83.185.16) by mail.ots.utexas.edu with SMTP; 18 Apr 2001 05:16:06 -0000 Received: (qmail 12075 invoked by uid 1160); 18 Apr 2001 05:16:04 -0000 Delivered-To: dln...@mojo.ots.utexas.edu Received: (qmail 12073 invoked by uid 110); 18 Apr 2001 05:16:04 -0000 Delivered-To: utex...@utexas.edu Received: (qmail 12070 invoked from network); 18 Apr 2001 05:16:03 -0000 Received: from unknown (HELO gaganan.com) (211.37.132.106) by mojo.ots.utexas.edu with SMTP; 18 Apr 2001 05:16:03 -0000 From: "Son Ho Jin" <ji...@gaganan.com> To: "jul...@vental.com" jul...@vental.com Subject: I got it Sender: "Son Ho Jin" <ji...@gaganan.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Date: Wed, 18 Apr 2001 14:15:40 +0900 Content-Transfer-Encoding: 8bit
Hey, lu
Sorry, it took longer than i expected but I found the sites, it's
the site will make your web surfing very convenient.
And here goes the other, it's
this one will help your shopping online
Get to the sites and mail me after
Take care..
--> #Logging started by user on Thu Apr 19 16:35:06 2001
--> #114 Starting IMAP Session on Thu Apr 19 16:35:07 2001
--> #114 Thu Apr 19 16:35:07 2001
* OK Courier-IMAP ready. Copyright 1998-2001 Double Precision, Inc. See COPYING
for distribution information.
--> #114 Thu Apr 19 16:35:07 2001
A00001 CAPABILITY
* CAPABILITY IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT
THREAD=REFERENCES SORT AUTH=CRAM-MD5 STARTTLS
A00001 OK CAPABILITY completed
--> #114 Thu Apr 19 16:35:07 2001 A00002 SELECT INBOX.Junk * FLAGS (\Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen)] Limited * 4 EXISTS * 0 RECENT * OK [UIDVALIDITY 987606893] Ok A00002 OK [READ-WRITE] Ok
--> #114 Thu Apr 19 16:35:07 2001 A00003 SEARCH UNSEEN * SEARCH A00003 OK SEARCH done.
--> #114 Thu Apr 19 16:35:07 2001 A00004 SEARCH DELETED * SEARCH A00004 OK SEARCH done.
--> #114 Thu Apr 19 16:35:07 2001
A00005 FETCH 1:4 (FLAGS RFC822.SIZE UID INTERNALDATE ENVELOPE BODYSTRUCTURE)
* 1 FETCH (FLAGS (\Seen) RFC822.SIZE 1520 UID 1 INTERNALDATE "18-Apr-2001
00:11:18 -0500" ENVELOPE ("Wed, 18 Apr 2001 14:10:47 +0900" "I got it" (("Son Ho
Jin" NIL "jin" "gaganan.com")) (("Son Ho Jin" NIL "jin" "gaganan.com")) (("Son
Ho Jin" NIL "jin" "gaganan.com")) (("jul...@vental.com" NIL "\"julia"
"vental.com"")("jul...@vental.com" NIL "julia" "vental.com")) NIL NIL NIL NIL)
BODYSTRUCTURE ("text" "plain" ("charset" "iso-8859-1") NIL NIL "8bit" 342 21 NIL
NIL NIL))
--> #114 Thu Apr 19 16:35:08 2001
* OK Courier-IMAP ready. Copyright 1998-2001 Double Precision, Inc. See COPYING
for distribution information.
--> #114 Thu Apr 19 16:35:08 2001
A00001 CAPABILITY
* CAPABILITY IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT
THREAD=REFERENCES SORT AUTH=CRAM-MD5 STARTTLS
A00001 OK CAPABILITY completed
--> #114 Thu Apr 19 16:35:08 2001 A00002 SELECT INBOX.Junk * FLAGS (\Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen)] Limited * 4 EXISTS * 0 RECENT * OK [UIDVALIDITY 987606893] Ok A00002 OK [READ-WRITE] Ok
--> #114 Thu Apr 19 16:35:10 2001 A00003 LOGOUT * BYE Courier-IMAP server shutting down A00003 OK LOGOUT completed
--> #114 Stopping IMAP Session on Thu Apr 19 16:35:10 2001
--> #Logging stopped by user on Thu Apr 19 16:35:16 2001








.txt