Changes

Jump to navigation Jump to search
3,131 bytes added ,  15:24, 5 December 2014
Line 191: Line 191:  
  less /opt/roundcube/logs/errors
 
  less /opt/roundcube/logs/errors
   −
=== Options ===
+
===Access===
You can fine tune access to roundcube with DB settings. For details have a look at [[Web Application RPM#New DB settings]].
+
{{Note box|By default, the Roundcube webmail interface is accessible from the entire internet without requiring additional HTTP authentication. }}
   −
====Activate Roundcube Plugins====
+
Access to Roundcube can be fine-tuned by setting the corresponding property in the configuration DB of SME server:
the major change is the roundcube plugin repository, however there are not too much available now, but with time there will be more.
     −
if you need more plugins, you can see http://plugins.roundcube.net/packages/ and you have to add the package name in composer.json. Take attention to the coma (,) it is really important.
+
config setprop roundcube PublicAccess OPTION
 +
 
 +
where OPTION is either of the following:
 +
 
 +
        none            => No access
 +
        local            => Local network  (no password required)
 +
        local-pw        => Local network  (password required)
 +
        global          => Entire Internet(no password required, this is the default on SME)
 +
        global-pw        => Entire Internet(password required)
 +
        global-pw-remote => Entire Internet(password required outside local network)
 +
 
 +
For example, to restrict access to LAN only:
 +
 
 +
config setprop roundcube PublicAccess local
 +
 
 +
To activate these changes to the configuration DB, run these commands
 +
 
 +
expand-template /etc/httpd/conf/httpd.conf
 +
sv h /service/httpd-e-smith
 +
 
 +
afterwards.
 +
 
 +
Note: For a general description of how DB settings work on SME server, have a look at [[Web Application RPM#New DB settings]].
 +
 
 +
=== Customization ===
 +
 
 +
 
 +
====Roundcube plugins====
 +
 
 +
 
 +
=====Default plugins shipped with smeserver-roundcube=====
 +
The smeserver-roundcube contrib is shipped with the following plugins already installed and enabled by default:
 +
 
 +
# config getprop roundcube PluginsList
 +
 +
globaladdressbook,carddav,calendar,libcalendaring,contextmenu,markasjunk2,vcard_attachments,newmail_notifier,emoticons,tasklist,managesieve
 +
 
 +
=====Adding additional plugins=====
 +
{{Note box|The upstream Roundcube project is currently transitioning from making plugins available through http://trac.roundcube.net/wiki/Plugin_Repository to a new full fledged plugin repository at http://plugins.roundcube.net and a semi-automated plugin installation process. SME server admins are encouraged to use the new style method described below. }}
 +
 
 +
To install an additional (non-default) Roundcube plugin in SME server roundcube :
 +
 
 +
'''Step 1:''' Find the plugin page on http://plugins.roundcube.net/packages (eg. http://plugins.roundcube.net/packages/cor/message_highlight)
 +
 
 +
'''Step 2:''' Take note of the package name and version shown in the 'require:' line right below the title of the plugin's version heading (eg. "cor/message_highlight": "dev-master")
 +
 
 +
'''Step 3:''' Add the package name and version to the "require:" block in /opt/roundcube/composer.json. Take attention to the comma (,) separator, it is really important!
    
  # nano /opt/roundcube/composer.json
 
  # nano /opt/roundcube/composer.json
Line 207: Line 252:  
       "johndoh/contextmenu": "dev-master",
 
       "johndoh/contextmenu": "dev-master",
 
       "johndoh/globaladdressbook": "dev-release-1.0",
 
       "johndoh/globaladdressbook": "dev-release-1.0",
      "johndoh/copymessage": "dev-release-1.0"
+
        "cor/message_highlight": "dev-master"
 
     },
 
     },
after each modification launch
  −
rcplugin_update.sh
     −
Answer yes or not to the question. Once done, if you want to activate plugin, you need to use the db command (need to be activated only one time)
+
'''Step 4:''' after each modification to composer.json, in order to automatically download and install the plugin launch
Add them to the db command (Here are the plugins that come by default with the program)
+
# rcplugin_update.sh
 +
 
 +
When asked, answer yes to automatically activate the plugin in the current Roundcube configuration.
 +
 
 +
'''Step 5:''' In addition, to keep the list of installed plugins persistent when this contrib is updated (ie. configuration templates are expanded again), you *absolutely* need to add the newly installed Roundcube plugin to the "PluginsList" property of "roundcube" in the configuration database of SME server:
 +
 
 +
'''Step 5a:''' First show the list of plugins currently in the configuration DB:
 +
  # config getprop roundcube PluginsList
 +
    PluginsList=globaladdressbook,carddav,calendar,libcalendaring,contextmenu,markasjunk2,vcard_attachments,newmail_notifier,emoticons,tasklist,managesieve
 +
 
 +
'''Step 5b:''' Add your newly installed plugin to the list (separated by a comma (,) and without spaces) and activate the change:
 +
# config setprop roundcube PluginsList globaladdressbook,carddav,calendar,libcalendaring,contextmenu,markasjunk2,vcard_attachments,newmail_notifier,emoticons,tasklist,managesieve,message_highlight
   −
    PluginsList=globaladdressbook,carddav,calendar,libcalendaring,contextmenu,markasjunk2,vcard_attachments,newmail_notifier,emoticons,tasklist
+
'''Step 5c:''' Activate the changes to the config DB:
in order to modify, you must add your plugin list with coma
+
  # signal-event conf-roundcube
config setprop roundcube PluginsList globaladdressbook,carddav,calendar,libcalendaring,contextmenu,markasjunk2,vcard_attachments,newmail_notifier,emoticons,tasklist,copymessage
  −
  signal-event conf-roundcube
     −
Now when you want to update your plugin list, you can issue simply
+
Step 5 in short, using backticks:
  rcplugin_update.sh
+
# config setprop roundcube PluginsList `config getprop roundcube PluginsList`,message_highlight
 +
# signal-event conf-roundcube
   −
====Personal settings====
+
To check for updates to plugins already installed, you can at any time issue the following command again:
 +
  # rcplugin_update.sh
   −
For special needs you should create your personal template file if you want your config file will not be overwritten by the smeserver-roundcube templates.
+
====Customize Roundcube settings====
   −
* The config file is now templated, so changes need to be made in a new fragment  
+
For special needs you should create your personal template file if you want your config file will not be overwritten by the smeserver-roundcube templates. This also applies to Roundcube plugins in /opt/roundcube/plugins/ which occasionally come with their own config.inc.php or generic config.php.inc.dist which you can use to set default options.
 +
 
 +
* The config file for Roundcube itself is now templated, so changes need to be made in a new custom template fragment  
 
  # ll /etc/e-smith/templates/opt/roundcube/config/config.inc.php/
 
  # ll /etc/e-smith/templates/opt/roundcube/config/config.inc.php/
 
  10default_host          15Ldap_addressbook      20plugins_configuration  template-begin          template-end             
 
  10default_host          15Ldap_addressbook      20plugins_configuration  template-begin          template-end             
    
* check which setting you want to change with  
 
* check which setting you want to change with  
  cat /opt/roundcube/config/defaults.inc.php
+
  # cat /opt/roundcube/config/defaults.inc.php
or for a plugin like managesieve
  −
cat /opt/roundcube/plugins/managesieve/config.inc.php.dist
     −
* Add the new settings in a new file
+
* Extend the default settings by adding a new template fragment and add your customizations/additions there, eg.:
  vim /etc/e-smith/templates/opt/roundcube/config/config.inc.php/30my_custom_settings
+
  # vim /etc/e-smith/templates/opt/roundcube/config/config.inc.php/30my_custom_settings
or for a plugin like managesieve
  −
mkdir -p /etc/e-smith/templates-custom/opt/roundcube/plugins/managesieve/config.inc.php
  −
vim /etc/e-smith/templates-custom/opt/roundcube/plugins/managesieve/config.inc.php/10pluginsetting
     −
* Now you have to expand
+
* Finally, expand the template:
  signal-event conf-roundcube
+
  # signal-event conf-roundcube
    +
Likewise, plugin customization can be done by creating custom template fragments.
 +
For example, to set if and how the "vacation management panel" of the "managesieve" plugin should appear in the Roundcube webmail frontend:
   −
All plugins in /opt/roundcube/plugins/ comes with their own config.inc.php.dist which you can use to set default options.
+
* check the current configuration of the managesieve plugin:
 +
  # cat /opt/roundcube/plugins/managesieve/config.inc.php
   −
{{Note box|If you think your setting should be the SME default raise a bug}}
+
* check current template fragments for the plugin configuration:
 +
  # ll /etc/e-smith/templates/opt/roundcube/plugins/managesieve/config.inc.php/
 +
  ...
 +
  -rw-r--r-- 1 root root  266 30. Nov 19:45 30showvacation
 +
  ...
   −
====Limit access to roundcube====
+
* copy the relevant template fragment to /etc/e-smith/templates-custom/... and modify the setting: 
  config setprop roundcube PublicAccess OPTION
+
# mkdir -p /etc/e-smith/templates-custom/opt/roundcube/plugins/managesieve/config.inc.php
 +
  # cp /etc/e-smith/templates/opt/roundcube/plugins/managesieve/config.inc.php/30showvacation /etc/e-smith/templates-custom/opt/roundcube/plugins/managesieve/config.inc.php/
 +
# vim /etc/e-smith/templates-custom/opt/roundcube/plugins/managesieve/config.inc.php/30showvacation
   −
OPTION is either of the following.
+
* Finally, expand the customized template:
 +
# signal-event conf-roundcube
   −
        none            => No access
+
{{Note box|If you think your setting should be the SME default raise a bug}}
        local            => Local network  (no password required)
  −
        local-pw        => Local network  (password required)
  −
        global          => Entire Internet(no password required)
  −
        global-pw        => Entire Internet(password required)
  −
        global-pw-remote => Entire Internet(password required outside local network)
     −
{{Note box|the global option is already the default option to control access to this contribs}}
     −
config setprop roundcube PublicAccess global
+
====Add an alternative URL====
   −
To enable your changes run these commands
+
If Roundcube should be reachable by an alternative URL to http://yourserver.net/roundcube, eg.
   −
expand-template /etc/httpd/conf/httpd.conf
  −
sv h /service/httpd-e-smith
  −
====Add a different URL====
  −
by example
   
  http://yourserver.net/webmail  
 
  http://yourserver.net/webmail  
 
or
 
or
Line 280: Line 331:  
{{note box|this adds another url, it doesn't remove the default}}
 
{{note box|this adds another url, it doesn't remove the default}}
   −
  config setprop roundcube URL webmail
+
  # config setprop roundcube URL webmail
 
or
 
or
  config setprop roundcube URL mail
+
  # config setprop roundcube URL mail
    
To enable your changes run these commands
 
To enable your changes run these commands
   −
  expand-template /etc/httpd/conf/httpd.conf
+
  # expand-template /etc/httpd/conf/httpd.conf
  sv h /service/httpd-e-smith
+
  # sv h /service/httpd-e-smith
    
*If you want to remove completely the new url
 
*If you want to remove completely the new url
   −
  config delprop roundcube URL
+
  # config delprop roundcube URL
    
then
 
then
   −
  expand-template /etc/httpd/conf/httpd.conf
+
  # expand-template /etc/httpd/conf/httpd.conf
  sv h /service/httpd-e-smith
+
  # sv h /service/httpd-e-smith
34

edits

Navigation menu