I've created the following PHP code for use with pre-auth, but I always get the error noted below. Both servers (the Zimbra server and the server that runs the PHP code) are synced to an NTP server. I have also confirmed the times are correct on each server.

My timestamps seem to be UTC based even though the timezone is set correctly. I've tried compensating by subtracting 5 hours from the UTC timestamp. With or without the subtraction, I still get the error.

I am using 5.0 RC2 Network Edition. I plan on upgrading to the GA code this week.

Does anyone see something obvious?

Doug

PHP Code-------------------------------------------------
putenv("TZ=US/Eastern");
$now= time() + (5 * 60 * 60);
$preauth_string = "support@mydomain.com|name|0|" . $now;
$preauth = hash_hmac("sha1", "$preauth_string", "DOMAIN KEY");
$preauth_link="https://mail.mydomain.com/service/preauth?account=support@mydomain.com&expires=0&tim estamp=" . $now . "&preauth=" . $preauth


ERROR MESSAGE-------------------------------------------
HTTP ERROR: 400

authentication failed for support@mydomain.com (preauth timestamp is too old)

RequestURI=/service/preauth

Powered by Jetty://