Results 1 to 3 of 3

Thread: PreAuth error in Zimbra 8

  1. #1
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    554
    Rep Power
    7

    Default PreAuth error in Zimbra 8

    Hi, using preauth in Zimbra 8 results in this error for me:
    Code:
    HTTP ERROR 500
    
    Problem accessing /service/preauth. Reason:
    
        Server Error
    Powered by Jetty://
    The PreAuth script worked for previous Zimbra versions, and it's based on the php example found here Preauth - Zimbra :: Wiki.

    The script:
    PHP Code:
    <?php
        
    /**
        * Variabili da modificare secondo esigenze.
        */

        // Chiave di preauth di Zimbra. Si può ricavare attraverso il comando $> zmprov gdpak domain.com
        
    $PREAUTH_KEY="<my_preauth_key>";
        
    // Dominio su cui lavora Zimbra
        
    $domain "<my_domain>";
        
    // URL del servizio di preauth, /service/preauth è una locazione fissa. Modificare soltanto il dominio.
        
    $WEB_MAIL_PREAUTH_URL="https://<my_domain>/service/preauth";
        
    // Variabile d'ambiente che ci dice quale utente è connesso. Solitamente non va modificata.
        
    $user $_SERVER['REMOTE_USER'];

        
    /**
         * Non modificare la seguente parte di codice
         */

        /**
        * 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
        */
        
    $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
         */
        
    header("Location: $preauthURL");

    ?>
    Is something changed in the Zimbra PreAuth from 7 to 8?
    And where I can found documentation about that?

    Any help would be appreciated.
    Thanks in advance.
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

  2. #2
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    6

    Default

    Could you give us log messages in mailbox.log?

  3. #3
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    554
    Rep Power
    7

    Default

    Thanks but it was a typo in phone by my colleague :-(
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

Similar Threads

  1. Preauth authentication failed error?
    By deneme600 in forum Administrators
    Replies: 6
    Last Post: 10-12-2012, 03:28 AM
  2. Error 400 using Preauth
    By marioestrada in forum Developers
    Replies: 5
    Last Post: 11-13-2008, 09:40 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
  •