Recent posts
#91
Roundcube Discussion / Re: Can't change view
Last post by culinanrr1 - May 05, 2025, 02:25:18 PMIs there someone who can help? Thank you again!!
#92
Pending Issues / Re: Failed to start roundcube-...
Last post by C983746 - May 01, 2025, 10:30:33 AMThank you. Yes it does run that .sh file.
I had to disable this one as well: Purge expired Roundcube sessions, caches and tempfiles
Roundcube on my server is rarely used. Its just a backup in case I need web access somewhere.
I had to disable this one as well: Purge expired Roundcube sessions, caches and tempfiles
Roundcube on my server is rarely used. Its just a backup in case I need web access somewhere.
#93
Release Discussion / Re: Re-login to Roundcube with...
Last post by beerzone - April 30, 2025, 12:03:03 AMSKaero, you're great! Thank you so much for your help!
Here is my final autologon plugin:
Here is my final autologon plugin:
Code Select
<?php
/**
* Sample plugin to try out some hooks.
* This performs an automatic login if accessed from localhost
*
* @license GNU GPLv3+
* @author Thomas Bruederli
*/
class autologon extends rcube_plugin
{
public function init()
{
$this->add_hook('startup', [$this, 'startup']);
$this->add_hook('authenticate', [$this, 'authenticate']);
$this->add_hook('ready', [$this, 'ready']);
}
function startup($args)
{
if (empty($_SESSION['user_id']) && !empty($_GET['_autologin'])) {
$args['action'] = 'login';
}
return $args;
}
function ready($args)
{
if (!empty($_GET['_autologin']) && $_GET['_user'] != $_SESSION['username']){
$rcmail = rcmail::get_instance();
$rcmail->logout_actions();
$rcmail->kill_session();
header("Location: https://" . gethostname() . "/?_autologin=1&_user={$_GET['_user']}&_token={$_GET['_token']}");
}
return $args;
}
function authenticate($args)
{
if (!empty($_GET['_autologin'])){
$args['user'] = $_GET['_user'];
$cmd = '/usr/bin/python3 /usr/share/mpd/maila/manage.py user decode -u '.$_GET['_user'].' -t '.$_GET['_token'];
$output = shell_exec(escapeshellcmd($cmd));
if (!empty($output)){
$out = trim($output);
}
else {
return $args;
}
$args['pass'] = $out;
$args['host'] = 'localhost';
$args['cookiecheck'] = false;
$args['valid'] = true;
}
return $args;
}
}
It works like a charm. #94
Release Discussion / Re: Re-login to Roundcube with...
Last post by SKaero - April 29, 2025, 04:34:24 PMI would use a header redirect that way the login can be handled by the other part of the plugin that is already working.
#95
Release Discussion / Re: Re-login to Roundcube with...
Last post by beerzone - April 29, 2025, 03:55:58 PMI don't understand, how to redirect back to the login.
Now my ready function is like this:
I've tried to use $rcmail->login("new_user*master_user", "master_password", "localhost", false); instead of $this->authenticate($args);. New user mailbox is opend for a second and then redirects to empty login page.
How to redirect back to the login from the ready function correctly?
Now my ready function is like this:
Code Select
function ready($args)
{
if (!empty($_GET['_autologin'])){
if ($_GET['_user'] != $args['user']){
$rcmail = rcmail::get_instance();
$rcmail->logout_actions();
$rcmail->kill_session();
$this->authenticate($args);
}
}
return $args;
}
If I send GET request with autologin parameter first time, the users mailbox is opened. Then I send GET request with new user. Login page with new username and empty password is opend. When I send GET request with new user again, the new users mailbox is opend.I've tried to use $rcmail->login("new_user*master_user", "master_password", "localhost", false); instead of $this->authenticate($args);. New user mailbox is opend for a second and then redirects to empty login page.
How to redirect back to the login from the ready function correctly?
#96
Release Discussion / Re: Re-login to Roundcube with...
Last post by SKaero - April 29, 2025, 12:02:12 PMThere is an example of how to log a user out in the autologout plugin https://github.com/roundcube/roundcubemail/blob/master/plugins/autologout/autologout.php you can then redirect to the login again to login with the new account.
#97
Release Discussion / Re: Re-login to Roundcube with...
Last post by beerzone - April 29, 2025, 09:00:08 AMHow should I logout correctly?
Code Select
function ready($args)
{
if (!empty($_GET['_autologin'])){
rcube::console("Logout");
$task = 'logout'; // What code must be here?
}
return $args;
}
#98
Roundcube Discussion / Re: [SOLVED] Keycloak and Roun...
Last post by jellydrink - April 29, 2025, 04:27:35 AMsorry if I`m out of topic.
Is your Dovecot configuration compatible with authentication via the Thunderbird mail client?
Is your Dovecot configuration compatible with authentication via the Thunderbird mail client?
#99
Roundcube Discussion / Re: Limited Password length
Last post by aconti - April 28, 2025, 02:14:50 PMits a postfix mail server with mariadb, Dovecot and fronted by Roundcube
So need to find out who is responsable for the authentication (thought it was Dovecot) and confirm old hash method being used and find instructions to change that. Sounds right?
So need to find out who is responsable for the authentication (thought it was Dovecot) and confirm old hash method being used and find instructions to change that. Sounds right?
#100
Roundcube Discussion / Re: Can't change view
Last post by culinanrr1 - April 28, 2025, 07:15:40 AMHey,
I still have this issue. Did someone manage to resolve it? I only use it on webmail. Do you have any other recommendations?
Thank you!!
I still have this issue. Did someone manage to resolve it? I only use it on webmail. Do you have any other recommendations?
Thank you!!