View Single Post
  #1  
Old 15th October 2011, 17:46
matiasCU matiasCU is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 5
Thanked 2 Times in 2 Posts
Default Change the domain user without using the panel

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' => 'user1@domain.tld',
'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 user1@domain1.tld user1@domain2.tld, as you might do this?

user1 maildir is /var/vmail/domain1.tld/user1 and need to be /var/vmail/domain2.tld/user1

Thanks.
Reply With Quote
Sponsored Links