Hello!
I would like to restrict roundcube to one domain and tried the following:
$rcmail_config['default_host'] = '%d = anup.de'; $rcmail_config['default_host'] = '%n = mail.anup.de';
and also
$rcmail_config['email_dns_check'] = true;
but I don't get it. Get a connection to server failed.
The log says
Could not connect to anup.de = anup.de:143: php_network_getaddresses: getaddrinfo failed: Der Name oder der Dienst ist nicht bekannt in .... /program/include/rcube_imap.php on line 191
What am I missing?
Greetings
Andreas
On Sun, Sep 15, 2013 at 08:55:50PM +0200, Andreas Meyer wrote:
I would like to restrict roundcube to one domain and tried the following:
$rcmail_config['default_host'] = '%d = anup.de'; $rcmail_config['default_host'] = '%n = mail.anup.de';
I guess you misunderstood what the replacement variables do. They are set to e. g. %d = hostname ($_SERVER['SERVER_NAME']) so you can just set
$rcmail_config['default_host'] = '%d';
instead of explicitly setting the host name. The way you do it, the %d will be replaced by the hostname and roundcube will try to connect to "anup.de = anup.de".
The log says
Could not connect to anup.de = anup.de:143: php_network_getaddresses: getaddrinfo failed: Der Name oder der Dienst ist nicht bekannt in .... /program/include/rcube_imap.php on line 191
"anup.de = anup.de:143" doesn't resolve...
Best regards, Fabian
Fabian Kurz fabian@fkurz.net wrote:
On Sun, Sep 15, 2013 at 08:55:50PM +0200, Andreas Meyer wrote:
I would like to restrict roundcube to one domain and tried the following:
$rcmail_config['default_host'] = '%d = anup.de'; $rcmail_config['default_host'] = '%n = mail.anup.de';
I guess you misunderstood what the replacement variables do. They are set to e. g. %d = hostname ($_SERVER['SERVER_NAME']) so you can just set
yes, I missunderstood that.
$rcmail_config['default_host'] = '%d';
instead of explicitly setting the host name. The way you do it, the %d will be replaced by the hostname and roundcube will try to connect to "anup.de = anup.de".
yes, but if I set $rcmail_config['default_host'] = '%d'; I can use roudncube to login to all other domains dovecot is holding. Every entry correct entry I make is ignored. Even with
$rcmail_config['default_host'] = 'ssl://www.foxmailer.de:993';
I can login to every domain.
The log says
Could not connect to anup.de = anup.de:143: php_network_getaddresses: getaddrinfo failed: Der Name oder der Dienst ist nicht bekannt in .... /program/include/rcube_imap.php on line 191
"anup.de = anup.de:143" doesn't resolve...
ok, but why is 143 appended?
Andreas
On Sunday, September 15, 2013, Andreas Meyer wrote:
Fabian Kurz fabian@fkurz.net wrote:
On Sun, Sep 15, 2013 at 08:55:50PM +0200, Andreas Meyer wrote:
I would like to restrict roundcube to one domain and tried the following:
$rcmail_config['default_host'] = '%d = anup.de'; $rcmail_config['default_host'] = '%n = mail.anup.de';
I guess you misunderstood what the replacement variables do. They are set to e. g. %d = hostname ($_SERVER['SERVER_NAME']) so you can just set
yes, I missunderstood that.
$rcmail_config['default_host'] = '%d';
instead of explicitly setting the host name. The way you do it, the %d will be replaced by the hostname and roundcube will try to connect to "anup.de = anup.de".
yes, but if I set $rcmail_config['default_host'] = '%d'; I can use roudncube to login to all other domains dovecot is holding. Every entry correct entry I make is ignored. Even with
$rcmail_config['default_host'] = 'ssl://www.foxmailer.de:993';
I can login to every domain.
That's correct. Please understand that Roundcube is just a client software to access IMAP mailboxes. If the IMAP server allows access, you get access. $rcmail_config['default_host'] is the configuration parameter that tells Roundcube which IMAP server to connect to, nothing more.
There's the $rcmail_config['username_domain'] = ''; config parameter where you can enter the domain named that is added to username, if somebody logs in with "anmeyer" instead of the full email address. This, however, doesn't restrict access if somebody enters the full email address. In our git repository we now have a new config option that will allow you to restrict access to the one domain that is configured in 'username_domain' even if the IMAP server allows more. See http://trac.roundcube.net/ticket/1489264 But it isn't yet released in Roundcube. Use the latest version from git at your own risk.
Regards, Thomas
Thomas Bruederli thomas@roundcube.net wrote:
I can login to every domain.
That's correct. Please understand that Roundcube is just a client software to access IMAP mailboxes. If the IMAP server allows access, you get access. $rcmail_config['default_host'] is the configuration parameter that tells Roundcube which IMAP server to connect to, nothing more.
There's the $rcmail_config['username_domain'] = ''; config parameter where you can enter the domain named that is added to username, if somebody logs in with "anmeyer" instead of the full email address. This, however, doesn't restrict access if somebody enters the full email address. In our git repository we now have a new config option that will allow you to restrict access to the one domain that is configured in 'username_domain' even if the IMAP server allows more. See http://trac.roundcube.net/ticket/1489264 But it isn't yet released in Roundcube. Use the latest version from git at your own risk.
aha, this is great! I'll apply the patch today and come back and report. I can apply it manually but how to make it with the patch tool?
Would patch -p0 -i /patch.file work?
Andreas
Thomas Bruederli thomas@roundcube.net wrote:
I can login to every domain.
That's correct. Please understand that Roundcube is just a client software to access IMAP mailboxes. If the IMAP server allows access, you get access. $rcmail_config['default_host'] is the configuration parameter that tells Roundcube which IMAP server to connect to, nothing more.
There's the $rcmail_config['username_domain'] = ''; config parameter where you can enter the domain named that is added to username, if somebody logs in with "anmeyer" instead of the full email address. This, however, doesn't restrict access if somebody enters the full email address. In our git repository we now have a new config option that will allow you to restrict access to the one domain that is configured in 'username_domain' even if the IMAP server allows more. See http://trac.roundcube.net/ticket/1489264 But it isn't yet released in Roundcube. Use the latest version from git at your own risk.
Applied the patch and it works like desired! Thank you!
Andreas
Andreas Meyer anmeyer@anup.de wrote:
There's the $rcmail_config['username_domain'] = ''; config parameter where you can enter the domain named that is added to username, if somebody logs in with "anmeyer" instead of the full email address. This, however, doesn't restrict access if somebody enters the full email address. In our git repository we now have a new config option that will allow you to restrict access to the one domain that is configured in 'username_domain' even if the IMAP server allows more. See http://trac.roundcube.net/ticket/1489264 But it isn't yet released in Roundcube. Use the latest version from git at your own risk.
Applied the patch and it works like desired! Thank you!
Must correct myself, no it does not. If I set
$rcmail_config['username_domain'] = '%d'; and $rcmail_config['force_username_domain'] = true;
and try to login with full email address anmeyer@anup.de, roundube then makes anmeyer@anup.de@anup.de out of it and the login fails.
Andreas
On 09/16/2013 11:34 AM, Andreas Meyer wrote:
$rcmail_config['username_domain'] = '%d'; and $rcmail_config['force_username_domain'] = true;
The option name is 'username_domain_forced' and it works for me.
"A.L.E.C" alec@alec.pl wrote:
On 09/16/2013 11:34 AM, Andreas Meyer wrote:
$rcmail_config['username_domain'] = '%d'; and $rcmail_config['force_username_domain'] = true;
The option name is 'username_domain_forced' and it works for me.
In the patch I read force_username_domain. I now changed to $rcmail_config['username_domain_forced'] = true; and this works when I just insert the name of the email-address without domainpart. But still I can login to other doamins hold by dovecot.
Andreas