Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 5th December 2011, 15:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

Your code is very different from the examples, e.g. you escaped that path this way "\/var\/www\/clients\/client135\/web3800" and normally a / has not to be escaped and where are all the other website parameters, the example has 39 values in the params array and you have 18.

You should really check the examples again, they had been tested right before 3.0.4 was released and they worked at that time so I assume that they still work as the remote API as not changed from 3.0.4 to 3.0.4.1.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #12  
Old 6th December 2011, 13:26
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Hi Till,

the path is escaped because the array that I shown you is a json encode array.

These are your parameters for sites_ftp_user_add:
Code:
	$params = array(
			'server_id' => 1,
			'parent_domain_id' => 1,
			'username' => 'threep',
			'password' => 'wood',
			'quota_size' => 10000,
			'active' => 'y',
			'uid' => '5000',
			'gid' => '5000',
			'dir' => 'maybe',
			'quota_files' => -1,
			'ul_ratio' => -1,
			'dl_ratio' => -1,
			'ul_bandwidth' => -1,
			'dl_bandwidth' => -1
			);
and these are mine:

Code:
Paramenters: {
   "server_id":1,
   "parent_domain_id":3800,
   "username":"jdoe_ftp1",
   "password":"bexujuga",
   "quota_size":"3000",
   "active":"y",
   "uid":"web135",
   "gid":"client3800",
   "dir":"\/var\/www\/clients\/client135\/web3800",
   "quota_files":-1,
   "ul_ratio":-1,
   "dl_ratio":200,
   "ul_bandwidth":-1,
   "dl_bandwidth":100
}
These are your parameters for sites_web_domain_add:

Code:
	$params = array(
			'server_id' => 0,
			'ip_address' => '',
			'domain' => 'test2.int',
			'type' => 'vhost',
			'parent_domain_id' => 0,
			'vhost_type' => 'name',
			'hd_quota' => 100000,
			'traffic_quota' => -1,
			'cgi' => 'y',
			'ssi' => 'y',
			'suexec' => 'y',
			'errordocs' => 1,
			'is_subdomainwww' => 1,
			'subdomain' => '',
			'php' => 'y',
			'ruby' => 'n',
			'redirect_type' => '',
			'redirect_path' => '',
			'ssl' => 'n',
			'ssl_state' => '',
			'ssl_locality' => '',
			'ssl_organisation' => '',
			'ssl_organisation_unit' => '',
			'ssl_country' => '',
			'ssl_domain' => '',
			'ssl_request' => '',
			'ssl_cert' => '',
			'ssl_bundle' => '',
			'ssl_action' => '',
			'stats_password' => '',
			'stats_type' => 'webalizer',
			'allow_override' => 'All',
			'apache_directives' => '',
			'php_open_basedir' => '/',
			'custom_php_ini' => '',
			'backup_interval' => '',
			'backup_copies' => 1,
			'active' => 'y',
			'traffic_quota_lock' => 'n'
			);
and these are mine:

Code:
Parameters: {
   "server_id":"1",
   "ip_address":"",
   "domain":"testdomain.com",
   "type":"vhost",
   "parent_domain_id":0,
   "vhost_type":"name",
   "hd_quota":"3000",
   "traffic_quota":"12000",
   "errordocs":1,
   "is_subdomainwww":1,
   "subdomain":"www",
   "php":"fast-cgi",
   "active":"y",
   "traffic_quota_lock":"n",
   "system_user":"web1",
   "allow_override":"All",
   "custom_php_ini":"",
   "apache_directives":""
}
I have sent the main and not null parameters because I think that you have check all the parameters received from a calling or not?!
Have I to send all the parameters?


Thanks for your help.
Reply With Quote
  #13  
Old 6th December 2011, 14:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

All functions require it that you send the full set of parameters. Just compare the record that you created with your function call with a record that you created in ispconfig to see the difference why yours dont work.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
vaio1 (6th December 2011)
  #14  
Old 20th December 2011, 12:58
skuli434 skuli434 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with password when adding new mailbox

Guys, please help, I'm pulling my leftovers of my hair here

I have taken the same configuration of remote API that adds mail_user database and i can view it in mail_user table , however when trying to open the mail trough roundcube webmail I cannot register, however when i go to ispconfig admin and change the password for the mailbox and save,
wala i enter, and i dont want to reset manually the password for every creation I do.

$params = array('server_id' => 1,
'email' =>$full_insert_email,
'login' =>$full_insert_email,
'password' => $password2,
'name' =>$_SESSION['eng_name1'],
'uid' =>500,
'gid' =>500,
'maildir' => '/var/vmail/XXXX/'.$_insert_mail,
'quota' => 104857600,
'homedir' =>'/var/vmail/',
'autoresponder' =>'n',
'autoresponder_start_date' =>'',
'autoresponder_end_date' =>'',
'autoresponder_text' =>'',
'move_junk' =>'n',
'custom_mailfilter' =>'spam',
'postfix' =>'y',
'disableimap' =>'n',
'disablepop3' =>'n',);
$domain_id = $client->mail_user_add($session_id,1 , $params);


Thank you
Reply With Quote
  #15  
Old 22nd December 2011, 11:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

Compare the record that you inserted with the api with the record after you updated it in ispconfig to see which differences are causing the issue.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #16  
Old 22nd December 2011, 17:23
skuli434 skuli434 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Till, Thank you for the reply
I'm really puzzled about this thing. I enter the above parameters and then try to log in to roundcube and it doesn't do it,

I have done as you said and the only thing that is not the same is password (encrypted one=$1$QlQgwqMy$iE8UYspAlqIX9nXqFYHx80 vs $1$Shloly56$AXmt3MoTga/g3K2LJV2wu/ ) inside mysql database in mail_user table.

Please Help
Reply With Quote
  #17  
Old 4th December 2012, 15:41
lyrano lyrano is offline
Junior Member
 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

nearly one year later

i ran into the same issue, that everthing gets created but no login possible. In my case i had to set the homedir to '/var/vmail' and the login worked after that.
Reply With Quote
  #18  
Old 4th December 2012, 16:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
 
Default

Quote:
i ran into the same issue, that everthing gets created but no login possible. In my case i had to set the homedir to '/var/vmail' and the login worked after that.
Thats correct, the homedir of a mail user has always to be set to root directory of the maildir structure which is normally /var/vmail. See example script in the remote api documentation in svn.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.3.3 fresh instalation - email tab is empty artur_gib Installation/Configuration 14 28th January 2014 19:02
chroot SSH IspConfig2 kextra1 General 4 20th January 2011 18:41
ISPconfig 3: can't send or receive messages zogthegreat Installation/Configuration 6 22nd May 2010 14:45
email receiving died ??? + report a bug in ispconfig email add/remove coolen Installation/Configuration 14 4th November 2008 19:34
CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig (a.k.a. The Perfect Server) Derekman9 HOWTO-Related Questions 1 15th October 2008 13:35


All times are GMT +2. The time now is 22:03.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.