PDA

View Full Version : How to retrieve the user infor from ispconfig for suirrelmail


rafael-ec
7th September 2007, 23:44
In this mini-how to I am going to explain how I did it to retrive the name and email from ispconfg data base to squirrelmail default profile. I did this after some help of Till in this thread (http://www.howtoforge.com/forums/showthread.php?t=15318)

This how to would only work if you use the domain name in your mail usernames (ej. domain.com_user)

I use the retrive data plugin for squirrelmail (http://sourceforge.net/projects/retruserdata/) and modified so that it is comptatible with iscpconfig. My modified version is here (http://rafael.bonifaz.ec/files/rbp-retrieveuserdata.tar.gz).

First of all I created a squirrelmail database user. This user only has select powers in mysql.

The I installed the squirrelmail plugin as any other squirrelmail plugin. Once it was installed I needed to edit some files:

config.php -> edit the mysql for your need. I use the field username instead of email because the email field in ispconfig data base does not have the domain name. Because I am using domian.com_user domain names I prefer this info.

mysql.php -> I created a fix_mail() function that would take the usernmane (domian.com_user) and transformed to the email.

So far it works for me, but I just tested at leatle bit. It is not yet in production as I would like to tested it a bit more.

Greetings,

Rafael