Restful API doesn´t activates domain

Issue #156 resolved
Christopher Dent
created an issue

Hello!

I can effectively disable domain through the Restful API with the accountStatus command but then I can´t activate it back again.

Running version 2.9.0

Comments (5)

  1. Christopher Dent reporter

    Previously all the curl login...

            $domain = "myotherdomain.com";
            $accountStatus="accountStatus=active";
            curl_setopt($ch, CURLOPT_URL, "https://mydomain.com/api/domain/" . $domain);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_TIMEOUT, 3);
            curl_setopt($ch, CURLOPT_VERBOSE, 1);
            curl_setopt($ch, CURLOPT_STDERR, $fp);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile); // Cookie aware
            curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); // Cookie aware
            // Set request method to POST
            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
            // Set query data here with CURLOPT_POSTFIELDS
            curl_setopt($ch, CURLOPT_POSTFIELDS, $accountStatus);
            $content = trim(curl_exec($ch));
            curl_close($ch);
    
  2. Zhang Huangbin repo owner

    I can not reproduce this issue locally.

    • Which iRedMail release are you running?
    • Are you running iRedAdmin-Pro for MySQL/MariaDB/PostgreSQL backend or OpenLDAP backend?

    How about upgrade iRedMail to the latest iRedMail-0.9.9 and upgrade iRedAdmin-Pro to the latest release then try again?

  3. Log in to comment