Roundcube is very well made webmail client written in PHP and all the aspects of the program experiences are taken very seriously, like the security as an example.
If installed by default Roundcube does not allow the browser to remember your username details. If you are like me a bit unhappy to type it every time – this is the article for you. Of course when I first decided to change this behaviour I went to see if there is anything in the official documentation, but I could not find the answer there nor I managed to find a decent answer to that online. So I had to take the hard way and do it myself digging the content of the program’s files… 🙂
My Roundcube installation is on a Debian system, but in general the steps should be the same for any Linux installation.
First of all find your installation folder, on a Debian system it should be /usr/share/roundcube.
Navigate to include folder:
cd /usr/share/roundcube/program/include/
Open the file rcmail_output_html.php with your favourite text editor.
nano rcmail_output_html.php
In this file find the lines with this content /line 1792 in my case/:
// set atocomplete attribute
$user_attrib = $autocomplete > 0 ? array() : array(‘autocomplete’ => ‘off’);
Now at the end of the line change ‘off’ to ‘on’ so it looks like this:
// set atocomplete attribute
$user_attrib = $autocomplete > 0 ? array() : array(‘autocomplete’ => ‘on’);
And that’s all, just reload Roundcube’s login page so your change takes effect. Keep in mind after update you may /most likely will/ need to change this again.
Sep 19th, 2021 at 7:33 am
4 years down the road and this workaround does not work anymore, at least for me. I tried changing all 3 strings in the array to on and changing $autocomplete > value from 0 to 1.
Perhaps you know how to get it working in 2021?
LikeLike
Sep 19th, 2021 at 3:26 pm
Hi Ascar, haven done it for a while, but just checked and this still works. May be your version is different/newer? Checked on Roundcube Webmail IMAP Client || Version 1.3.16
LikeLike
Sep 19th, 2021 at 5:34 pm
Alright, I am on a much newer version 1.4.11 and my installation location is different since Roundcube was installed as a part of iRedMaill in /opt/www/roundcube, however it should not change a zilch in the logic.
I am wondering if I use Roundcube as a service provider how would I handle forgotten passwords as well. There are no explicit explanations about how to add a ‘Forgot Password?’ link to the login form….
So, no way to store login creds in cookies and no way to recover lost passwords…
If you have anything to share one day please do!
LikeLike
Sep 19th, 2021 at 8:58 pm
This may not be implemented in the software/code, you can always request/discuss with the developers. For a small group of users the sysadmin can easily change the password in the database, though I agree for a large organisation it will be inconvenient. I can not recall, but probably there is another webmail frontend which supports the function.
LikeLike