Commit eb373604 authored by Sam Varshavchik's avatar Sam Varshavchik

cone: enable POP3 UTF8 support.

parent 88889e2f
2018-07-21 Sam Varshavchik <mrsam@courier-mta.com>
* Enable UTF8 mode when connecting to IMAP and POP3 servers that
support them.
2018-04-27 Sam Varshavchik <mrsam@courier-mta.com>
* gcc 8/Fedora 28 fixes.
......
......@@ -271,16 +271,21 @@ class mail::pop3::LoginTask : public mail::pop3::Task,
void loginCallbackUid(std::string);
void loginCallbackPwd(std::string);
void utf8Handler(const char *message);
void utf8CapaDone();
void stlsCapaDone();
void nonExternalLogin();
public:
LoginTask(mail::pop3 &server, mail::callback *callbackArg);
~LoginTask();
private:
bool utf8_capability;
};
mail::pop3::LoginTask::LoginTask(mail::pop3 &server,
mail::callback *callbackArg)
: Task(callbackArg, server)
: Task(callbackArg, server), utf8_capability(false)
{
}
......@@ -417,6 +422,9 @@ void mail::pop3::LoginTask::addCapability(const char *message)
v="1";
}
if (c == "UTF8")
utf8_capability=true;
if (v.size() == 0)
v="1";
......@@ -424,6 +432,20 @@ void mail::pop3::LoginTask::addCapability(const char *message)
}
void mail::pop3::LoginTask::processedCapabilities()
{
if (!utf8_capability)
utf8CapaDone();
myserver->socketWrite("UTF8\r\n");
currentHandler= &LoginTask::utf8Handler;
}
void mail::pop3::LoginTask::utf8Handler(const char *message)
{
utf8CapaDone();
}
void mail::pop3::LoginTask::utf8CapaDone()
{
#if HAVE_LIBCOURIERTLS
......@@ -2176,7 +2198,7 @@ void mail::pop3::installTask(Task *t)
if (wasEmpty)
(*tasks.begin())->installedTask();
}
mail::pop3::~pop3()
{
disconnect("POP3 server connection aborted.");
......
2018-07-21 Sam Varshavchik <mrsam@courier-mta.com>
* courier-imap: update Courier-IMAP to support UTF8 POP3. Update
version of the courierpop3dsizelist cache file.
2018-07-17 Sam Varshavchik <mrsam@courier-mta.com>
* courier-imap, sqwebmail: update Courier-IMAP to support UTF8 IMAP.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment