
12th October 2012, 15:52
|
|
Senior Member
|
|
Join Date: Sep 2012
Posts: 107
Thanks: 0
Thanked 8 Times in 4 Posts
|
|
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 ..
|

12th October 2012, 15:56
|
|
Senior Member
|
|
Join Date: Sep 2012
Posts: 107
Thanks: 0
Thanked 8 Times in 4 Posts
|
|
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
|

12th October 2012, 16:30
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
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.
|

12th October 2012, 18:59
|
|
Senior Member
|
|
Join Date: Sep 2012
Posts: 107
Thanks: 0
Thanked 8 Times in 4 Posts
|
|
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.
|

12th October 2012, 19:21
|
|
Senior Member
|
|
Join Date: Sep 2012
Posts: 107
Thanks: 0
Thanked 8 Times in 4 Posts
|
|
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
|

13th October 2012, 02:03
|
|
Senior Member
|
|
Join Date: Sep 2012
Posts: 107
Thanks: 0
Thanked 8 Times in 4 Posts
|
|
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?
|

13th October 2012, 20:08
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
Quote:
Originally Posted by abdi
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.
|

13th October 2012, 20:09
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
Quote:
Originally Posted by abdi
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.
|

13th October 2012, 20:57
|
|
Senior Member
|
|
Join Date: Sep 2012
Posts: 107
Thanks: 0
Thanked 8 Times in 4 Posts
|
|
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?
|

14th October 2012, 13:20
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
Code:
$client->server_get($session_id, $server_id, $section ='')
|
| Thread Tools |
|
|
| Display Modes |
Linear 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 05:36.
|
|
Recent comments
1 day 3 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 12 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 19 hours ago
2 days 8 hours ago
2 days 10 hours ago