[horde] Auto creation of special folders?

Jan Schneider jan at horde.org
Mon Sep 21 14:54:35 UTC 2015


Zitat von Bjoern Voigt <bjoernv at arcor.de>:

> Jan Schneider wrote:
>> Zitat von Bjoern Voigt <bjoernv at arcor.de>:
>>
>>> I want to specify custom folder names for special folders (sent
>>> mails, templates etc.).
>>>
>>> I use Courier IMAP as IMAP backend and Horde Groupware 5.2.10.
>>> Courier IMAP uses "INBOX." as a folder prefix, e.g. folder "Sent" is
>>> "INBOX.Sent".
>>>
>>> Unfortunately Horde seems to ignore my folder names. Instead of my
>>> names (e.g. "postponed" for drafts) it creates folders with standard
>>> names (e.g. "Drafts") during login.
>>>
>>> My horde/imp/backends.local.php file
>>>
>>> <?php
>>> $servers['imap']['port']=143;
>>> $servers['imap']['maildomain']='mydomain.com';
>>> $servers['imap']['secure']=false;
>>> # Syntax variant 1
>>> # $servers['imap']['special_mboxes']=array(
>>> #      IMP_Mailbox::MBOX_DRAFTS => 'postponed',
>>> #      IMP_Mailbox::MBOX_SENT => 'Sent',
>>> #      IMP_Mailbox::MBOX_SPAM => 'Junk-E-Mail',
>>> #      IMP_Mailbox::MBOX_TEMPLATES => 'Templates',
>>> #      IMP_Mailbox::MBOX_TRASH => 'Trash',
>>> #   );
>>> # Syntax variant 2
>>> $servers['imap']['special_mboxes'][IMP_Mailbox::MBOX_DRAFTS] =
>>> 'postponed';
>>> $servers['imap']['special_mboxes'][IMP_Mailbox::MBOX_SENT] = 'Sent';
>>> $servers['imap']['special_mboxes'][IMP_Mailbox::MBOX_SPAM] =
>>> 'Junk-E-Mail';
>>> $servers['imap']['special_mboxes'][IMP_Mailbox::MBOX_TEMPLATES] =
>>> 'Templates';
>>> $servers['imap']['special_mboxes'][IMP_Mailbox::MBOX_TRASH] =
>>> 'Trash';
>>>
>>> $servers['imap']['autocreate_special'] = true;
>>> ?>
>>>
>>> The IMAP dump shows, that my folder names already exists (I created
>>> them manually). But Horde creates folders with standard names:
>>>
>>> * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
>>> THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL
>>> ACL2=UNION STARTTLS XMAGICTRASH] Courier-IMAP ready. Copyright
>>> 1998-2011 Double Precision, Inc.  See COPYING for distribution
>>> information.
>>> A0001 LOGIN testuser testpassword
>>> A0001 OK LOGIN Ok.
>>> 2 CAPABILITY
>>> * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
>>> THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL
>>> ACL2=UNION XMAGICTRASH
>>> 2 OK CAPABILITY completed
>>> C64 EXAMINE ""
>>> C64 NO Mailbox does not exist, or must be subscribed to.
>>> 2 NAMESPACE
>>> * NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))
>>> 2 OK NAMESPACE completed.
>>> 3 LSUB "" INBOX
>>> 3 OK LSUB completed
>>> 4 LSUB "" INBOX.*
>>> 4 OK LSUB completed
>>> 5 LSUB "" #shared.*
>>> 5 OK LSUB completed
>>> 6 LSUB "" shared.*
>>> 6 OK LSUB completed
>>> 7 LIST "" INBOX
>>> * LIST (\Unmarked \HasChildren) "." "INBOX"
>>> 7 OK LIST completed
>>> 8 LIST "" INBOX.*
>>> * LIST (\HasNoChildren) "." "INBOX.Trash"
>>> * LIST (\HasNoChildren) "." "INBOX.postponed"
>>> * LIST (\HasNoChildren) "." "INBOX.Junk-E-Mail"
>>> * LIST (\HasNoChildren) "." "INBOX.Sent"
>>> 8 OK LIST completed
>>> 9 LIST "" #shared.*
>>> 9 OK LIST completed
>>> 10 LIST "" shared.*
>>> 10 OK LIST completed
>>> 11 EXAMINE INBOX
>>> * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
>>> * OK [PERMANENTFLAGS ()] No permanent flags permitted
>>> * 0 EXISTS
>>> * 0 RECENT
>>> * OK [UIDVALIDITY 441399963] Ok
>>> * OK [MYRIGHTS "acdilrsw"] ACL
>>> 11 OK [READ-ONLY] Ok
>>> C64 EXAMINE ""
>>> C64 NO Mailbox does not exist, or must be subscribed to.
>>> 2 LIST "" *
>>> * LIST (\HasNoChildren) "." "INBOX.Trash"
>>> * LIST (\HasNoChildren) "." "INBOX.postponed"
>>> * LIST (\HasNoChildren) "." "INBOX.Junk-E-Mail"
>>> * LIST (\HasNoChildren) "." "INBOX.Sent"
>>> * LIST (\Unmarked \HasChildren) "." "INBOX"
>>> 2 OK LIST completed
>>> 3 LIST "" *
>>> * LIST (\HasNoChildren) "." "INBOX.Trash"
>>> * LIST (\HasNoChildren) "." "INBOX.postponed"
>>> * LIST (\HasNoChildren) "." "INBOX.Junk-E-Mail"
>>> * LIST (\HasNoChildren) "." "INBOX.Sent"
>>> * LIST (\Unmarked \HasChildren) "." "INBOX"
>>> 3 OK LIST completed
>>> 4 NAMESPACE
>>> * NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))
>>> 4 OK NAMESPACE completed.
>>> 5 LSUB "" 1
>>> 5 OK LSUB completed
>>> 6 LIST "" 1
>>> 6 OK LIST completed
>>> 7 LSUB "" INBOX.Templates
>>> 7 OK LSUB completed
>>> 8 LIST "" INBOX.Templates
>>> 8 OK LIST completed
>>> 9 CREATE INBOX.Templates
>>> 9 OK "INBOX.Templates" created.
>>> 10 SUBSCRIBE INBOX.Templates
>>> 10 OK Folder subscribed.
>>> 11 LSUB "" INBOX.Templates
>>> * LSUB (\HasNoChildren) "." "INBOX.Templates"
>>> 11 OK LSUB completed
>>> 12 LIST "" INBOX.Templates
>>> * LIST (\HasNoChildren) "." "INBOX.Templates"
>>> 12 OK LIST completed
>>> 13 LSUB "" INBOX.Drafts
>>> 13 OK LSUB completed
>>> 14 LIST "" INBOX.Drafts
>>> 14 OK LIST completed
>>> 15 CREATE INBOX.Drafts
>>> 15 OK "INBOX.Drafts" created.
>>> 16 SUBSCRIBE INBOX.Drafts
>>> 16 OK Folder subscribed.
>>> 17 LSUB "" INBOX.Drafts
>>> * LSUB (\HasNoChildren) "." "INBOX.Drafts"
>>> 17 OK LSUB completed
>>> 18 LIST "" INBOX.Drafts
>>> * LIST (\HasNoChildren) "." "INBOX.Drafts"
>>> 18 OK LIST completed
>>> 19 LSUB "" INBOX.Sent
>>> 19 OK LSUB completed
>>> 20 LIST "" INBOX.Sent
>>> * LIST (\HasNoChildren) "." "INBOX.Sent"
>>> 20 OK LIST completed
>>> 21 LSUB "" INBOX.Spam
>>> 21 OK LSUB completed
>>> 22 LIST "" INBOX.Spam
>>> 22 OK LIST completed
>>> 23 CREATE INBOX.Spam
>>> 23 OK "INBOX.Spam" created.
>>> 24 SUBSCRIBE INBOX.Spam
>>> 24 OK Folder subscribed.
>>> 25 LSUB "" INBOX.Spam
>>> * LSUB (\HasNoChildren) "." "INBOX.Spam"
>>> 25 OK LSUB completed
>>> 26 LIST "" INBOX.Spam
>>> * LIST (\HasNoChildren) "." "INBOX.Spam"
>>> 26 OK LIST completed
>>> 27 SELECT INBOX
>>> * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
>>> * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)]
>>> Limited
>>> * 0 EXISTS
>>> * 0 RECENT
>>> * OK [UIDVALIDITY 441399965] Ok
>>> * OK [MYRIGHTS "acdilrsw"] ACL
>>> 27 OK [READ-WRITE] Ok
>>> C64 EXAMINE ""
>>> C64 NO Mailbox does not exist, or must be subscribed to.
>>>
>>> An additional problem is, that I am unable to select my own folder
>>> name (e.g. "postponed" in Webmail -> Drafts) until I started the
>>> Mail app and subscribed the folder.
>>>
>>> Any idea, what is wrong here?
>>>
>>> Greetings,
>>> Björn
>>> --
>>> Horde mailing list
>>> Frequently Asked Questions: http://horde.org/faq/
>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>
>> You need to set those in prefs.local.php, not in the backends
>> configuration.
> Thanks. But why there is a special folders example configuration in
> horde/imp/backends.php if horde/imp/prefs*.php would be correct?

So that you can set different defaults for different backend, if necessary.

> Could you please provide an example for the correct syntax of
> special folders in horde/imp/prefs.local.php?

There are already examples in prefs.php.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the horde mailing list