Roundcube Community Forum

 

Limit user login

Started by fbsd, April 03, 2010, 09:53:51 AM

Previous topic - Next topic

fbsd

Can someone tell me how to limit some users to login to webmail, and others to permit?

JohnDoh

let the users who you want to grant access to login and then set auto_create_user to false in your config file, then only those users who have already logged in will be able too.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

fbsd

#2
I was created the https and http access. HTTPS got own roundcube and http god own roundcube installation. I got 20 user accounts. I wan't to limit one user to access on roundcube on https to login to, and permit all other.
       Problem with auto_create_user was usless becouse https and http looking the same database. If i login on the http to RC and auto_create_user user will be granted.

JohnDoh

hmmm, that sounds like a job for a plugin. attach somethig to the authenticate hook which can check who is trying to login and how they are connecting and then either let me in or not.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

fbsd

#4
OK, can u tell me a little explenation how can i enable the hook -> authenticate.
I think that is the line i need to setup in some file. Can u tell me the exact file?
$this->add_hook('authenticate', $callback);

And  can you explane me what i need to do else when add this line. How can i deny account to login

fbsd

Or is simplier solution how to limit one user to login only from one ip address?

Mircea Tanciu

Quote from: fbsd;26596Can someone tell me how to limit some users to login to webmail, and others to permit?
Hello,
I have the same problem but haven't seen a solution.
Please, tell me if you found something that resolve the problem.
Thanks.

dziobak

just set the:
$rcmail_config['auto_create_user'] = false;

and if you want user to log in, you must create the user in RC database.

Mircea Tanciu

Thanks for your reply.
I want for example:
"[email protected]" to access the RoundCube only from my local network and from some external IPs: (192.168.0.0/24 and 81.22.33.44). Can I define this list of IPs somewhere  from a user can access Roundcube? (for example in a roundcube MYSQL column table)
Thank you.

dziobak

I think you can write a plugin to handle this. For now there is nothing like this. (Maybe I'm wrong)

rosali

As a starting point you could use my 'dnsbl' plugin.
Regards,
Rosali