Results 1 to 8 of 8

Thread: PreAuth Problem

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    6

    Unhappy PreAuth Problem

    i have this link but its saying

    HTTP ERROR 400

    Problem accessing /service/preauth. Reason:

    authentication failed for test@test.local

    http://zimbra.test.local/service/pre...XXXXXXXXXXXXXX

    any suggestions?
    is my link correct?

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by jputz12 View Post
    i have this link but its saying

    HTTP ERROR 400

    Problem accessing /service/preauth. Reason:

    authentication failed for test@test.local

    http://zimbra.test.local/service/pre...XXXXXXXXXXXXXX

    any suggestions?
    is my link correct?
    It doesn't say the url is incorrect it says that you failed authentication. I assume you followed the wiki article exactly?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    May 2008
    Location
    Taiwan
    Posts
    296
    Rep Power
    7

    Default

    in most cases, you should call zimbra preauth login via program(php, java, jsp....), cause you need to pass several parameters to zimbra (some of them need to be calculated first) :

    1. email account
    2. time (in mini-second format? if i remember correctly)
    3. hash-key value (using SHA1?)

    as Phoenix said, everything is written in that Preauth wiki article.

  4. #4
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    6

    Default

    yeah i already COPY and Paste the code from the wiki and its not working

  5. #5
    Join Date
    May 2008
    Location
    Taiwan
    Posts
    296
    Rep Power
    7

    Default

    you should modify it before you use it, and nobody knows what code you got from the wiki?

  6. #6
    Join Date
    Sep 2008
    Posts
    71
    Rep Power
    7

    Unhappy PHP preauth

    Same applies for me: preauth is not working, but did work before upgrading 5.0.x to 6.0.4!

    PHP Code:
    <?php

        session_start
    ();
        if (
    $_SESSION['authenticated'] == true && $_SESSION['auth_type'] == 'internal') {
            
    /**
            * Globals. Can be stored in external config.inc.php or retreived from a DB.
            */
            
    $PREAUTH_KEY="1234567890123456789012345678901234567890123456789012345678901234";
            
    $WEB_MAIL_PREAUTH_URL="https://myzimbra/service/preauth";
            
            
    /**
            * User's email address and domain. In this example obtained from a GET query parameter. 
            * i.e. preauthExample.php?email=user@domain.com&domain=domain.com
            * You could also parse the email instead of passing domain as a separate parameter
            */
            
    $user $_SESSION['UserLogin'];
            
    $domain="mydomain";
            
            
    $email "{$user}@{$domain}";
        
            if(empty(
    $PREAUTH_KEY)) {
                die(
    "Need preauth key for domain ".$domain);
            }
            
            
    /**
            * Create preauth token and preauth URL
            */
            
    $timestamp=time()*1000;
            
    $preauthToken=hash_hmac("sha1",$email."|name|0|".$timestamp,$PREAUTH_KEY);
            
    $preauthURL $WEB_MAIL_PREAUTH_URL."?account=".$email."&by=name&timestamp=".$timestamp."&expires=0&preauth=".$preauthToken;
            
            
    /**
             * Redirect to Zimbra preauth URL
             */
            //die($preauthURL);
            
    header("Location: $preauthURL");
        } else {
            
    header("Location: http://mydomain/index.php");
        }
    ?>
    I also tried to solve the issue by creating a new preauthentication key and restarting Zimbra - still authentication failed although I can use it from the Admin UI.

    Has the URL based mechanism been changed or removed without notifiying users...?

  7. #7
    Join Date
    Sep 2008
    Posts
    71
    Rep Power
    7

    Default

    I promise I will check my timeservers.
    I promise I will check my timeservers.
    I promise I will check my timeservers.
    I promise I will check...

    Solved

  8. #8
    Join Date
    Apr 2012
    Posts
    10
    Rep Power
    3

    Default

    Trouble Shooting

    Doesn't Work After Upgrade Of ZCS
    Please check the data/time on your servers. If they are off by more than 5 minutes preauth will fail.

Similar Threads

  1. [SOLVED] Upgraded to 5.0 OSS - Sendmail Problem
    By Chewie71 in forum Installation
    Replies: 11
    Last Post: 12-28-2007, 06:07 PM
  2. Backup problem
    By polaco999 in forum Installation
    Replies: 1
    Last Post: 11-26-2007, 11:13 AM
  3. [SOLVED] webmail relay problem
    By pst in forum Administrators
    Replies: 2
    Last Post: 10-29-2007, 01:24 AM
  4. smtp table lookup problem
    By s_c_johnson in forum Installation
    Replies: 5
    Last Post: 09-21-2007, 05:46 AM
  5. [SOLVED] Small problem stopping zimbra
    By jml75 in forum Administrators
    Replies: 13
    Last Post: 07-13-2006, 08:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •