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
  #1  
Old 5th December 2011, 10:12
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 5th December 2011, 10:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 5th December 2011, 10:45
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,

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.
Reply With Quote
  #4  
Old 5th December 2011, 11:20
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

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
Reply With Quote
  #5  
Old 5th December 2011, 11:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 5th December 2011, 11:27
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Yes now I have completely solved the email problem, thanks!

Now I am trying to solve the ftp problem.
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 03:00.


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