I'm new with Squirrel and I'm new with php.
But I need Squirrel! :) And I need that Squirrel select the proper IMAP
server for the user that is logging in.
So, I'm making some modification to source files, in an orrible way.
But I think that this functionality can be usefull for many people.
So, I'm here to explain "my solution", in hope that someone more skilled in
php, cvs and such other thinks, will make this job better than me.
I would not post any line of code, because I've hard coded in source all
variables that usually are stored in config.php, without any error check or
error messages, and any other horrible programming techniques :))))
Essentially, I needed it, and I have solved my problems, but I hope to see
this functionality in future release of Squirrel.
First of all, I put all users data in a Ldap server: I use courier imap
server with authentication via ldap.
Every user records have the mailhost property set with the correct imap server.
In every file that make an imap connection, before the line
$imapConnection = sqimap_login(...)
I make an ldap query with expression="mail=$login_username" and I get the
At this point, it's enough to set the $imapServerAddress with the new
hostname and all work fine :)
I'm just at initial test phase, but for the moment it seems to be ok.
Obviously, it can be made one time for all the session, storing data
somewhere, butI don't know how, so for now (for me) it's good.. :)
Also, I imagine that is possible to include config parameters in config.pl
script, to show where the auth ldap server is, or to obtain the same result
in a more general way (e.g. to use a db instead of an ldap server).
Please let me know if I'm wrong, or if it is possible that this dream will