
6th January 2013, 17:50
|
|
Member
|
|
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 37
Thanks: 4
Thanked 7 Times in 4 Posts
|
|
How are sys_userid, sys_groupid determined for forwarding e-mail mappings?
I'm working on a script to allow me to bulk import mail forwards. When I add forwards manually, I can see the MySQL table mail_forwarding specifies the sys_userid and sys_groupid fields. I want to determine how to pick values for these fields based on the source e-mail domain.
I first thought it would be the web_domain table, but in this table, all of the sys_userid values are 1, even though I have multiple domains.
I next thought it might be dns_soa, but it seems that the sys_userid and sys_groupid values here are 1:1 with a specific client, not with a domain.
Can anyone tell me sys_userid and sys_groupid are computed when adding a forwarding e-mail address?
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!
|

6th January 2013, 18:52
|
|
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 want to determine how to pick values for these fields based on the source e-mail domain.
|
The values in a foward are the same then the ones of the mail_domain.
As a general note: Use the remote api to add the forwards, the sys_userid and sys_groupid are set by the functions automatically. Adding them to the tables manually will lead to invalid transactions and no changes will get written to disk, so dont add anything to the ispconfig database directly, use the api.
|

6th January 2013, 20:10
|
|
Member
|
|
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 37
Thanks: 4
Thanked 7 Times in 4 Posts
|
|
I forgot that there was code in the ISPConfig-3.0.4.6.tar.gz file. I found two relevant files.
remoting_client/API-docs/mail_forward_add.html
remoting_client/examples/mail_forward_add.php
In the latter, I see that $params needs server_id. What is the appropriate way to get this? Via a MySQL query? Or, because this isn't likely to change, just hard code it?
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!
Last edited by fatbear; 6th January 2013 at 20:23.
|

6th January 2013, 20:44
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
Quote:
|
In the latter, I see that $params needs server_id. What is the appropriate way to get this? Via a MySQL query? Or, because this isn't likely to change, just hard code it?
|
The server_id of a forward is the same then the one of the mail_domain as the forward has to be created on the same server.
|
| 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 07:18.
|
|
Recent comments
1 day 4 hours ago
1 day 9 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 18 hours ago
1 day 19 hours ago
1 day 21 hours ago
2 days 10 hours ago
2 days 12 hours ago