Roundcube main.inc.php keeps getting changed...

csgo

Verified User
Joined
Feb 29, 2012
Messages
47
I have Roundcube configured to use a different IMAP server than my DirectAdmin server so I have to update the line in /var/www/html/roundcube/config/main.inc.php to look at that server rather than localhost.

The problem is that when I update DirectAdmin that file gets overwritten with a default main.inc.php

I want to keep Roundcube updated but I don't want the main.inc.php to be overwritten.

Any suggestions?

Thanks,
-Joe
 
The RoundCube config file must be updated together with the entire RC files.
Some updates also changes the config file options as you can see through the revisions:

http://trac.roundcube.net/browser/trunk/roundcubemail/config/main.inc.php.dist

Anyway, you can:

1) Backup/restore the config file after every RC update. Something simple like that:

Code:
$ cd /usr/local/directadmin/custombuild && ./build clean && ./build update
$ CFGRCM=`cat /var/www/html/roundcube/config/main.inc.php`; ./build roundcube; echo "$CFGRCM" > /var/www/html/roundcube/config/main.inc.php; unset CFGRCM;

2) Try to protect the config file from changing. I don't know if it works but you can try:

Code:
$ chattr +I /var/www/html/roundcube/config/main.inc.php

[COLOR="Gray"]To unprotect: $ chattr -I /var/www/html/roundcube/config/main.inc.php[/COLOR]
 
I've just looked and it appears the latter won't work because each new version of Roundcube is intalled in a new separate directory, and then the link from /var/www/html/roundcube is changed.

While this is certainly annoying, it's not easily fixed without changing the way roundcube is implemented in DirectAdmin.

Jeff
 
Hello,

That should be your solution http://help.directadmin.com/item.php?id=365 (Using custom configs for PhpMyAdmin, SquirrelMail and Roundcube). Copy your config to /usr/local/directadmin/custombuild/custom/roundcube/main.inc.php

I have Roundcube configured to use a different IMAP server than my DirectAdmin server so I have to update the line in /var/www/html/roundcube/config/main.inc.php to look at that server rather than localhost.

The problem is that when I update DirectAdmin that file gets overwritten with a default main.inc.php

I want to keep Roundcube updated but I don't want the main.inc.php to be overwritten.

Any suggestions?

Thanks,
-Joe
 
Thanks for all the answers and suggestions. I'm going to try several of them and see what works.

Thanks,
-Joe
 
Hello,

FYI, custombuild already has the ability to install a custom main.inc.php for you.
You'd just place your custom main.inc.php into the /usr/local/directadmin/custombuild/custom/roundcube/main.inc.php path, and DA will use it with future roundcube updates.
http://help.directadmin.com/item.php?id=365

John
 
Thanks, Alex and John, for pointing out the answer already in the help system.

Jeff
 
Back
Top