
5th December 2011, 10:12
|
|
Senior Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 654
Thanks: 77
Thanked 12 Times in 7 Posts
|
|
IspConfig API: FTP & Email not accessible
Hi guys,
I am using your API to connect my software to your IspConfig these are my steps:
1. Create a client (client_add)
2. Create the website (sites_web_domain_add)
3. Create the FTP account (sites_ftp_user_add)
4. Create the Email Account (mail_user_add)
5. Create the Database (sites_database_add)
All the elements are visible in the IspConfig panel but the FTP and the Email doesn't work.
I mean that If I try to log with roundcube for the email account and/or browse by the Filezilla the ftp profile created It doesn't connect.
These are the parameters log from my software to your software:
Code:
05-12-2011 09:48:32 - ID 1 - Shineisp_Api_Panels_Ispconfig_Main::create_client - Paramenters: {"company_name":"My User","contact_name":"John Doe","customer_no":"212","vat_id":"IT1231231231","email":"info@johndoe.com","street":"via Roma 31","zip":"20111","city":"Milan","state":"TS","country":"IT","mobile":[],"fax":[],"telephone":"+39.0400644524","language":"it","usertheme":"default","template_master":0,"template_additional":"","created_at":0,"limit_web_quota":"3000","limit_mailbox":"10","limit_database":"3","limit_traffic_quota":"12000","limit_ftp_user":"3","limit_web_domain":"5","limit_mailaliasdomain":"1","limit_maildomain":"10","limit_mailcatchall":"3","limit_mailforward":"10","limit_mailrouting":"10","limit_fetchmail":"3","limit_mailfilter":"10","limit_mailquota":"1000","limit_spamfilter_wblist":"-1","limit_web_aliasdomain":"10","limit_cron_frequency":"15","limit_cron_type":"url","limit_web_subdomain":"15","limit_spamfilter_policy":"-1","ssh_chroot":"no,jailkit","limit_spamfilter_user":"-1","limit_webdav_user":"0","limit_cron":"7","limit_shell_user":"0","web_php_options":"no,fast-cgi","username":"johndoe","password":"furerufe"}
05-12-2011 09:48:33 - ID 1 - Shineisp_Api_Panels_Ispconfig_Main::create_website - Paramenters: {"server_id":"1","ip_address":"","domain":"johndoe.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":""}
05-12-2011 09:48:34 - ID 1 - Shineisp_Api_Panels_Ispconfig_Main::create_ftp - Paramenters: {"server_id":1,"parent_domain_id":3790,"username":"xewewajo","password":"wudoteyo","quota_size":"3000","active":"y","uid":"5000","gid":"5000","dir":"maybe","quota_files":-1,"ul_ratio":-1,"dl_ratio":-1,"ul_bandwidth":-1,"dl_bandwidth":-1}
05-12-2011 09:48:43 - ID 1 - Shineisp_Api_Panels_Ispconfig_Main::create_mail - Paramenters: {"server_id":"3","email":"info@johndoe.com","login":"admin@johndoe.com","password":"dedubati","uid":5000,"gid":5000,"maildir":"","quota":1048576000,"cc":"","homedir":"","autoresponder":"n","autoresponder_start_date":"","autoresponder_end_date":"","autoresponder_text":"","move_junk":"n","custom_mailfilter":"spam","postfix":"y","access":"n","disableimap":"n","disablepop3":"n","disabledeliver":"n","disablesmtp":"n"}
05-12-2011 09:48:47 - ID 1 - Shineisp_Api_Panels_Ispconfig_Main::create_database - Paramenters: {"server_id":"2","type":"y","database_name":"db_o","database_user":"mahugima","database_password":"yuwicini","database_charset":"UTF8","remote_access":"y","remote_ips":"","active":"y"}
FTP:
Code:
Risposta: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Risposta: 220-You are user number 1 of 50 allowed.
Risposta: 220-Local time is now 09:56. Server port: 21.
Risposta: 220-This is a private system - No anonymous login
Risposta: 220-IPv6 connections are also welcome on this server.
Risposta: 220 You will be disconnected after 15 minutes of inactivity.
Comando: USER xewewajo
Risposta: 331 User xewewajo OK. Password required
Comando: PASS ********
Risposta: 421 Home directory not available - aborting
Email
Seems that the email has been not created. Roundcube tells me that there is not any account with the credencials posted.
Furthermore if I delete the customer and all the services by the IspConfig panel I get this error: Possible security violation when deleting the maildir
If you need to see my inteface for IspConfig take a look at: http://code.google.com/p/shineisp/so...onfig/Main.php
Last edited by vaio1; 5th December 2011 at 10:20.
|

