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 12th October 2012, 15:52
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Lightbulb New Control Panel with ISPConfig as Backend

Hello Forgers,
Esp: Till

I am developing a whole new interface that is seemingly integrated with my billing system but using the ISPConfig 3's Remote API as processor of almost every task and sometimes querying the database it self directly where need be.

In the process of developing this control panel, I have come across a few things I would like to share and help also make clear to me ..I will list almost all of them on this thread with all possible recommendations and bugs if expected ..
Reply With Quote
Sponsored Links
  #2  
Old 12th October 2012, 15:56
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

The first of them is:

I noticed when logged in as an admin, and you try to create an email address for a domain that belongs to a client, in the table: mail_user, the sys_userid assigned to that email address is 1 (which is the admin's). I thought this ID should be for the client him self who anyways owns the email domain.

However if the client him self creates the email address, then the sys_userid assigned is that of the client him self ..

I hit this snag when I tried to query for ALL email addresses that belong to a client (identified by sys_userid) and noticed some emails were then left out.

Till, is that how it's operating or its a bug?

Joseph
Reply With Quote
  #3  
Old 12th October 2012, 16:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,444
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Quote:
I noticed when logged in as an admin, and you try to create an email address for a domain that belongs to a client, in the table: mail_user, the sys_userid assigned to that email address is 1 (which is the admin's). I thought this ID should be for the client him self who anyways owns the email domain.
The id has to be 1 and not the id of the client. So ispconfig is correct here.

Quote:
However if the client him self creates the email address, then the sys_userid assigned is that of the client him self ..
Thats correct as well. The sys_userid identifies the creator of a record and not the owner permissions. The permissions are hendled trough the groups.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 12th October 2012, 18:59
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Thanks Till for that information, its very helpful.

Again I hit another snag, when I realized that NOT all variables are updated when running:

mail_user_update() command through API. Below is what I pass to it:

$params['access'] = 'n';
$params['disableimap'] = 'y';
$params['disablepop3'] = 'y';
$params['disabledeliver'] = 'y';
$params['disablesmtp'] = 'z';
$params['disablesieve'] = 'y';
$params['disablelda'] = 'y';
$params['disabledoveadm'] = 'y';

However ONLY the below are updated, the rest stay intact and un-updated:

$params['access'] = 'n';
$params['disableimap'] = 'y';
$params['disablepop3'] = 'y';

Any ideas what am doing wrong or leaving out? or its like that ...

BTW: Accordingly to the API manual, its supposed to return the number of affected rows, however it does not ..even though I use the default API example file ..

Thanks, Joseph

Last edited by abdi; 12th October 2012 at 19:05.
Reply With Quote
  #5  
Old 12th October 2012, 19:21
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Till I noticed a variable $params['postfix']. If its set to "n" (ie mail receiving is disabled) then does it really matter what is set for disablesmtp and disabledeliver ?

Am thinking as long as postfix is set to "n" then a user wouldnt still be able to send mail through SMTP regardless of the flag set for disablesmtp ..Right?

My problem is, I want if I disable postfix for that user then he shouldnt be able to send mail also through SMTP ..

Advice ..Joseph
Reply With Quote
  #6  
Old 13th October 2012, 02:03
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Till, when creating a mailbox with the command mail_user_add am expected to provide maildir and homedir. Is there anywhere in the DB where these variables are defined or I have to build them my self before sending them?
Reply With Quote
  #7  
Old 13th October 2012, 20:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,444
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Quote:
Originally Posted by abdi View Post
Till I noticed a variable $params['postfix']. If its set to "n" (ie mail receiving is disabled) then does it really matter what is set for disablesmtp and disabledeliver ?

Am thinking as long as postfix is set to "n" then a user wouldnt still be able to send mail through SMTP regardless of the flag set for disablesmtp ..Right?

My problem is, I want if I disable postfix for that user then he shouldnt be able to send mail also through SMTP ..

Advice ..Joseph
Thus depends on your installation, e.g. If you use courier or dovecot. Take a look at the postfix and dovecot and courier config files if you want to know what sll internal flags are used for.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 13th October 2012, 20:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,444
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Quote:
Originally Posted by abdi View Post
Till, when creating a mailbox with the command mail_user_add am expected to provide maildir and homedir. Is there anywhere in the DB where these variables are defined or I have to build them my self before sending them?
The pats are stored in the ini style server config which can be retrieved with the api as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 13th October 2012, 20:57
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Quote:
The pats are stored in the ini style server config which can be retrieved with the api as well.
Which command should I use for that?
Reply With Quote
  #10  
Old 14th October 2012, 13:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,444
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
 
Default

Code:
$client->server_get($session_id, $server_id, $section ='')
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
new interface

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
Change vmail Path in ISPConfig Control Panel from /var/vmail/... to /home/vmail/... uhp85 Installation/Configuration 1 24th July 2012 09:29
disable security constrain in ispconfig 3 control panel to enable the multisites qiubosu Installation/Configuration 3 10th December 2010 23:04
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
Unable to log into ISPConfig control panel bobplank Installation/Configuration 1 13th July 2006 14:17
ISPConfig Control Panel dranieri Installation/Configuration 7 1st October 2005 01:22


All times are GMT +2. The time now is 17:08.


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