Hi People, Massive change is possible with remote api-mail accounts? For example, change a user's maildir. Just as when you create a mailbox with the following function: $params = array( 'server_id' => 1, 'name' => 'name of user1', 'email' => '[email protected]', 'password' => 'somepass', 'quota' => '0', 'maildir' => '/var/vmail/domain.tld/user1' 'homedir' => '/var/vmail','uid' => '5000', 'gid' => '5000', 'postfix' => 'y', 'disableimap' => '0', 'disablepop3' => '0'); $client_id = 0; $domain_id = $client->mail_user_add($session_id,$client_id, $params); What would happen if I just change by sql query maildir field value of a user? It would make the mailbox pass another location in /var/vmail/? For example, I need to change a user [email protected] [email protected], as you might do this? user1 maildir is /var/vmail/domain1.tld/user1 and need to be /var/vmail/domain2.tld/user1 Thanks.
It would break your system. Always use the remote API to do changes in the ispconfig db as all changes that you do directly in sql will not get processed by the server scripts. But the function you posted above is wrong for that purpose as it will add a new user instaed of modifying a existing account. To modify existing accounts, use the update function. For example in your case above, the direct change in the sql db will result in two mailboxes, a complete old one which is inaccessible and a partly created new one which misses functions like quota etc.
Thank you very much Till, is what I figured why do you ask before. Where to find documentation on the update function?
The remote api documentation has been released as part of the current beta. You can find it in the beta tar.gz in the file in the remot_client sub directory: http://www.howtoforge.com/forums/showthread.php?t=54370