webmail login

Discussion in 'General' started by tsw, Dec 20, 2005.

  1. tsw

    tsw New Member

    Hi,

    First I would like to say that ispconfig is really helpfull, I had inhouse written manager before, but it just wouldnt do anymore (if 3.0 has the options I have seen people saying it will be even better)

    so to my problem.

    in webmail login I can use "[email protected]" and password just fine, but "username@" and password also workd so does "[email protected]" and password. bug? or a know option?

    thanks in advance
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You can use any email address that is assigned to the user. We have rewritten the Uebimiau login so that it does a lookup in the ISPConfig database to find out which user is behind the email address.
     
  3. tsw

    tsw New Member

    yes, but the problem is I can use any tld also (or no tld) like "user@" works.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What is the problem? As long the username / password combination works correct. UebiMiau connects to the localhost mailserver and usernames are unique on the server. By the way, UebiMiau is not part of ISPCOnfig, its an optional external package.
     
  5. falko

    falko Super Moderator ISPConfig Developer

    I've tried myself, and I can't reproduce the problem...

    Maybe you can check yourself, the PHP code that does the mapping (email address <-> user name) is at the beginning of /home/admispconfig/ispconfig/web/webmail/msglist.php.

    PHP:
    //////////////////////// 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 ////////////////
     
  6. tsw

    tsw New Member

    It just seems strange that I can login with "[email protected]" AND also with "[email protected]" AND with "username@"

    everything works fine on webmail with all usernames above (and the password of course :)

    till: Yes, I know that UebiMiau is a seperate optional package

    Falko: Looked at the code and cant find anything strange in it
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Maybe you can run some of the SQL queries in phpMyAdmin to find out what's going on.
     

Share This Page