5th December 2011, 10:16
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Seems as if you have not set the maildir or that you set a invalid maildir path while you created. You might want to take a look at bthe example functions that we proviude in the 3.0.4.1 tar.gz and also compare the database records for mail users that you created with the api with one that you created in ispconfig to see the correct parameters.
|

5th December 2011, 10:45
|
|
Senior Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 654
Thanks: 77
Thanked 12 Times in 7 Posts
|
|
Hi Till,
these are my email parameters sent to ISPConfig API:
Code:
{
"server_id":"3",
"email":"info@johndoe.com",
"login":"admin@johndoe.com",
"password":"dedubati",
"uid":5000,
"gid":5000,
"maildir":"",
"quota":1048576000,
"cc":"",
"homedir":"",
"autoresponder":"n",
"autoresponder_start_date":"",
"autoresponder_end_date":"",
"autoresponder_text":"",
"move_junk":"n",
"custom_mailfilter":"spam",
"postfix":"y",
"access":"n",
"disableimap":"n",
"disablepop3":"n",
"disabledeliver":"n",
"disablesmtp":"n"
}
and these are your parameters:
Code:
'server_id' => 1,
'email' => 'hmmnoe@test.int',
'login' => 'hmmnoe@test.int',
'password' => 'howtoforge',
'name' => 'hmmnoe',
'uid' => 5000,
'gid' => 5000,
'maildir' => '',
'quota' => 10000000000,
'cc' => '',
'homedir' => '',
'autoresponder' => 'n',
'autoresponder_start_date' => '',
'autoresponder_end_date' => '',
'autoresponder_text' => 'hallo',
'move_junk' => 'n',
'custom_mailfilter' => 'spam',
'postfix' => 'n',
'access' => 'n',
'disableimap' => 'n',
'disablepop3' => 'n',
'disabledeliver' => 'n',
'disablesmtp' => 'n'
I don't see any difference for the maildir param.
|

5th December 2011, 11:20
|
|
Senior Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 654
Thanks: 77
Thanked 12 Times in 7 Posts
|
|
I have solved the eMail maildir problem.
In your example you have to write the default value
Code:
'gid' => 5000,
'maildir' => '',
'quota' => 10000000000,
'cc' => '',
You have to tell to your "fans" that the maildir needs a parameter like:
Code:
'gid' => 5000,
'maildir' => '/var/vmail/yourdomain.com/info',
'quota' => 10000000000,
'cc' => '',
Now I can login with roundcube!
Anyway when the email is deleted by IspConfig this error appears: Possible security violation when deleting the maildir
|

5th December 2011, 11:26
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Quote:
|
Anyway when the email is deleted by IspConfig this error appears: Possible security violation when deleting the maildir
|
The reason are your test records without maildir, as a empty maildir is a security violation for the system.
|

5th December 2011, 11:27
|
|
Senior Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 654
Thanks: 77
Thanked 12 Times in 7 Posts
|
|
Yes now I have completely solved the email problem, thanks!
Now I am trying to solve the ftp problem.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 04:23.
|
Recent comments
1 day 4 hours ago
1 day 4 hours ago
1 day 9 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 22 hours ago
2 days 5 hours ago
2 days 9 hours ago
2 days 10 hours ago