6.0.0-git
2025-03-24

Diff for ImpImapConfig between 21 and 22

+ The imap_config parameter in IMP 4.1+'s {{servers.php}} file

##red|//**As mentioned in the {{servers.php}} file, the Horde Project does not officialy support this parameter.  Use at your own risk.**//##

##red|**For information on configuring UW-IMAP servers, see [ImpUWIMAPNamespaces IMP UW-IMAP/Namespace Configuration Tips].**##

##red|//**As mentioned in the {{servers.php}} file, the Horde Project does not officialy support this parameter.  Use at your own risk.**//##



##red|**For information on configuring UW-IMAP servers, see [ImpUWIMAPNamespaces IMP UW-IMAP/Namespace Configuration Tips].**##



##red|**This##red|**This documentation is also valid for [http://www.horde.org/mimp/ MIMP 1.0].**##



----



+++

----

+++ Why use this parameter?



# The IMAP_Client:: library does not currently support logins for your IMAP authentication type (i.e. kerberos, NTLM).

# You **both** know what you are doing **and** you want to save a single login to the server at the beginning of a session.  (i.e. you are implementing IMP in a large environment, know what these IMAP configuration items are, and want to save a bit of bandwith/CPU cycles for each session by eliminating a server access needed to obtain the IMAP server information).  Quite honestly, if the auto-detect method of IMP - the default - correctly detects the IMAP server information, you really shouldn't be messing with this configuration option.



----



+++ Why is IMAP_Client needed at all?  Or, why don't you guys just use the c-client library to get this information?



Simple.  The php ``imap_*()`` functions don't provide a way for us to get this information.  //Trust us//, we would gladly use those functions if they existed.

----

+++ What is the format of the 'namespace' parameter?

Please see the documentation for the {{namespace}} function in {{imp/lib/IMAP/Client.php}}.  Or you can try going to our [http://dev.horde.org/api/imp/IMP/IMP_IMAPClient.html#getNamespace API Documentation]. (No guarantees this link will remain correct).

----

----



+++ What is the format of the 'namespace' parameter?



Please see the documentation for the {{namespace}} function in {{imp/lib/IMAP/Client.php}}.  Or you can try going to our [http://dev.horde.org/api/imp/IMP/IMP_IMAPClient.html#getNamespace API Documentation]. (No guarantees this link will remain correct).



----



++++++ What does an examplean example 'imap_config' entry in {{servers.php}} look like forlike for IMP?



Thanks for asking.  It looks like the following (this is an example of a dovecot-1.0 IMAP server):


Thanks for asking.  It looks like the following (this is an example of a dovecot-1.0 IMAP server):

<code>

'imap_config' => array(

    'children' => true,

    'namespace' => array(

        '' => array(

            'name' => '',

            'delimiter' => '.',

            'type' => 'personal',

            'hidden'            'hidden' => false

        ),

        ),
        '#foo.' => array(

            'name' => '#foo.',

            'delimiter' => '.',

            'type' => 'shared',

            'hidden' => false

        ),

        '#foo2.' => array(

            'name' => '#foo2.',

            'delimiter' => '.',

            'type' => 'public', (or 'other' if using IMP 4.2+)

            'hidden'            'hidden' => false

        )

        )
    ),

    'search_charset' => array(

        'UTF-8' => true

    )

)

</code>



This
This is an example of an UW-IMAP server:



<code>

'imap_config' => array(

    'children' => false,

    'namespace' => array(

        'INBOX/' => array(

            'name' => 'INBOX/',

            'delimiter' => '/',

            'type' => 'personal',

            'hidden' => false,

        ),

    ),

    'search_charset' => array(

        'UTF-8' => true

    )

)

</code>



Another UW-IMAP example:



<code>

    'imap_config' => array(

        'children' => false,

        'namespace' => array(

            'mail/' => array(

                'name' => 'mail/',

                'delimiter' => '/',

                'type' => 'personal',

                'hidden' => false,

            ),

        ),

        'search_charset' => array(

            'UTF-8' => true

        )

    )

</code>



Obviously, //don't copy this code directly into servers.php and expect it to work!//  This is merely an example.  Your IMAP server configuration is almost certainly different.



##red|**Note:** MIMP does not require the 'search_charset' value.##

##red|**Note:** As of IMP 4.2.1, the 'children' value is no longer needed.##



----



+++ Notes for Perdition Imap/Pop3  Proxy

Please, pay attention with imap capability command. IMAP_Client run CAPABILITY before login, so, perdition proxy don't realy return a full capability string. You can use perdition parameter to fix it: 

<code>

imap_capability "IMAP4rev1 CHILDREN NAMESPACE"

</code>



----


----

+++ Notes for dovecot using maildir INBOX and mbox Mail/ folders with dimp 1.1.1

There is a strange bug with imp1.1.1 and dovecot in the configuration in the subject.

My old config which used to work fine with imp was:

<code>

    'imap_config' => array(

        'children' => true,

        'namespace' => array(

                'Mail/' => array(

                        'name' => 'Mail/',

                        'delimiter' => '/',

                        'type' => 'personal',

                        'hidden' => false

                ),

        ),

        'search_charset' => array(

                'UTF-8' => true

        )

    )

</code>



butbut using this config with dimp 1.1.1, when selecting a new message from the inbox, the preview would never show up and the "working" icon would never go away. if a message was not marked as new, it could be previewed without any problems. also preview of new messages under Mail/ folders worked fine as well.



To

To make the preview work for new messages in the INBOX i had to add a new namespace definition (maildir style) for INBOX:
style):
<code>

    'namespace' => array(

            'INBOX'            '' => array(

            'name'
            'name' => 'INBOX',
'',
            'delimiter' => '.',

            'type' => 'personal',

            'hidden'            'hidden' => false
true
            ),



</code>

any maildir namespace will do to fix the issue. we dont want to support both formats so i am hiding this definition.