| Summary: | Storing mail: BAD Protocol Error | ||
|---|---|---|---|
| Product: | [Unmaintained] mailody | Reporter: | Tommi Tervo <tommi.tervo> |
| Component: | general | Assignee: | Tom Albers <toma> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | debug output | ||
|
Description
Tommi Tervo
2006-12-08 09:06:20 UTC
Created attachment 18840 [details]
debug output
Actual sending is ok, but storing the send message on the imap server fails. SVN commit 611465 by toma:
Make the Append command rfc compatible (at least the part that i read).
BUG: 138523
M +15 -2 imap.cpp
M +3 -1 imap.h
M +2 -1 socketsafe.cpp
--- trunk/playground/pim/mailody/src/imap.cpp #611464:611465
@@ -237,10 +237,14 @@
else if (m_currentQueueItem.state() == Queue::SyncMailBox ||
m_currentQueueItem.state() == Queue::SelectMailBox ||
- m_currentQueueItem.state() == Queue::SaveMessage)
+ m_currentQueueItem.state() == Queue::SaveMessageData)
QTimer::singleShot(0, this,
SLOT(slotParseExists()));
+ else if (m_currentQueueItem.state() == Queue::SaveMessage)
+ QTimer::singleShot(0,this,
+ SLOT(slotParseSaveMessage()));
+
else if (m_currentQueueItem.state() == Queue::GetHeaderList)
QTimer::singleShot(0, this,
SLOT(slotParseGetHeaderList()));
@@ -453,6 +457,14 @@
SLOT(slotParseExists()));
}
+void Imap::slotParseSaveMessage()
+{
+ kdDebug() << k_funcinfo << " : " << m_received << endl;
+ m_currentQueueItem = m_queue.first();
+ if (m_imap)
+ m_imap->write( m_currentQueueItem.command() );
+ m_queue.pop_front();
+}
void Imap::slotParseExists()
{
@@ -831,7 +843,8 @@
m_queue.append( Queue(Queue::SaveMessage, mb,
"APPEND \"" + mb + "\" (\\Seen) {"
+ QString::number(message.length())
- + "}\r\n" + message));
+ + "}"));
+ m_queue.append( Queue(Queue::SaveMessageData, mb, message));
}
void Imap::timerEvent( QTimerEvent * )
--- trunk/playground/pim/mailody/src/imap.h #611464:611465
@@ -46,7 +46,8 @@
GetRecent,
Move,
Expunge,
- SaveMessage
+ SaveMessage,
+ SaveMessageData
};
Queue(): st(0) {}
@@ -265,6 +266,7 @@
void slotParseExists();
void slotParseGetHeaderList();
void slotParseGetMessage();
+ void slotParseSaveMessage();
};
}
--- trunk/playground/pim/mailody/src/socketsafe.cpp #611464:611465
@@ -184,7 +184,8 @@
#endif
QStringList splitted = QStringList::split("\n",t);
if (!m_gather || splitted.grep(QRegExp("^a02")).count() != 0 ||
- splitted.grep(QRegExp("^* OK")).count() != 0)
+ splitted.grep(QRegExp("^* OK")).count() != 0 ||
+ t.startsWith("+"))
{
emit data(received);
received = QString::null;
|