Author Topic: How to lock Roundcube for only one domain  (Read 4333 times)

Offline Fred5550

  • Newbie
  • *
  • Posts: 4
How to lock Roundcube for only one domain
« on: May 28, 2009, 03:36:33 AM »
Hi,

I installed Roundcube and all works fine. But I would like to block other domains to can connect, because with my config, all the customers of my ISP can connect to my webmail. How to lock access only for users@mydomain.be ? (For connecting and sending)

Thanks a lot !

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
How to lock Roundcube for only one domain
« Reply #1 on: May 28, 2009, 03:45:44 AM »
Check the ./config/main.inc.php and modify the following setting:

Code: [Select]
// automatically create a new RoundCube user when log-in the first time.
// a new user will be created once the IMAP login succeeds.
// set to false if only registered users can use this service
$rcmail_config['auto_create_user'] = TRUE;

to
Code: [Select]
// automatically create a new RoundCube user when log-in the first time.
// a new user will be created once the IMAP login succeeds.
// set to false if only registered users can use this service
$rcmail_config['auto_create_user'] = FALSE;

Now no new users can access their mail using your RC environment
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Fred5550

  • Newbie
  • *
  • Posts: 4
How to lock Roundcube for only one domain
« Reply #2 on: May 28, 2009, 03:54:12 AM »
I did it but I still can log in with another of my domains ... I would like to lock it for everyone@mydomain.be and I tried now with myself@anotherdomain.be hosted on the same ISP and it also worked. How to lock it and to oblige the users to type anyone@MYDOMAIN.BE ? ... Thx a lot !

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
How to lock Roundcube for only one domain
« Reply #3 on: May 28, 2009, 04:14:03 AM »
Once you managed to succesful login, this solution does not work, because the user has already been creted in the RC-database.

So my question: Have you used myself@anotherdomain.be to login before you've modified the settings in main.inc.php?
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Fred5550

  • Newbie
  • *
  • Posts: 4
How to lock Roundcube for only one domain
« Reply #4 on: May 28, 2009, 04:19:47 AM »
Yes, a lot of times ...

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
How to lock Roundcube for only one domain
« Reply #5 on: May 28, 2009, 06:42:13 AM »
Quote from: Fred5550;19269
Yes, a lot of times ...

So you can't use that user as this moment.

To test you can do the following:

  • Use the credentials of a user which have never logged in before using RC.
  • Remove the user myself@anotherdomain.be from the RC database. The users are saved in the table 'users'.
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
How to lock Roundcube for only one domain
« Reply #6 on: May 28, 2009, 06:51:34 AM »
In short all the actions:

  • Set $rcmail_config['auto_create_user'] = TRUE; in the main.inc.php
  • Make sure that everyone in the domain mydomain.be has logged in using RC
  • Set $rcmail_config['auto_create_user'] = FALSE; in the main.inc.php
  • Remove the unwanted users from the table 'users'
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Fred5550

  • Newbie
  • *
  • Posts: 4
How to lock Roundcube for only one domain
« Reply #7 on: May 28, 2009, 06:56:06 AM »
It works ! Thanks a lot !!! :)