don't use NAMESPACE unless the server supports it
This commit is contained in:
parent
b3eb5661eb
commit
6f4cd030f8
8
imap.c
8
imap.c
|
@ -410,6 +410,8 @@ imap_exec (imap_t * imap, const char *fmt, ...)
|
|||
imap->have_starttls = 1;
|
||||
else if (!strcmp ("AUTH=CRAM-MD5", arg))
|
||||
imap->have_cram = 1;
|
||||
else if (!strcmp ("NAMESPACE", arg))
|
||||
imap->have_namespace = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -607,10 +609,9 @@ imap_open (config_t * box, unsigned int minuid)
|
|||
ret = imap_exec (imap, "LOGIN \"%s\" \"%s\"", box->user, box->pass);
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
/* get NAMESPACE info */
|
||||
if (box->use_namespace && !imap_exec (imap, "NAMESPACE"))
|
||||
if (!ret && box->use_namespace && imap->have_namespace &&
|
||||
!imap_exec (imap, "NAMESPACE"))
|
||||
{
|
||||
/* XXX for now assume personal namespace */
|
||||
if (is_list (imap->ns_personal) &&
|
||||
|
@ -620,7 +621,6 @@ imap_open (config_t * box, unsigned int minuid)
|
|||
ns_prefix = imap->ns_personal->child->child->val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user