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 2nd November 2012, 15:14
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default Getting the client email starting from the domain_id

Hi Guys,

how have I to get the client's email stating from the domain_id value?

thanks
Reply With Quote
Sponsored Links
  #2  
Old 2nd November 2012, 15:50
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
Default

Could you please be a bit more precise in what you want to do?
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #3  
Old 2nd November 2012, 16:14
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Hi again, I need to create a query to get the client email starting from one of his webdomains (domain_id)

So I have to Select email from clients where ??? Join ???

is there a E.R (Entity Relationship Diagram) of ISPConfig?

thanks
Reply With Quote
  #4  
Old 2nd November 2012, 16:18
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,768
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Most records in ispconfig have a column sys_group_id which define the group a record belongs to and each group is woned by a client. So you can get the client that owns a record by using the sys_group_id of the record that you have, then look up the client_id from sys_group table.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 2nd November 2012, 16:27
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
 
Default

In general there is no direct link (in the database) between ONE web domain and email addresses!

If you want to access a list of emails that MIGHT(!) be connected to a given WEB domain you could try doing a join like this.

SELECT email FROM mail_user INNER JOIN web_domain ON (SUBSTR(email, INSTR(email, '@')+1) = domain) WHERE web_domain.domain_id = 12345

It's not guaranteed to work because of the things I stated above.
__________________
Marius Cramer

pixcept KG
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
Auto Start ISPConfig royrobinson Installation/Configuration 15 30th May 2012 10:48
link my domain to my server, impossible! 007007 Installation/Configuration 7 17th January 2012 13:59
client 'can not send email' reinier Server Operation 1 17th April 2007 11:38
Howto create email starting with a number DarkBen Installation/Configuration 2 7th February 2006 22:10
email client configuration davidg General 3 22nd August 2005 16:40


All times are GMT +2. The time now is 11:32.


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