Subject: | Append Message - Server Response |
IMAP-Servers
Courier IMAP & Dovecot
Try to append a message to any Mailbox. Fails because Moduls wait's for "+ go ahead", but Courier and Dovecot sent only "+ Ok". The RFC don't spezifies the string. Changed to check if "+" exists, maybe match all kinds of imap-servers.
RFC
Example: C: A003 APPEND saved-messages (\Seen) {310}
S: + Ready for literal data
C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
C: From: Fred Foobar <foobar@Blurdybloop.COM>
C: Subject: afternoon meeting
C: To: mooch@owatagu.siam.edu
C: Message-Id: <B27397-0100000@Blurdybloop.COM>
C: MIME-Version: 1.0
C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
C:
C: Hello Joe, do you think we can meet at 3:30 tomorrow?
C:
S: A003 OK APPEND completed
--- IMAPTalk.pm.old 2004-09-02 15:18:23.000000000 +0200
+++ IMAPTalk.pm.new 2004-09-02 15:17:39.000000000 +0200
@@ -2408,16 +2408,21 @@
# Add to line buffer and send
$LineBuffer .= " {" . $LiteralSize . "}" . LB;
$Self->_imap_socket_out($LineBuffer);
$LineBuffer = "";
# Wait for "+ go ahead" response
my $GoAhead = $Self->_imap_socket_read_line();
- if ($GoAhead eq "+ go ahead") {
+
+ if (index($GoAhead,"+") == 0) {
+
if (ref($Arg) eq "ARRAY") {
$Self->_imap_socket_out($Arg->[1]);
$Self->_copy_handle_to_handle($Arg, $Self->{Socket}, $LiteralSize);
}
# If no "+ go ahead" response, set error state
} else {