[imp] Namespace and folders problem (possible bug)

Arminas g.arminas at gmail.com
Fri Aug 29 10:41:10 UTC 2008


It's me again. I've solved the problem. But I have no idea where this
problem comes from. So here is the solution:

I went to imp/lib and edited file prefs.php

in function handle_sentmailselect($updated) I've changed the following line:
$sent_mail_folder = IMP::appendNamespace($sent_mail_default);

to

$sent_mail_folder = $sent_mail_default;

and problem was solved. I guess this is a bug.

PS I know that using namespaces is totally not recommended but...

Good luck,
Arminas


2008/8/29 Arminas <g.arminas at gmail.com>:
> Hi everyone,
>
> I would like to ask if this is a bug, if so, I will create a ticket
> for this. I am using namespaces for imap because my maildir is not the
> same as homedir (mail server). So here is configuration of
> servers.php:
>
> $servers['imap'] = array(
>    'name' => 'my.mailserver',
>    'server' => 'my.mailserver.com',
>    'hordeauth' => false,
>    'protocol' => 'imap/notls',
>    'port' => 9999,
>    'maildomain' => 'maildomain.example.com',
>    'smtphost' => 'smtphost.example.com',
>    'folders' => 'mail/',
>    'smtpport' => 99,
>    'realm' => '',
>    'preferred' => '',
>    'imap_config' => array(
>        'children' => false,
>        'namespace' => array(
>            'mail/' => array(
>                'name' => 'mail/',
>                'delimiter' => '/',
>                'type' => 'personal',
>                'hidden' => false,
>            ),
>        ),
>        'search_charset' => array(
>            'UTF-8' => true
>        )
>    )
> );
>
> I have results that I want with this configuration: users are not able
> to take any action out of them mail directory. Here is a piece of code
> from prefs.php (imp/config):
>
> // sent mail folder
> $_prefs['sent_mail_folder'] = array(
> //    'value' => _("Sent"),
> // For Exchange server uncomment the line below and delete the line above
>    'value' => 'sent-mail',
>    'locked' => false,
>    'shared' => false,
>    'type' => 'implicit');
>
> It seems to be ok, BUT, if user goes into hist options and saves
> default value of "sent_mail_folder" , file "mail/sent-mail" is been
> created, even if file "/sent-mail" already exists. But if I compose
> any email and send it, all data of sent-mail is saved to correct place
> : "/sent-mail" .
>
> So the problem is about checking if directory/file exists when looking
> for sent-mail . (it creates /mail/mail/sent-mail instead of
> /mail/sent-mail).
>
> I didnt checked if the problem persists with another mboxes (trash,
> drafts etc.) yet, but I will.
>
>
> PS. I'm using the latest stable release of IMP (4.2).
>
>
> Thanks for respond,
> Arminas
>


More information about the imp mailing list