Roundcube Community Forum

 

RC Configuration

Started by morsecode1965, March 06, 2024, 08:12:23 AM

Previous topic - Next topic

morsecode1965

I recently upgraded from 1.4.13 to 16.6 and have run into multiple problems.

One issue I am still struggling with that I may have forced it to work is running /installer/. The installto.sh script told me that I must first run the /installer/. When I run it (still) I get a blank config instead of using my current configuration. I was able to get it to run by running the bin/update.sh script after setting the ROUNDCUBE_CONFIG_DIR environment variable to point to /etc/roundcube. This completed the database upgrade and all appears to work.

Ubuntu 20.04

So my question is, how does config work within Roundcube?

I see there is:
- ROUNDCUBE_CONFIG_DIR environment variable
- RCMAIL_CONFIG_DIR PHP variable
- RCUBE_CONFIG_DIR variable

I also see the following directories:
- /etc/roundcube
- /var/lib/roundcube/config (--> /etc/roundcube)
- /usr/share/roundcube/config

So, who is config setup in the following?
- Running standard roundcube /roundcube/
- Running installer /roundcube/installer/
- Running from command line (e.g., bin/installto.sh)



JohnDoh

The fact you have a /etc/roundcube dir makes me think may be you installed Roundcube from a package, I guess one created by the Ubuntu community. In that package the location of things like configs has been changed from the default to what ever fits with their environment. I think if you are trying to update that packaged version using the original version of Roundcube that's why you are running into some problems, the packaged version is just built differently.

It might be easier to make a fresh install from the original version and copy of any configs you need from the packaged version.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

morsecode1965

Thanks for the quick response.

Hmmm, I do not see roundcube listed when I do a 'apt list --installed' or 'snap list'.

In any case, how do recommend a clean install restoring my config and db? I like standard and

I am thinking
- backup, drop, install roundcube, and restore my postgresql roundcube database
- save and restore all config files in /etc/roundube
- anything in Apache?
- anything else?

Here is what I have in /etc/roundcube

apache.conf
config.inc.php
config.inc.php.ucf-dist
config.old.php
debian-db.php
debian-db-roundcube.php
defaults.inc.php
defaults.inc.php.dpkg-dist
htaccess
lighttpd.conf
mimetypes.php
plugins

JohnDoh

I have never tried to do it myself so I can only guess at the best way but I think I'd do something like this:

Get a fresh install of Roundcube on the server (https://github.com/roundcube/roundcubemail/blob/master/INSTALL#L33) and copy over the relevant parts of config.inc.php and any configs in the plugins dir that i want (note, i see you have a couple of db config files, i'm not sure what those are but may be they have info which should be in my config.inc.php)

also I suppose, just in case, have a look at this announcement, there were some config changes with the release of 1.6 https://roundcube.net/news/2022/07/28/roundcube-1.6.0-released

next there is an updatedb.sh utility shipped with Roundcube https://github.com/roundcube/roundcubemail/blob/master/UPGRADING#L97 so I'd use this to bring the db schema up to date.

then I might enable the installer just because its an easy way to check everything its ok.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...