-
Improvement
-
Resolution: Fixed
-
Minor
-
3.1
-
MOODLE_31_STABLE
-
MOODLE_31_STABLE
-
MDL-53315-imap-namespace -
-
I'm having issues connecting inbounce imap fetching from courier (hence MDL-53314) which spits out this debug imap trace:
S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information.
|
1 [AUTHENTICATE Command - method: PLAIN, username: moodle@moodle.catalyst-au.net]
|
C: 2 CAPABILITY
|
S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION
|
S: 2 OK CAPABILITY completed
|
>> Command 2 took 0.0462 seconds.
|
Connection established.
|
C: 3 LIST "" INBOX
|
C: 4 LIST "" tobeconfirmed
|
S: * LIST (\Unmarked \HasChildren) "." "INBOX"
|
S: 3 OK LIST completed
|
>> Command 3 took 0.0448 seconds.
|
S: 4 OK LIST completed
|
>> Command 4 took 0.088 seconds.
|
Unable to find the 'tobeconfirmed' mailbox - creating it.
|
C: 5 CREATE tobeconfirmed
|
S: 5 NO Invalid mailbox name.
|
>> Command 5 took 0.0439 seconds.
|
Unable to connect to IMAP server. Failed with 'IMAP error reported by server.'
|
... used 5 dbqueries
|
... used 3.6027870178223 seconds
|
Scheduled task complete: Incoming email pickup (tool_messageinbound\task\pickup_task)
|
C: 6 LOGOUT
|
S: * BYE Courier-IMAP server shutting down
|
S: 6 OK LOGOUT completed
|
>> Command 6 took 0.0439 seconds.
|
So it's having trouble making the folders, which I can fix by hacking this:
--- a/admin/tool/messageinbound/classes/manager.php
|
+++ b/admin/tool/messageinbound/classes/manager.php
|
@@ -42,7 +42,7 @@ class manager {
|
/**
|
* @var string The mailbox to store messages in when they are awaiting confirmation.
|
*/
|
- const CONFIRMATIONFOLDER = 'tobeconfirmed';
|
+ const CONFIRMATIONFOLDER = 'INBOX.tobeconfirmed';
|
|
/**
|
* @var string The flag for seen/read messages. |
Courier's FAQ says that the client should automatically lookup the folder namespace using the NAMESPACE extension