#265 Error in mailbox path creation

closed-invalid
nobody
Core (82)
5
2011-10-23
2011-10-23
Anonymous
No

With
$CONF['domain_path'] = 'NO' and $CONF['domain_in_mailbox'] = 'NO' in config.php
mailbox path generated like
$CONF['domain_path'] = 'NO' and $CONF['domain_in_mailbox'] = 'YES'.
Change
$maildir = $fUsername . "/";
in create_mailbox.php at string 179 to
$maildir = escape_string (strtolower($_POST['fUsername'])) . "/";
resolve the problem.

Thnks.

Discussion

  • Christian Boltz

    Christian Boltz - 2011-10-23

    You mean something like this?

    (for username@example.com):
    you expect: "username/"
    actual result: "username@example.com/"

    This is intentional behaviour - if the maildir path would be just "username/", we would risk conflicts if you create a mailbox "username@foo.bar", the maildir would also be "username/" and the mails for username@example.com and username@foo.bar would be mixed up in the same maildir.

    This is also documented in config.inc.php:
    // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.
    $CONF['domain_in_mailbox'] = 'YES';

    I added a comment to the code (MailboxHandler.php) to avoid future confusion about this.

    If you really want to have only "username/" as name for the maildir (I don't recommend it, and you have been warned!), you can use a function for $CONF[maildir_name_hook].

     
  • Christian Boltz

    Christian Boltz - 2011-10-23
    • status: open --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks