• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Mass mailbox import

scool

Basic Pleskian
Hello everyone..
Installed plesk 10.3 on Centos successfully

We need to import 400 mailboxes on that server.
i have done several searches here on parallels forums and KB , but without finding a clear and easy procedure for completing that task.

The only answer closer to my problem is this one.
http://forum.parallels.com/showthread.php?t=95227

ok, i downloaded the perl script on the attached file, modified the sample template (http://download1.parallels.com/Plesk/PPP9/Doc/en-US/plesk-9.2-api-rpc/index.htm?fileName=34502.htm), and then i am trying to run the script.

but nothing happens, no error message or anything else. am i missing something here?
 
Could you please provide more details? How exactly you have run this script? What sort of output?
 
i just copy paste your command
cat req.xml | perl api.pl Plesk_server_IP Plesk_admin_password

and it ends like that
</create>
</mail>
</packet>
----- RESULT ------------------------


nothing more
 
Did you replaced "Plesk_server_IP" with real server IP address and "Plesk_admin_password" with real Plesk admin password?
 
Could you please post full output of this command here?
 
I have checked your request. You shouldn't write name of mailbox with @domain.com Only name of mailbox is enough because you have already specified domain in request by

<domain_id>1</domain_id>

Try it.
 
Ok, we have found a solution.
Import mass mailbox on plesk 10.3
My system is Centos 5.7 64bit with plesk 10.3.1.

I wanted to mass import on plesk about 500 mailbox.
This is the "how to" with the great assistance of IgorG who provided the php script.
dont use <crypt> string because on plesk10 encrypted passwords are not supported.
The script will run successfully but your users will not be able to login with pop3/imap neither on webmail.
http://kb.parallels.com/en/112508

You can find your domain id on the psa database.


<?php

$host="pleskip";
$login="pleskusername";
$passwd="pleskpassword";
$port=8443;

$data = <<<EOF
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="1.4.2.0">
<mail>
<create>
<filter>
<domain_id>1</domain_id>
<mailname>
<name>bgiatagana</name>
<mailbox>
<enabled>true</enabled>
</mailbox>
<password>00014</password>
<permissions>
<cp_access>true</cp_access>
</permissions>
</mailname>
</filter>
</create>
</mail>
</packet>
EOF;

function write_callback($ch, $data) {
echo $data;
return strlen($data);
}

function sendCommand($data, $login, $passwd, $host, $port=8443) {
$script = "enterprise/control/agent.php";
$url = "https://$host:$port/$script";
$headers = array(
"HTTP_AUTH_LOGIN: $login",
"HTTP_AUTH_PASSWD: $passwd",
"HTTP_PRETTY_PRINT: TRUE",
"Content-Type: text/xml",
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, &$headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_WRITEFUNCTION, write_callback);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$result = curl_exec($ch);
if (!$result) {
echo "\n\n-------------------------\ncURL error number:".curl_errno($ch);
echo "\n\ncURL error:".curl_error($ch);
}
curl_close($ch);
return;
}
sendCommand($data, $login, $passwd, $host, $port);

?>



Just run it with

# php api.php
 
Last edited:
Hello,
Question,
Plesk 11 needs a different type format?

i receive the following error
<errtext>Unable to find password_type node</errtext>
 
Back
Top