Uebimiau and courier-imap: cannot create folders

Discussion in 'General' started by ddelbia, Jan 8, 2006.

  1. ddelbia

    ddelbia Member

    Hi,
    I have posted the followint message on the Uebimiau forum, maybe someone can help me here....
    BTW, the package for ISPConfig contains uebi 2.7.2, 2.7.9 was released on 2005-10-12 with several bug fixes and security updates, how to upgrade package?

    -------------------
    Hi,
    Uebimiau is simply great! I knew it by ISPconfig.org.

    But I want to setup an imap server with Maildir support, I'm trying actually courier.imap.
    All seems to work fine but I can't create folders!

    I found some known issue related to courier's namespaces, it uses "INBOX." but I didn't find options to set this in uebimiau.

    Can someone help me?

    Thank you!
    -------------------
     
  2. ddelbia

    ddelbia Member

    Ok, I'm replyng myself... am I mad? :D

    2005-08-01 V2.7.8
    ........
    - Added support for folder prefix (eg. Courier folder style: INBOX.folder_name)
    ........

    Problem (partially) solved!

    But the question is, again: how to upgrade? Maybe I can replace file by hand but... I prefer a cleaner work...
    Maybe I can try to build a new package for ISPConfig, is it difficoult... good question, isn't it? ;-)

    Sorry for my english, I'm italian!
     
  3. falko

    falko Super Moderator Howtoforge Staff

  4. ddelbia

    ddelbia Member

    Ok!

    Code:
    cd /home/admispconfig/ispconfig/web
    mv webmail webmail.backup
    wget http://www.uebimiau.org/downloads/uebimiau-2.7.9-any.zip
    unzip uebimiau-2.7.9-any.zip
    rm uebimiau-2.7.9-any.zip
    cd webmail
    vi process.php
    
    Then added, after comments and before:
    require("./inc/inc.php");
    the following code:

    Code:
    //////////////////////// Map Alias to User Name (ISPConfig) ////////////////
    include("/home/admispconfig/ispconfig/lib/config.inc.php");
    $dbclass = $go_info["server"]["classes_root"] . $go_info["server"]["dir_trenner"] ."ispconfig_db_".$go_info["server"]["db_type"].".lib.php";
    include_once($dbclass);
    $dbname = 'db_'.$go_info["server"]["db_type"];
    $db = new $dbname;
    if($f_email){
      list($alias,$domain) = explode("@", $f_email);
      $webs = $db->queryAllRecords("SELECT * from isp_isp_web, isp_nodes where isp_isp_web.doc_id = isp_nodes.doc_id and isp_nodes.doctype_id = '1013' and isp_isp_web.server_id = '1' and isp_nodes.status = '1'");
      if(!empty($webs)){
        foreach($webs as $web){
          if($web["web_host"] != ""){
            $domain_hosts[] = $web["web_host"].".".$web["web_domain"];
          } else {
            $domain_hosts[] = $web["web_domain"];
          }
          $codomains = $db->queryAllRecords("SELECT isp_isp_domain.domain_domain, isp_isp_domain.domain_host from isp_dep,isp_isp_domain where isp_dep.child_doc_id = isp_isp_domain.doc_id and isp_dep.child_doctype_id ='1015' and isp_dep.parent_doctype_id = '1013' and isp_dep.parent_doc_id = '".$web["doc_id"]."' and isp_isp_domain.status != 'd'");
          if(!empty($codomains)){
            foreach($codomains as $codomain){
              if($codomain["domain_host"] != ""){
                $domain_hosts[] = $codomain["domain_host"].".".$codomain["domain_domain"];
              } else {
                $domain_hosts[] = $codomain["domain_domain"];
              }
            }
          }
          if(in_array($domain, $domain_hosts)){
            $users = $db->queryAllRecords("SELECT * FROM isp_nodes, isp_dep, isp_isp_user WHERE isp_dep.parent_doc_id = '".$web["doc_id"]."' AND isp_dep.parent_doctype_id = '1013' AND isp_dep.child_doc_id = isp_isp_user.doc_id AND isp_dep.child_doctype_id = '1014' AND isp_nodes.doc_id = isp_isp_user.doc_id AND isp_nodes.doctype_id = '1014' AND isp_nodes.status = '1'");
            if(!empty($users)){
              foreach($users as $user){
                $aliasse = explode("\n", str_replace("\r\n", "\n", trim($user["user_emailalias"])));
                if(trim($user["user_email"]) != "") $aliasse[] = trim($user["user_email"]);
                $aliasse[] = trim($user["user_username"]);
                if(in_array($alias, $aliasse)) $f_email = $user["user_username"]."@".$domain;
                unset($aliasse);
              }
            }
          }
          unset($domain_hosts);
        }
      }
    }
    //////////////////////// Map Alias to User Name (ISPConfig) ENDE ////////////////
    
    All seems to work fine :)
     
  5. ddelbia

    ddelbia Member

    This changes doesn't work anymore with ISPConfig 2.2.0... any help?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    The login code hasn't changed.
    Do you get any errors?
     
  7. ddelbia

    ddelbia Member

    It's very strange... I get this error:

    ERROR (2): Header may not contain more than a single header, new line detected. (/webmail/inc/inc.php:156)

    in inc.php, line 156 there is:

    Code:
    /*
    Don't remove the fallowing lines, or you will be problems with browser's cache
    */
    
    Header("Expires: Wed, 11 Nov 1998 11:11:11 GMT\r\n".
    "Cache-Control: no-cache\r\n".
    "Cache-Control: must-revalidate");
    
    I've replaced with;

    Code:
    Header("Expires: Wed, 11 Nov 1998 11:11:11 GMT");
    
    And now it works...
     
  8. falko

    falko Super Moderator Howtoforge Staff

Share This Page