From 46a910a743b42d7608e70ef3cd3525440a0d6f74 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Sat, 23 Mar 2024 16:05:15 +1100 Subject: [PATCH] initial commit of file from CVS for smeserver-horde on Sat Mar 23 16:05:15 AEDT 2024 --- .gitignore | 4 + Makefile | 21 + README.md | 18 +- additional/COPYING | 340 +++++++++++ contriborbase | 1 + createlinks | 275 +++++++++ .../db/accounts/migrate/90FreebusyDelete | 12 + .../db/configuration/defaults/horde/access | 1 + .../db/configuration/defaults/horde/freebusy | 1 + .../db/configuration/defaults/horde/imp | 1 + .../db/configuration/defaults/horde/status | 1 + .../db/configuration/defaults/horde/type | 1 + .../e-smith/db/configuration/defaults/imp/imp | 1 + .../db/configuration/defaults/imp/status | 1 + .../db/configuration/defaults/imp/type | 1 + .../e-smith/db/configuration/migrate/50horde | 7 + .../db/configuration/migrate/HordePassword | 32 ++ .../db/configuration/migrate/HordeSecret | 32 ++ .../e-smith/events/actions/conf-horde-cache | 13 + .../etc/e-smith/events/actions/ldap-add-fburl | 117 ++++ .../actions/smeserver-horde-data-delete | 41 ++ .../e-smith/sql/init/20mysql_migrate_horde | 1 + .../sql/init/21horde.mysql_set_password | 1 + .../e-smith/sql/init/25horde_mysql_create_db | 1 + .../sql/init/30horde_mysql_update_privs | 1 + .../sql/init/31horde_mysql_create_tables | 1 + .../sql/init/32turba_mysql_create_objects | 1 + .../e-smith/sql/init/80kronolith_db_upgrade | 1 + .../e-smith/sql/init/85kronolith_utc_upgrade | 1 + .../e-smith/sql/init/99Ingo_Datatree_to_SQL | 1 + .../sql/init/99Kronolith_Datatree_to_SQL | 1 + .../e-smith/sql/init/99Mnemo_Datatree_to_SQL | 1 + .../e-smith/sql/init/99Nag_Datatree_to_SQL | 1 + .../e-smith/sql/init/99Turba_Datatree_to_SQL | 1 + .../usr/share/horde/config/conf.php | 2 + .../usr/share/horde/config/hooks.local.php | 2 + .../share/horde/config/mime_drivers.local.php | 2 + .../usr/share/horde/config/prefs.local.php | 2 + .../usr/share/horde/config/registry.local.php | 2 + .../share/horde/imp/config/backends.local.php | 2 + .../usr/share/horde/imp/config/conf.php | 2 + .../horde/imp/config/mime_drivers.local.php | 2 + .../share/horde/imp/config/prefs.local.php | 2 + .../horde/ingo/config/backends.local.php | 2 + .../usr/share/horde/ingo/config/conf.php | 2 + .../usr/share/horde/kronolith/config/conf.php | 2 + .../usr/share/horde/mnemo/config/conf.php | 2 + .../usr/share/horde/nag/config/conf.php | 2 + .../horde/turba/config/attributes.local.php | 2 + .../horde/turba/config/backends.local.php | 2 + .../usr/share/horde/turba/config/conf.php | 2 + .../templates/etc/crontab/hordeagendas | 28 + .../templates/etc/crontab/hordereminders | 21 + .../e-smith/sql/init/20mysql_migrate_horde | 3 + .../sql/init/21horde.mysql_set_password | 3 + .../e-smith/sql/init/25horde_mysql_create_db | 3 + .../sql/init/30horde_mysql_update_privs | 3 + .../sql/init/31horde_mysql_create_tables | 4 + .../sql/init/32turba_mysql_create_objects | 4 + .../e-smith/sql/init/80kronolith_db_upgrade | 5 + .../e-smith/sql/init/85kronolith_utc_upgrade | 9 + .../e-smith/sql/init/99Ingo_Datatree_to_SQL | 6 + .../sql/init/99Kronolith_Datatree_to_SQL | 7 + .../e-smith/sql/init/99Mnemo_Datatree_to_SQL | 6 + .../e-smith/sql/init/99Nag_Datatree_to_SQL | 6 + .../e-smith/sql/init/99Turba_Datatree_to_SQL | 6 + .../etc/httpd/conf/httpd.conf/85HordeAccess | 108 ++++ .../etc/httpd/conf/httpd.conf/85ImpAccess | 33 ++ .../etc/httpd/conf/httpd.conf/85IngoAccess | 29 + .../etc/httpd/conf/httpd.conf/85TurbaAccess | 32 ++ .../etc/httpd/conf/httpd.conf/86MnemoAccess | 29 + .../etc/httpd/conf/httpd.conf/86NagAccess | 37 ++ .../httpd/conf/httpd.conf/87KronolithAccess | 41 ++ .../httpd.conf/VirtualHosts/30WebmailAliases | 24 + .../VirtualHosts/35HordeActivesyncAliases | 23 + .../etc/openldap/schema/horde.schema | 535 ++++++++++++++++++ .../templates/etc/php-fpm.d/www.conf/20Horde | 92 +++ .../templates/etc/rsyslog.conf/32horde | 10 + .../usr/share/horde/config/conf.php/00begin | 6 + .../horde/config/conf.php/100ConfHordePHP | 250 ++++++++ .../usr/share/horde/config/conf.php/999footer | 2 + .../horde/config/hooks.local.php/100classhook | 3 + .../config/hooks.local.php/150preauthenticate | 12 + .../config/hooks.local.php/200authusername | 7 + .../horde/config/hooks.local.php/300pref_init | 65 +++ .../horde/config/hooks.local.php/999classhook | 1 + .../mime_drivers.local.php/10mime_drivers.php | 102 ++++ .../config/prefs.local.php/100HordePrefs.php | 4 + .../config/prefs.local.php/101newpref.php | 4 + .../config/registry.local.php/100WebRoot | 3 + .../horde/config/registry.local.php/200ingo | 3 + .../config/backends.local.php/100Overrides | 3 + .../config/backends.local.php/120IMAPServers | 59 ++ .../horde/imp/config/conf.php/100ConfImpPHP | 30 + .../share/horde/imp/config/conf.php/999footer | 2 + .../10mime_drivers.local.php | 14 + .../config/prefs.local.php/10prefs_local.php | 6 + .../ingo/config/backends.local.php/100Ingo | 22 + .../horde/ingo/config/conf.php/100IngoConfPHP | 15 + .../horde/ingo/config/conf.php/999footer | 3 + .../config/conf.php/100KronolithConfPHP | 26 + .../horde/kronolith/config/conf.php/999footer | 3 + .../mnemo/config/conf.php/100MnemoConfPHP | 8 + .../horde/mnemo/config/conf.php/999footer | 3 + .../horde/nag/config/conf.php/100NagConfPHP | 8 + .../share/horde/nag/config/conf.php/999footer | 3 + .../smeserver/mysql_set_horde_password.sql | 11 + .../attributes.local.php/05TurbaAttributes | 19 + .../attributes.local.php/100SMEAttributes | 27 + .../turba/config/backends.local.php/00begin | 6 + .../config/backends.local.php/40LocalSQL | 36 ++ .../config/backends.local.php/50LocalLDAP | 137 +++++ .../backends.local.php/60LocalLDAPGroups | 55 ++ .../config/backends.local.php/90Favourites | 3 + .../turba/config/conf.php/100TurbaConfPHP | 10 + .../horde/turba/config/conf.php/999footer | 2 + .../horde/smeserver/horde_mysql_create_db.sql | 2 + .../ingo-convert-datatree-shares-to-sql | 150 +++++ .../kronolith-convert-datatree-shares-to-sql | 163 ++++++ .../mnemo-convert-datatree-shares-to-sql | 166 ++++++ .../horde/smeserver/mysql_migrate_horde.sql | 6 + .../smeserver/mysql_update_horde_privs.sql | 16 + .../nag-convert-datatree-shares-to-sql | 169 ++++++ .../turba-convert-datatree-shares-to-sql | 168 ++++++ .../horde/smeserver/turba_create_objects.pl | 57 ++ root/var/lib/php/horde/opcache/.gitignore | 0 root/var/lib/php/horde/session/.gitignore | 0 root/var/lib/php/horde/tmp/.gitignore | 0 smeserver-horde.spec | 211 +++++++ 129 files changed, 4154 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 additional/COPYING create mode 100644 contriborbase create mode 100755 createlinks create mode 100644 root/etc/e-smith/db/accounts/migrate/90FreebusyDelete create mode 100644 root/etc/e-smith/db/configuration/defaults/horde/access create mode 100644 root/etc/e-smith/db/configuration/defaults/horde/freebusy create mode 100644 root/etc/e-smith/db/configuration/defaults/horde/imp create mode 100644 root/etc/e-smith/db/configuration/defaults/horde/status create mode 100644 root/etc/e-smith/db/configuration/defaults/horde/type create mode 100644 root/etc/e-smith/db/configuration/defaults/imp/imp create mode 100644 root/etc/e-smith/db/configuration/defaults/imp/status create mode 100644 root/etc/e-smith/db/configuration/defaults/imp/type create mode 100644 root/etc/e-smith/db/configuration/migrate/50horde create mode 100644 root/etc/e-smith/db/configuration/migrate/HordePassword create mode 100644 root/etc/e-smith/db/configuration/migrate/HordeSecret create mode 100644 root/etc/e-smith/events/actions/conf-horde-cache create mode 100644 root/etc/e-smith/events/actions/ldap-add-fburl create mode 100644 root/etc/e-smith/events/actions/smeserver-horde-data-delete create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/20mysql_migrate_horde create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/21horde.mysql_set_password create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/25horde_mysql_create_db create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30horde_mysql_update_privs create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31horde_mysql_create_tables create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/32turba_mysql_create_objects create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80kronolith_db_upgrade create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/85kronolith_utc_upgrade create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Nag_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Turba_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/config/conf.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/config/hooks.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/config/mime_drivers.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/config/prefs.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/config/registry.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/backends.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/conf.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/mime_drivers.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/prefs.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/backends.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/conf.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/kronolith/config/conf.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/mnemo/config/conf.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/nag/config/conf.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/attributes.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/backends.local.php create mode 100644 root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/conf.php create mode 100644 root/etc/e-smith/templates/etc/crontab/hordeagendas create mode 100644 root/etc/e-smith/templates/etc/crontab/hordereminders create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/20mysql_migrate_horde create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/21horde.mysql_set_password create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/25horde_mysql_create_db create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/30horde_mysql_update_privs create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/31horde_mysql_create_tables create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/32turba_mysql_create_objects create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/80kronolith_db_upgrade create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/85kronolith_utc_upgrade create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/99Nag_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates/etc/e-smith/sql/init/99Turba_Datatree_to_SQL create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85ImpAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85IngoAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85TurbaAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86MnemoAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86NagAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/87KronolithAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30WebmailAliases create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/35HordeActivesyncAliases create mode 100644 root/etc/e-smith/templates/etc/openldap/schema/horde.schema create mode 100644 root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde create mode 100644 root/etc/e-smith/templates/etc/rsyslog.conf/32horde create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/conf.php/00begin create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/conf.php/999footer create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/100classhook create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/150preauthenticate create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/200authusername create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/300pref_init create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/999classhook create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/100HordePrefs.php create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/101newpref.php create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/100WebRoot create mode 100644 root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/200ingo create mode 100644 root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/100Overrides create mode 100644 root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/120IMAPServers create mode 100644 root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/100ConfImpPHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/999footer create mode 100644 root/etc/e-smith/templates/usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php create mode 100644 root/etc/e-smith/templates/usr/share/horde/imp/config/prefs.local.php/10prefs_local.php create mode 100644 root/etc/e-smith/templates/usr/share/horde/ingo/config/backends.local.php/100Ingo create mode 100644 root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/100IngoConfPHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/999footer create mode 100644 root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/100KronolithConfPHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/999footer create mode 100644 root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/100MnemoConfPHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/999footer create mode 100644 root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/100NagConfPHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/999footer create mode 100644 root/etc/e-smith/templates/usr/share/horde/smeserver/mysql_set_horde_password.sql create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/05TurbaAttributes create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/100SMEAttributes create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/00begin create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/40LocalSQL create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/50LocalLDAP create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/60LocalLDAPGroups create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/90Favourites create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/100TurbaConfPHP create mode 100644 root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/999footer create mode 100644 root/usr/share/horde/smeserver/horde_mysql_create_db.sql create mode 100644 root/usr/share/horde/smeserver/ingo-convert-datatree-shares-to-sql create mode 100644 root/usr/share/horde/smeserver/kronolith-convert-datatree-shares-to-sql create mode 100644 root/usr/share/horde/smeserver/mnemo-convert-datatree-shares-to-sql create mode 100644 root/usr/share/horde/smeserver/mysql_migrate_horde.sql create mode 100644 root/usr/share/horde/smeserver/mysql_update_horde_privs.sql create mode 100644 root/usr/share/horde/smeserver/nag-convert-datatree-shares-to-sql create mode 100644 root/usr/share/horde/smeserver/turba-convert-datatree-shares-to-sql create mode 100644 root/usr/share/horde/smeserver/turba_create_objects.pl create mode 100644 root/var/lib/php/horde/opcache/.gitignore create mode 100644 root/var/lib/php/horde/session/.gitignore create mode 100644 root/var/lib/php/horde/tmp/.gitignore create mode 100644 smeserver-horde.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cbb3a13 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +*.log +*spec-20* +*.tar.gz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..80ece61 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: smeserver-horde +# $Id: Makefile,v 1.1 2016/07/02 13:10:45 unnilennium smeserver-horde-bz10717-config.phphorde5.2.14compliance.patch $ +NAME := smeserver-horde +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index d9def0b..158538b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ -# smeserver-horde +# smeserver-horde -SMEServer Koozali developed git repo for smeserver-horde smeserver \ No newline at end of file +SMEServer Koozali developed git repo for smeserver-horde smeserver + +## Wiki +
https://wiki.koozali.org/Horde_change_"welcome_to"_name +
https://wiki.koozali.org/Horde_and_Funambol_Synchronization +
https://wiki.koozali.org/Horde_change_default_theme + +## Bugzilla +Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-horde&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
diff --git a/additional/COPYING b/additional/COPYING new file mode 100644 index 0000000..eeb586b --- /dev/null +++ b/additional/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/createlinks b/createlinks new file mode 100755 index 0000000..1b2c5e3 --- /dev/null +++ b/createlinks @@ -0,0 +1,275 @@ +#!/usr/bin/perl -w + +use esmith::Build::CreateLinks qw(:all); + +# conf-horde + +foreach (qw(conf.php hooks.local.php mime_drivers.local.php prefs.local.php registry.local.php)) +{ + templates2events("/usr/share/horde/config/$_", qw( + bootstrap-console-save + console-save + email-update + smeserver-horde-update + )); +} + +foreach (qw(conf.php hooks.local.php mime_drivers.local.php prefs.local.php registry.local.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates//usr/share/horde/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates//usr/share/horde/config/$_/template-end"); +} + +# conf-imp + +foreach (qw( backends.local.php conf.php mime_drivers.local.php prefs.local.php)) +{ + templates2events("/usr/share/horde/imp/config/$_", + qw( + bootstrap-console-save + email-update + smeserver-horde-update + )); +} + +foreach (qw( backends.local.php conf.php mime_drivers.local.php prefs.local.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates/usr/share/horde/imp/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates/usr/share/horde/imp/config/$_/template-end"); +} + +# conf-ingo + +foreach (qw(backends.local.php conf.php)) +{ + templates2events("/usr/share/horde/ingo/config/$_", + qw( + bootstrap-console-save + email-update + smeserver-horde-update + )); +} + + +foreach (qw(backends.local.php conf.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates/usr/share/horde/ingo/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates/usr/share/horde/ingo/config/$_/template-end"); +} + +#conf-kronolith + +foreach (qw(conf.php)) +{ + templates2events("/usr/share/horde/kronolith/config/$_", + qw(email-update bootstrap-console-save smeserver-horde-update)); +} + +foreach (qw(conf.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates/usr/share/horde/kronolith/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates/usr/share/horde/kronolith/config/$_/template-end"); +} + +#conf-mnemo + +foreach (qw(conf.php)) +{ + templates2events("/usr/share/horde/mnemo/config/$_", + qw(email-update bootstrap-console-save smeserver-horde-update)); +} + +foreach (qw(conf.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates/usr/share/horde/mnemo/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates/usr/share/horde/mnemo/config/$_/template-end"); +} + +#conf-nag + +foreach (qw(conf.php)) +{ + templates2events("/usr/share/horde/nag/config/$_", + qw(email-update bootstrap-console-save smeserver-horde-update)); +} + +foreach (qw(conf.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates//usr/share/horde/nag/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates/usr/share/horde/nag/config/$_/template-end"); +} + +# conf-turba +foreach (qw(attributes.local.php backends.local.php conf.php)) +{ + templates2events("/usr/share/horde/turba/config/$_", + qw(email-update bootstrap-console-save smeserver-horde-update)); +} + +foreach (qw(attributes.local.php backends.local.php conf.php)) +{ + safe_symlink("/etc/e-smith/templates-default/template-begin-php", + "root/etc/e-smith/templates//usr/share/horde/turba/config/$_/template-begin"); + safe_symlink("/etc/e-smith/templates-default/template-end-php", + "root/etc/e-smith/templates//usr/share/horde/turba/config/$_/template-end"); +} + +#-------------------------------------------------- +# actions for post-install event +#-------------------------------------------------- + +$event = "post-install"; + +templates2events( + "/usr/share/horde/smeserver/mysql_set_horde_password.sql", + $event); + +foreach (qw( + 20mysql_migrate_horde + 21horde.mysql_set_password + 25horde_mysql_create_db + 30horde_mysql_update_privs + 31horde_mysql_create_tables + 32turba_mysql_create_objects + 80kronolith_db_upgrade + 85kronolith_utc_upgrade + 99Ingo_Datatree_to_SQL + 99Kronolith_Datatree_to_SQL + 99Mnemo_Datatree_to_SQL + 99Nag_Datatree_to_SQL + 99Turba_Datatree_to_SQL + )) +{ + templates2events("/etc/e-smith/sql/init/$_", $event); +} + +#-------------------------------------------------- +# actions for post-upgrade event +#-------------------------------------------------- + +$event = "post-upgrade"; + +templates2events( + "/usr/share/horde/smeserver/mysql_set_horde_password.sql", + $event); +foreach (qw( + 20mysql_migrate_horde + 21horde.mysql_set_password + 25horde_mysql_create_db + 30horde_mysql_update_privs + 31horde_mysql_create_tables + 32turba_mysql_create_objects + 80kronolith_db_upgrade + 85kronolith_utc_upgrade + 99Ingo_Datatree_to_SQL + 99Kronolith_Datatree_to_SQL + 99Mnemo_Datatree_to_SQL + 99Nag_Datatree_to_SQL + 99Turba_Datatree_to_SQL + )) +{ + templates2events("/etc/e-smith/sql/init/$_", $event); +} + +event_link("conf-horde-cache", $event, "99"); + +#-------------------------------------------------- +# actions for smeserver-horde-update event +#-------------------------------------------------- + +$event = "smeserver-horde-update"; + +templates2events( + "/usr/share/horde/smeserver/mysql_set_horde_password.sql", + $event); +foreach (qw( + 20mysql_migrate_horde + 21horde.mysql_set_password + 25horde_mysql_create_db + 30horde_mysql_update_privs + 31horde_mysql_create_tables + 32turba_mysql_create_objects + 80kronolith_db_upgrade + 85kronolith_utc_upgrade + 99Ingo_Datatree_to_SQL + 99Kronolith_Datatree_to_SQL + 99Mnemo_Datatree_to_SQL + 99Nag_Datatree_to_SQL + 99Turba_Datatree_to_SQL + )) +{ + templates2events("/etc/e-smith/sql/init/$_", $event); +} + +event_link("conf-horde-cache", $event, "99"); + +templates2events( + "/etc/httpd/conf/httpd.conf", + $event); + +foreach $service ( qw(php-fpm php55-php-fpm php56-php-fpm php70-php-fpm php71-php-fpm php72-php-fpm php73-php-fpm php74-php-fpm) ){ + safe_symlink("reload-or-restart", "root/etc/e-smith/events/".($event, qw(email-update) )."/services2adjust/$service"); +} + +foreach $service ( qw(70 71 72 73 74 )) { +templates2events("/etc/opt/remi/php$service/php-fpm.d/www.conf", qw( email-update + smeserver-horde-update)); +} +foreach $service ( qw(55 56)) { +templates2events("/opt/remi/php$service/root/etc/php-fpm.d/www.conf", qw( email-update + smeserver-horde-update)); +} + +templates2events("/etc/php-fpm.d/www.conf", qw( email-update + smeserver-horde-update)); + +foreach $service ( qw(httpd-e-smith) ){ + safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/$service"); +} +foreach $service ( qw(mysql.init) ){ + safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/$service"); +} + + +#--------------------------------------------------------- +# actions for email-update event if horde cache is enabled +#--------------------------------------------------------- +$event = "email-update"; + +event_link("conf-horde-cache", $event, "99"); + +#-------------------------------------------------------------- +# actions for user-delete event if horde RemoveUsers is enabled +#-------------------------------------------------------------- +$event = "user-delete"; + +event_link("smeserver-horde-data-delete", $event, "90"); + +#-------------------------------------------------- +# action for user-create event +#-------------------------------------------------- + +$event = "user-create"; + +event_link("ldap-add-fburl", $event, "30"); + +#-------------------------------------------------- +# action for ldaup-update event +#-------------------------------------------------- + +$event = "ldap-update"; + +event_link("ldap-add-fburl", $event, "85"); + diff --git a/root/etc/e-smith/db/accounts/migrate/90FreebusyDelete b/root/etc/e-smith/db/accounts/migrate/90FreebusyDelete new file mode 100644 index 0000000..d6db0d8 --- /dev/null +++ b/root/etc/e-smith/db/accounts/migrate/90FreebusyDelete @@ -0,0 +1,12 @@ +{ + # Remove freebusy db entry for all users. Value is now saved directly to LDAP on SME8 + + foreach my $account ($DB->get_all) + { + next unless ($account->prop('type') eq 'user'); + + $account->delete_prop('FreeBusy'); + + } +} + diff --git a/root/etc/e-smith/db/configuration/defaults/horde/access b/root/etc/e-smith/db/configuration/defaults/horde/access new file mode 100644 index 0000000..a48cf0d --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/horde/access @@ -0,0 +1 @@ +public diff --git a/root/etc/e-smith/db/configuration/defaults/horde/freebusy b/root/etc/e-smith/db/configuration/defaults/horde/freebusy new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/horde/freebusy @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/horde/imp b/root/etc/e-smith/db/configuration/defaults/horde/imp new file mode 100644 index 0000000..f94d6ed --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/horde/imp @@ -0,0 +1 @@ +installed diff --git a/root/etc/e-smith/db/configuration/defaults/horde/status b/root/etc/e-smith/db/configuration/defaults/horde/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/horde/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/horde/type b/root/etc/e-smith/db/configuration/defaults/horde/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/horde/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/defaults/imp/imp b/root/etc/e-smith/db/configuration/defaults/imp/imp new file mode 100644 index 0000000..f94d6ed --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/imp/imp @@ -0,0 +1 @@ +installed diff --git a/root/etc/e-smith/db/configuration/defaults/imp/status b/root/etc/e-smith/db/configuration/defaults/imp/status new file mode 100644 index 0000000..7a68b11 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/imp/status @@ -0,0 +1 @@ +disabled diff --git a/root/etc/e-smith/db/configuration/defaults/imp/type b/root/etc/e-smith/db/configuration/defaults/imp/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/imp/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/migrate/50horde b/root/etc/e-smith/db/configuration/migrate/50horde new file mode 100644 index 0000000..5df9234 --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/50horde @@ -0,0 +1,7 @@ +{ + #remove access entry for imp as we only accept SSL now + $DB->get_prop_and_delete( 'imp', 'access' ); + + + +} diff --git a/root/etc/e-smith/db/configuration/migrate/HordePassword b/root/etc/e-smith/db/configuration/migrate/HordePassword new file mode 100644 index 0000000..e10457c --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/HordePassword @@ -0,0 +1,32 @@ +{ + my $horderec = $DB->get('horde') + || $DB->new_record('horde', {type => 'service'}); + my $horde_pw = $horderec->prop('DbPassword'); + if (not $horde_pw or length($horde_pw) < 57) + { + use MIME::Base64 qw(encode_base64); + + $horde_pw = "not set due to error"; + if ( open( RANDOM, "/dev/urandom" ) ) + { + my $buf; + # 57 bytes is a full line of Base64 coding, and contains + # 456 bits of randomness - given a perfectly random /dev/random + if ( read( RANDOM, $buf, 57 ) != 57 ) + { + warn("Short read from /dev/random: $!"); + } + else + { + $horde_pw = encode_base64($buf); + chomp $horde_pw; + } + close RANDOM; + } + else + { + warn "Could not open /dev/urandom: $!"; + } + $horderec->set_prop('DbPassword', $horde_pw); + } +} diff --git a/root/etc/e-smith/db/configuration/migrate/HordeSecret b/root/etc/e-smith/db/configuration/migrate/HordeSecret new file mode 100644 index 0000000..6a4d5d3 --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/HordeSecret @@ -0,0 +1,32 @@ +{ + my $horderec = $DB->get('horde') + || $DB->new_record('horde', {type => 'service'}); + my $horde_secret = $horderec->prop('SecretKey'); + if (not $horde_secret or length($horde_secret) < 57) + { + use MIME::Base64 qw(encode_base64); + + $horde_secret = "not set due to error"; + if ( open( RANDOM, "/dev/urandom" ) ) + { + my $buf; + # 57 bytes is a full line of Base64 coding, and contains + # 456 bits of randomness - given a perfectly random /dev/random + if ( read( RANDOM, $buf, 57 ) != 57 ) + { + warn("Short read from /dev/random: $!"); + } + else + { + $horde_secret = encode_base64($buf); + chomp $horde_secret; + } + close RANDOM; + } + else + { + warn "Could not open /dev/urandom: $!"; + } + $horderec->set_prop('SecretKey', $horde_secret); + } +} diff --git a/root/etc/e-smith/events/actions/conf-horde-cache b/root/etc/e-smith/events/actions/conf-horde-cache new file mode 100644 index 0000000..64af14e --- /dev/null +++ b/root/etc/e-smith/events/actions/conf-horde-cache @@ -0,0 +1,13 @@ +#!/bin/sh + +status=$(/sbin/e-smith/config getprop horde cache) +if [ "$status" = "enabled" ] +then + chown -R root.www /usr/share/horde/static + chmod -R 770 /usr/share/horde/static + +else + chown -R root.root /usr/share/horde/static + chmod -R 700 /usr/share/horde/static + echo "Caching of static horde pages is disabled" >&2 +fi diff --git a/root/etc/e-smith/events/actions/ldap-add-fburl b/root/etc/e-smith/events/actions/ldap-add-fburl new file mode 100644 index 0000000..210c2c3 --- /dev/null +++ b/root/etc/e-smith/events/actions/ldap-add-fburl @@ -0,0 +1,117 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 1999, 2000 e-smith, inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from e-smith, inc. +# For details, please visit our web site at www.e-smith.com or +# call us on 1 888 ESMITH 1 (US/Canada toll free) or +1 613 564 8000 +#---------------------------------------------------------------------- + +package esmith; + +use strict; +use Errno; +use esmith::ConfigDB; +use esmith::AccountsDB; +use esmith::util; +use Net::LDAP; + +my $c = esmith::ConfigDB->open_ro; +my $a = esmith::AccountsDB->open_ro; + +my $l = $c->get('ldap'); +my $status = $l->prop('status') || "disabled"; +unless ($status eq "enabled" ) +{ + warn "Not running action script $0, LDAP service not enabled!\n"; + exit(0); +} + +my $hostname = $c->get('SystemName') + || die("Couldn't determine system name"); + $hostname = $hostname->value; + +my $domain = $c->get('DomainName') + || die("Couldn't determine domain name"); + $domain = $domain->value; + +my @accounts; +my $account; +my $event = shift || die "Event name must be specified"; +if ($event eq 'ldap-update') +{ + @accounts = ($a->users); +} +else +{ + my $userName = shift; + die "Username argument missing." unless defined ($userName); + + $account = $a->get($userName); + die "Account $userName not found.\n" unless defined $account; + my $type = $account->prop('type') || "unknown"; + + die "Account $userName is not a user or group account; " . + "update LDAP entry failed.\n" + unless ($type eq 'user'); + @accounts = ($account); +} + +#------------------------------------------------------------ +# Update LDAP directory entry. First read LDAP password +#------------------------------------------------------------ +my $pw = esmith::util::LdapPassword(); + +#------------------------------------------------------------ +# Update LDAP database entry. +#------------------------------------------------------------ +my $base = esmith::util::ldapBase ($domain); + +my $ldap = Net::LDAP->new('localhost') + or die "$@"; + +$ldap->bind( + dn => "cn=root,$base", + password => $pw +); + +foreach my $acct (@accounts) +{ + my $key = $acct->key; + my $type = $acct->prop('type'); + next unless ($type eq 'user'); + my @attrs = (); + + my $fb = 'https://'.$hostname.'.'.$domain.'/horde/kronolith/fb.php?u='.$key.'@'.$domain; + utf8::upgrade($fb); + push @attrs, (calFBURL => $fb) unless $fb =~ /^\s*$/; + + my $dn = "uid=$key,ou=Users,$base"; + my %attrs = @attrs; + + $ldap->modify ($dn, add => {objectClass => 'calEntry'}); + my $result = $ldap->modify ($dn, replace => \%attrs); + + $result->code && + warn "failed to modify entry for $dn: ", $result->error ; + +} +$ldap->unbind; + +exit (0); + diff --git a/root/etc/e-smith/events/actions/smeserver-horde-data-delete b/root/etc/e-smith/events/actions/smeserver-horde-data-delete new file mode 100644 index 0000000..d05c7eb --- /dev/null +++ b/root/etc/e-smith/events/actions/smeserver-horde-data-delete @@ -0,0 +1,41 @@ +#!/usr/bin/perl -w + +package esmith; + +use strict; +use Errno; +use esmith::DomainsDB; +use esmith::ConfigDB; + +my $event = $ARGV [0]; +my $userName = $ARGV [1]; + +my $cdb = esmith::ConfigDB->open_ro || die("Could not open config db\n"); +my $horderemove = $cdb->get('horde'); +my $status = $horderemove->prop('RemoveUsers') || "disabled"; +unless ($status eq "enabled" ) +{ + warn "Removal of webmail database settings is disabled, to enable\n"; + warn "config setprop horde RemoveUsers enabled ; signal-event email-update\n"; + exit(0); +} + +die "Username argument missing" unless defined ($userName); + +my $db = esmith::DomainsDB->open_ro || die("Could not open domains db\n"); + +my $DomainName = ""; + +my @domains = ($DomainName, + map { $_->key } + $db->get_all()); + +foreach my $domain (@domains) +{ + unless ($domain eq "") + { + system("php /usr/bin/horde-remove-user-data -f $userName@" . "$domain" . "> /dev/null"); + } +} + +exit (0) diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/20mysql_migrate_horde b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/20mysql_migrate_horde new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/20mysql_migrate_horde @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/21horde.mysql_set_password b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/21horde.mysql_set_password new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/21horde.mysql_set_password @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/25horde_mysql_create_db b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/25horde_mysql_create_db new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/25horde_mysql_create_db @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30horde_mysql_update_privs b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30horde_mysql_update_privs new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30horde_mysql_update_privs @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31horde_mysql_create_tables b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31horde_mysql_create_tables new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31horde_mysql_create_tables @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/32turba_mysql_create_objects b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/32turba_mysql_create_objects new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/32turba_mysql_create_objects @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80kronolith_db_upgrade b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80kronolith_db_upgrade new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80kronolith_db_upgrade @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/85kronolith_utc_upgrade b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/85kronolith_utc_upgrade new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/85kronolith_utc_upgrade @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Nag_Datatree_to_SQL b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Nag_Datatree_to_SQL new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Nag_Datatree_to_SQL @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Turba_Datatree_to_SQL b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Turba_Datatree_to_SQL new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/99Turba_Datatree_to_SQL @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/config/conf.php new file mode 100644 index 0000000..22a075e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/config/conf.php @@ -0,0 +1,2 @@ +PERMS=0640 +GID="www" diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/config/hooks.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/config/hooks.local.php new file mode 100644 index 0000000..22a075e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/config/hooks.local.php @@ -0,0 +1,2 @@ +PERMS=0640 +GID="www" diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/config/mime_drivers.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/config/mime_drivers.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/config/mime_drivers.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/config/prefs.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/config/prefs.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/config/prefs.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/config/registry.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/config/registry.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/config/registry.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/backends.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/backends.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/backends.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/conf.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/conf.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/mime_drivers.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/mime_drivers.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/mime_drivers.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/prefs.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/prefs.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/imp/config/prefs.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/backends.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/backends.local.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/backends.local.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/conf.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/ingo/config/conf.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/kronolith/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/kronolith/config/conf.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/kronolith/config/conf.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/mnemo/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/mnemo/config/conf.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/mnemo/config/conf.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/nag/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/nag/config/conf.php new file mode 100644 index 0000000..dc5f838 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/nag/config/conf.php @@ -0,0 +1,2 @@ +GID="www" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/attributes.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/attributes.local.php new file mode 100644 index 0000000..22a075e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/attributes.local.php @@ -0,0 +1,2 @@ +PERMS=0640 +GID="www" diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/backends.local.php b/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/backends.local.php new file mode 100644 index 0000000..22a075e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/backends.local.php @@ -0,0 +1,2 @@ +PERMS=0640 +GID="www" diff --git a/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/conf.php b/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/conf.php new file mode 100644 index 0000000..22a075e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/usr/share/horde/turba/config/conf.php @@ -0,0 +1,2 @@ +PERMS=0640 +GID="www" diff --git a/root/etc/e-smith/templates/etc/crontab/hordeagendas b/root/etc/e-smith/templates/etc/crontab/hordeagendas new file mode 100644 index 0000000..8b7e04b --- /dev/null +++ b/root/etc/e-smith/templates/etc/crontab/hordeagendas @@ -0,0 +1,28 @@ +{ + $OUT = ''; + my $status = $horde{'status'}; + my $agendas = $horde{agendas} || "disabled"; + + $OUT .="# Horde - Daily Agenda Reminders\n"; + if (defined $status && $status ne 'enabled') + { + $OUT .= "# horde is not enabled."; + } + + elsif (defined $agendas && $agendas eq 'enabled') + + { + + my $agendatime = $horde{agendatime} || "5"; + if ($agendatime <= "24") + { + $OUT .= "0 $agendatime * * * root /usr/bin/php /usr/bin/kronolith-agenda"; + } else { + $OUT .= "# disabled - horde daily agendatime value of $horde{agendatime} is greater than 24. Value needs to be 0 - 24\n"; + } + + } else { + $OUT .= "# disabled\n"; + } +} + diff --git a/root/etc/e-smith/templates/etc/crontab/hordereminders b/root/etc/e-smith/templates/etc/crontab/hordereminders new file mode 100644 index 0000000..7afd044 --- /dev/null +++ b/root/etc/e-smith/templates/etc/crontab/hordereminders @@ -0,0 +1,21 @@ +{ + $OUT = ''; + my $status = $horde{'status'}; + my $reminders = $horde{reminders} || "enabled"; + + $OUT .="# Horde - Calendar Alarm Reminders\n"; + if (defined $status && $status ne 'enabled') + { + $OUT .= "# horde is not enabled."; + } + + elsif ($reminders eq 'enabled') + { + my $remindertime = $horde{remindertime} || "5"; + + $OUT .="*/$remindertime * * * * root /usr/bin/php /usr/bin/horde-alarms"; + } else { + $OUT .= "# disabled\n"; + } +} + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/20mysql_migrate_horde b/root/etc/e-smith/templates/etc/e-smith/sql/init/20mysql_migrate_horde new file mode 100644 index 0000000..565e795 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/20mysql_migrate_horde @@ -0,0 +1,3 @@ +#! /bin/sh + +exec mysql < /usr/share/horde/smeserver/mysql_migrate_horde.sql diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/21horde.mysql_set_password b/root/etc/e-smith/templates/etc/e-smith/sql/init/21horde.mysql_set_password new file mode 100644 index 0000000..14da551 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/21horde.mysql_set_password @@ -0,0 +1,3 @@ +#! /bin/sh + +exec mysql < /usr/share/horde/smeserver/mysql_set_horde_password.sql diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/25horde_mysql_create_db b/root/etc/e-smith/templates/etc/e-smith/sql/init/25horde_mysql_create_db new file mode 100644 index 0000000..5450e8d --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/25horde_mysql_create_db @@ -0,0 +1,3 @@ +#! /bin/sh + +exec mysql < /usr/share/horde/smeserver/horde_mysql_create_db.sql diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/30horde_mysql_update_privs b/root/etc/e-smith/templates/etc/e-smith/sql/init/30horde_mysql_update_privs new file mode 100644 index 0000000..a5fffe3 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/30horde_mysql_update_privs @@ -0,0 +1,3 @@ +#! /bin/sh + +exec mysql < /usr/share/horde/smeserver/mysql_update_horde_privs.sql diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/31horde_mysql_create_tables b/root/etc/e-smith/templates/etc/e-smith/sql/init/31horde_mysql_create_tables new file mode 100644 index 0000000..1d3850d --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/31horde_mysql_create_tables @@ -0,0 +1,4 @@ +#! /bin/sh + +/usr/bin/php /usr/bin/horde-db-migrate > /dev/null + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/32turba_mysql_create_objects b/root/etc/e-smith/templates/etc/e-smith/sql/init/32turba_mysql_create_objects new file mode 100644 index 0000000..8e390bf --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/32turba_mysql_create_objects @@ -0,0 +1,4 @@ +#! /bin/sh + +perl /usr/share/horde/smeserver/turba_create_objects.pl + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/80kronolith_db_upgrade b/root/etc/e-smith/templates/etc/e-smith/sql/init/80kronolith_db_upgrade new file mode 100644 index 0000000..570d72e --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/80kronolith_db_upgrade @@ -0,0 +1,5 @@ +#! /bin/sh +# Need to run a second time for kronolith tables to properly get upgraded + +/usr/bin/php /usr/bin/horde-db-migrate > /dev/null + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/85kronolith_utc_upgrade b/root/etc/e-smith/templates/etc/e-smith/sql/init/85kronolith_utc_upgrade new file mode 100644 index 0000000..492e57d --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/85kronolith_utc_upgrade @@ -0,0 +1,9 @@ +#!/bin/sh +UTC=$(/sbin/e-smith/config getprop horde KronolithUTC) + +if [ "$UTC" != "yes" ] +then + php /usr/bin/kronolith-convert-to-utc --yes + /sbin/e-smith/config setprop horde KronolithUTC yes +fi + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL new file mode 100644 index 0000000..7388a99 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Ingo_Datatree_to_SQL @@ -0,0 +1,6 @@ +#! /bin/sh +if [ -f /var/lib/mysql/horde/horde_datatree.frm ] +then + exec /usr/bin/php /usr/share/horde/smeserver/ingo-convert-datatree-shares-to-sql > /dev/null +fi + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL new file mode 100644 index 0000000..7739c47 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Kronolith_Datatree_to_SQL @@ -0,0 +1,7 @@ +#! /bin/sh +if [ -f /var/lib/mysql/horde/horde_datatree.frm ] +then + exec /usr/bin/php /usr/share/horde/smeserver/kronolith-convert-datatree-shares-to-sql > /dev/null +fi + + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL new file mode 100644 index 0000000..16d7d86 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Mnemo_Datatree_to_SQL @@ -0,0 +1,6 @@ +#! /bin/sh +if [ -f /var/lib/mysql/horde/horde_datatree.frm ] +then + exec /usr/bin/php /usr/share/horde/smeserver/mnemo-convert-datatree-shares-to-sql > /dev/null +fi + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/99Nag_Datatree_to_SQL b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Nag_Datatree_to_SQL new file mode 100644 index 0000000..fcdc37b --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Nag_Datatree_to_SQL @@ -0,0 +1,6 @@ +#! /bin/sh +if [ -f /var/lib/mysql/horde/horde_datatree.frm ] +then + exec /usr/bin/php /usr/share/horde/smeserver/nag-convert-datatree-shares-to-sql > /dev/null +fi + diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/99Turba_Datatree_to_SQL b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Turba_Datatree_to_SQL new file mode 100644 index 0000000..31a0b42 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/99Turba_Datatree_to_SQL @@ -0,0 +1,6 @@ +#! /bin/sh +if [ -f /var/lib/mysql/horde/horde_datatree.frm ] +then + exec /usr/bin/php /usr/share/horde/smeserver/turba-convert-datatree-shares-to-sql > /dev/null +fi + diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess new file mode 100644 index 0000000..12defca --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess @@ -0,0 +1,108 @@ +{ + use esmith::php; + #-------------------------------------------------------------- + # Dependancy check, only execute horde configuration if PHP is + # enabled. + #-------------------------------------------------------------- + + my $PHPStatus = $php{"status"}; + my $status = $horde{'status'}; + + if (!defined $PHPStatus or $PHPStatus ne 'enabled') + { + $OUT .= "# Error: horde is enabled but PHP is not enabled."; + } + elsif (defined $status && $status eq 'enabled') + { + $OUT .= qq( +# Horde specific configuration files. + + SSLRequireSSL + + Require all denied + + Options Indexes Includes FollowSymLinks + AllowOverride None +); + $OUT .= " "; + $OUT .= ( $horde{access} eq "public" ) ? "Require all granted" : "Require ip $localAccess"; + $OUT .= "\n"; + +if (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled") +{ + $OUT .= qq( + AddType application/x-httpd-php .php .php3 + php_value include_path '/usr/share/pear-addons:/usr/share/pear' + php_flag magic_quotes_gpc off + php_flag track_vars on + php_flag session.use_trans_sid off + php_admin_flag allow_url_fopen on + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)\$ /horde/rampage.php [QSA,L] +); +} +else +{ + my $c = esmith::ConfigDB->open_ro || die "Couldn't open the config database"; + my $version = PhpFpmVersionToUse($c->get('horde'),'72'); + $OUT .= qq( + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1 + + + SetHandler "proxy:unix:/var/run/php-fpm/php$version-horde.sock|fcgi://localhost" + + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)\$ /horde/rampage.php [QSA,L] +); +} + + $OUT .= qq( + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } + else + { + $OUT .= "# horde not configured as it is disabled in the config db"; + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85ImpAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85ImpAccess new file mode 100644 index 0000000..27fe295 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85ImpAccess @@ -0,0 +1,33 @@ +{ + my $status = $imp{"status"} || "disabled"; + + if ($status eq 'enabled') + { + $OUT .= qq( +# IMP specific access configuration + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85IngoAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85IngoAccess new file mode 100644 index 0000000..b72201a --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85IngoAccess @@ -0,0 +1,29 @@ +{ + my $status = $imp{status} || 'disabled'; + + if ($status eq 'enabled') + { + $OUT .= qq( +# INGO specific access configuration + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85TurbaAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85TurbaAccess new file mode 100644 index 0000000..573f2ce --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85TurbaAccess @@ -0,0 +1,32 @@ +{ + my $status = $imp{status} || 'disabled'; + if ($status eq 'enabled') + { + $OUT .= qq( +# Turba specific access configuration + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86MnemoAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86MnemoAccess new file mode 100644 index 0000000..4de0eff --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86MnemoAccess @@ -0,0 +1,29 @@ +{ + my $status = $imp{status} || 'disabled'; + + if ($status eq 'enabled') + { + $OUT .= qq( +# Mnemo specific access configuration + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86NagAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86NagAccess new file mode 100644 index 0000000..875ea34 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86NagAccess @@ -0,0 +1,37 @@ +{ + my $status = $imp{status} || 'disabled'; + + if ($status eq 'enabled') + { + $OUT .= qq( +# Nag specific access configuration + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/87KronolithAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/87KronolithAccess new file mode 100644 index 0000000..1632b14 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/87KronolithAccess @@ -0,0 +1,41 @@ +{ + my $status = $imp{status} || 'disabled'; + + if ($status eq 'enabled') + { + $OUT .= qq( +# Kronolith specific access configuration + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + +); + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30WebmailAliases b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30WebmailAliases new file mode 100644 index 0000000..a7234f0 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30WebmailAliases @@ -0,0 +1,24 @@ +{ + # vim: ft=perl: + + $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; + my $webmailStatus = $imp{'status'} || "disabled"; + + my $dirs; + $dirs{horde} = '/usr/share/horde'; + $dirs{webmail} = "$dirs{horde}"; + + return " # webmail is disabled in this VirtualHost" + unless $webmailStatus eq 'enabled'; + + foreach $place ('webmail','horde') + { + if (($port eq "$httpPort") && ($haveSSL eq 'yes') ) + { + my $portspec = ($httpsPort eq 443) ? "" : ":$httpsPort"; + $OUT .= " RewriteRule ^/$place(/.*|\$) https://%{HTTP_HOST}${portspec}/$place\$1 [L,R]\n"; + } else { + $OUT .= " Alias /$place $dirs{$place}\n"; + } + } +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/35HordeActivesyncAliases b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/35HordeActivesyncAliases new file mode 100644 index 0000000..fe72024 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/35HordeActivesyncAliases @@ -0,0 +1,23 @@ +{ + $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; + my $webmailStatus = $imp{'status'} || "disabled"; + my $syncStatus = $horde{'ActiveSync'} || "disabled"; + + return " # ActiveSync is disabled" + unless $webmailStatus eq 'enabled' && $syncStatus eq 'enabled'; + + if (($port eq "$httpPort") && ($syncStatus eq 'enabled') && ($haveSSL eq 'yes') ) + { + my $portspec = ($httpsPort eq 443) ? "" : ":$httpsPort"; + $OUT .= " RewriteRule ^/Microsoft-Server-ActiveSync(/.*|\$) https://%{HTTP_HOST}${portspec}/webmail/rpc.php\$1 [L,R]\n"; + $OUT .= " RewriteRule ^/autodiscover/autodiscover.xml(/.*|\$) https://%{HTTP_HOST}${portspec}/webmail/rpc.php\$1 [L,R]\n"; + $OUT .= " RewriteRule ^/Autodiscover/Autodiscover.xml(/.*|\$) https://%{HTTP_HOST}${portspec}/webmail/rpc.php\$1 [L,R]\n"; + $OUT .= " RewriteRule ^/AutoDiscover/AutoDiscover.xml(/.*|\$) https://%{HTTP_HOST}${portspec}/webmail/rpc.php\$1 [L,R]\n"; + } else { + $OUT .= " Alias /Microsoft-Server-ActiveSync /usr/share/horde/rpc.php\n"; + $OUT .= " Alias /autodiscover/autodiscover.xml /usr/share/horde/rpc.php\n"; + $OUT .= " Alias /Autodiscover/Autodiscover.xml /usr/share/horde/rpc.php\n"; + $OUT .= " Alias /AutoDiscover/AutoDiscover.xml /usr/share/horde/rpc.php\n"; + } +} + diff --git a/root/etc/e-smith/templates/etc/openldap/schema/horde.schema b/root/etc/e-smith/templates/etc/openldap/schema/horde.schema new file mode 100644 index 0000000..2bc2af4 --- /dev/null +++ b/root/etc/e-smith/templates/etc/openldap/schema/horde.schema @@ -0,0 +1,535 @@ +# The offical horde OID assigned by IANA is 13040. +# +# This schema depends on: +# - core.schema +# - rfc2739.schema +# +# +# Horde attribute branch 1.3.6.1.4.1.13040.2.1.* +# IMP attribute branch 1.3.6.1.4.1.13040.3.1.* +# Turba attribute branch 1.3.6.1.4.1.13040.4.1.* +# Kronolith attribute branch 1.3.6.1.4.1.13040.5.1.* +# Nag attribute branch 1.3.6.1.4.1.13040.6.1.* +# Gollem attribute branch 1.3.6.1.4.1.13040.7.1.* +# Chora attribute branch 1.3.6.1.4.1.13040.8.1.* +# Mnemo attribute branch 1.3.6.1.4.1.13040.9.1.* +# Klutz attribute branch 1.3.6.1.4.1.13040.11.1.* +# Jonah attribute branch 1.3.6.1.4.1.13040.12.1.* +# Hermes attribute branch 1.3.6.1.4.1.13040.13.1.* +# Trean attribute branch 1.3.6.1.4.1.13040.15.1.* +# Whups attribute branch 1.3.6.1.4.1.13040.16.1.* +# Ingo attribute branch 1.3.6.1.4.1.13040.17.1.* +# Ansel attribute branch 1.3.6.1.4.1.13040.18.1.* +# Genie attribute branch 1.3.6.1.4.1.13040.19.1.* +# Scry attribute branch 1.3.6.1.4.1.13040.20.1.* +# Wicked attribute branch 1.3.6.1.4.1.13040.21.1.* +# Agora attribute branch 1.3.6.1.4.1.13040.22.1.* +# Goops attribute branch 1.3.6.1.4.1.13040.24.1.* +# Merk attribute branch 1.3.6.1.4.1.13040.25.1.* +# MIMP attribute branch 1.3.6.1.4.1.13040.26.1.* +# Mottle attribute branch 1.3.6.1.4.1.13040.27.1.* +# Nic attribute branch 1.3.6.1.4.1.13040.28.1.* +# Occam attribute branch 1.3.6.1.4.1.13040.29.1.* +# Rakim attribute branch 1.3.6.1.4.1.13040.31.1.* +# Sesha attribute branch 1.3.6.1.4.1.13040.32.1.* +# Swoosh attribute branch 1.3.6.1.4.1.13040.33.1.* +# Ulaform attribute branch 1.3.6.1.4.1.13040.35.1.* +# Volos attribute branch 1.3.6.1.4.1.13040.36.1.* +# Jeta attribute branch 1.3.6.1.4.1.13040.37.1.* +# DIMP attribute branch 1.3.6.1.4.1.13040.38.1.* +# +# Horde objectclass branch 1.3.6.1.4.1.13040.2.2.* +# IMP objectclass branch 1.3.6.1.4.1.13040.3.2.* +# Turba objectclass branch 1.3.6.1.4.1.13040.4.2.* +# Kronolith objectclass branch 1.3.6.1.4.1.13040.5.2.* +# Nag objectclass branch 1.3.6.1.4.1.13040.6.2.* +# Gollem objectclass branch 1.3.6.1.4.1.13040.7.2.* +# Chora objectclass branch 1.3.6.1.4.1.13040.8.2.* +# Mnemo objectclass branch 1.3.6.1.4.1.13040.9.2.* +# Klutz objectclass branch 1.3.6.1.4.1.13040.11.2.* +# Jonah objectclass branch 1.3.6.1.4.1.13040.12.2.* +# Hermes objectclass branch 1.3.6.1.4.1.13040.13.2.* +# Trean objectclass branch 1.3.6.1.4.1.13040.15.2.* +# Whups objectclass branch 1.3.6.1.4.1.13040.16.2.* +# Ingo objectclass branch 1.3.6.1.4.1.13040.17.2.* +# Ansel objectclass branch 1.3.6.1.4.1.13040.18.2.* +# Genie objectclass branch 1.3.6.1.4.1.13040.19.2.* +# Scry objectclass branch 1.3.6.1.4.1.13040.20.2.* +# Wicked objectclass branch 1.3.6.1.4.1.13040.21.2.* +# Agora objectclass branch 1.3.6.1.4.1.13040.22.2.* +# Goops objectclass branch 1.3.6.1.4.1.13040.24.2.* +# Merk objectclass branch 1.3.6.1.4.1.13040.25.2.* +# MIMP objectclass branch 1.3.6.1.4.1.13040.26.2.* +# Mottle objectclass branch 1.3.6.1.4.1.13040.27.2.* +# Nic objectclass branch 1.3.6.1.4.1.13040.28.2.* +# Occam objectclass branch 1.3.6.1.4.1.13040.29.2.* +# Rakim objectclass branch 1.3.6.1.4.1.13040.31.2.* +# Sesha objectclass branch 1.3.6.1.4.1.13040.32.2.* +# Swoosh objectclass branch 1.3.6.1.4.1.13040.33.2.* +# Ulaform objectclass branch 1.3.6.1.4.1.13040.35.2.* +# Volos objectclass branch 1.3.6.1.4.1.13040.36.2.* +# Jeta objectclass branch 1.3.6.1.4.1.13040.37.2.* +# DIMP objectclass branch 1.3.6.1.4.1.13040.38.2.* + +# +# Horde attribute branch 1.3.6.1.4.1.13040.2.1.* +# +attributetype ( 1.3.6.1.4.1.13040.2.1.1 + NAME 'hordePrefs' + DESC 'Horde Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# IMP attribute branch 1.3.6.1.4.1.13040.3.1.* +# +attributetype ( 1.3.6.1.4.1.13040.3.1.1 + NAME 'impPrefs' + DESC 'IMP Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Turba attribute branch 1.3.6.1.4.1.13040.4.1.* +# +attributetype ( 1.3.6.1.4.1.13040.4.1.1 + NAME 'turbaPrefs' + DESC 'Turba Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +attributetype ( 1.3.6.1.4.1.13040.4.1.2 + NAME 'turbaType' + DESC 'Turba Object Type: Contact/List' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{8} ) + +attributetype ( 1.3.6.1.4.1.13040.4.1.3 + NAME 'turbaMembers' + DESC 'Encoded members of a Turba list' + SUP name ) + +attributetype ( 1.3.6.1.4.1.13040.4.1.4 + NAME 'turbaPGPPublicKey' + DESC 'PGP/GPG Public Key' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4000} ) + +# +# Kronolith attribute branch 1.3.6.1.4.1.13040.5.1.* +# +attributetype ( 1.3.6.1.4.1.13040.5.1.1 + NAME 'kronolithPrefs' + DESC 'Kronolith Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Nag attribute branch 1.3.6.1.4.1.13040.6.1.* +# +attributetype ( 1.3.6.1.4.1.13040.6.1.1 + NAME 'nagPrefs' + DESC 'Nag Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Gollem attribute branch 1.3.6.1.4.1.13040.7.1.* +# +attributetype ( 1.3.6.1.4.1.13040.7.1.1 + NAME 'gollemPrefs' + DESC 'Gollem Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Chora attribute branch 1.3.6.1.4.1.13040.8.1.* +# +attributetype ( 1.3.6.1.4.1.13040.8.1.1 + NAME 'choraPrefs' + DESC 'Chora Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Mnemo attribute branch 1.3.6.1.4.1.13040.9.1.* +# +attributetype ( 1.3.6.1.4.1.13040.9.1.1 + NAME 'mnemoPrefs' + DESC 'Mnemo Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Klutz attribute branch 1.3.6.1.4.1.13040.11.1.* +# +attributetype ( 1.3.6.1.4.1.13040.11.1.1 + NAME 'klutzPrefs' + DESC 'Klutz Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Jonah attribute branch 1.3.6.1.4.1.13040.12.1.* +# +attributetype ( 1.3.6.1.4.1.13040.12.1.1 + NAME 'jonahPrefs' + DESC 'Jonah Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Hermes attribute branch 1.3.6.1.4.1.13040.13.1.* +# +attributetype ( 1.3.6.1.4.1.13040.13.1.1 + NAME 'hermesPrefs' + DESC 'Hermes Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Trean attribute branch 1.3.6.1.4.1.13040.15.1.* +# +attributetype ( 1.3.6.1.4.1.13040.15.1.1 + NAME 'treanPrefs' + DESC 'Trean Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Whups attribute branch 1.3.6.1.4.1.13040.16.1.* +# +attributetype ( 1.3.6.1.4.1.13040.16.1.1 + NAME 'whupsPrefs' + DESC 'Whups Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Ingo attribute branch 1.3.6.1.4.1.13040.17.1.* +# +attributetype ( 1.3.6.1.4.1.13040.17.1.1 + NAME 'ingoPrefs' + DESC 'Ingo Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Ansel attribute branch 1.3.6.1.4.1.13040.18.1.* +# +attributetype ( 1.3.6.1.4.1.13040.18.1.1 + NAME 'anselPrefs' + DESC 'Ansel Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Genie attribute branch 1.3.6.1.4.1.13040.19.1.* +# +attributetype ( 1.3.6.1.4.1.13040.19.1.1 + NAME 'geniePrefs' + DESC 'Genie Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Scry attribute branch 1.3.6.1.4.1.13040.20.1.* +# +attributetype ( 1.3.6.1.4.1.13040.20.1.1 + NAME 'scryPrefs' + DESC 'Scry Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Wicked attribute branch 1.3.6.1.4.1.13040.21.1.* +# +attributetype ( 1.3.6.1.4.1.13040.21.1.1 + NAME 'wickedPrefs' + DESC 'Wicked Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Agora attribute branch 1.3.6.1.4.1.13040.22.1.* +# +attributetype ( 1.3.6.1.4.1.13040.22.1.1 + NAME 'agoraPrefs' + DESC 'Agora Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Goops attribute branch 1.3.6.1.4.1.13040.24.1.* +# +attributetype ( 1.3.6.1.4.1.13040.24.1.1 + NAME 'goopsPrefs' + DESC 'Goops Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Merk attribute branch 1.3.6.1.4.1.13040.25.1.* +# +attributetype ( 1.3.6.1.4.1.13040.25.1.1 + NAME 'merkPrefs' + DESC 'Merk Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# MIMP attribute branch 1.3.6.1.4.1.13040.26.1.* +# +attributetype ( 1.3.6.1.4.1.13040.26.1.1 + NAME 'mimpPrefs' + DESC 'MIMP Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Mottle attribute branch 1.3.6.1.4.1.13040.27.1.* +# +attributetype ( 1.3.6.1.4.1.13040.27.1.1 + NAME 'mottlePrefs' + DESC 'Mottle Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Nic attribute branch 1.3.6.1.4.1.13040.28.1.* +# +attributetype ( 1.3.6.1.4.1.13040.28.1.1 + NAME 'nicPrefs' + DESC 'NIC Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Occam attribute branch 1.3.6.1.4.1.13040.29.1.* +# +attributetype ( 1.3.6.1.4.1.13040.29.1.1 + NAME 'occamPrefs' + DESC 'Occam Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Rakim attribute branch 1.3.6.1.4.1.13040.31.1.* +# +attributetype ( 1.3.6.1.4.1.13040.31.1.1 + NAME 'rakimPrefs' + DESC 'Rakim Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Sesha attribute branch 1.3.6.1.4.1.13040.32.1.* +# +attributetype ( 1.3.6.1.4.1.13040.32.1.1 + NAME 'seshaPrefs' + DESC 'Sesha Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Swoosh attribute branch 1.3.6.1.4.1.13040.33.1.* +# +attributetype ( 1.3.6.1.4.1.13040.33.1.1 + NAME 'swooshPrefs' + DESC 'Swoosh Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Ulaform attribute branch 1.3.6.1.4.1.13040.35.1.* +# +attributetype ( 1.3.6.1.4.1.13040.35.1.1 + NAME 'ulaformPrefs' + DESC 'Ulaform Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Volos attribute branch 1.3.6.1.4.1.13040.36.1.* +# +attributetype ( 1.3.6.1.4.1.13040.36.1.1 + NAME 'volosPrefs' + DESC 'Volos Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Jeta attribute branch 1.3.6.1.4.1.13040.37.1.* +# +attributetype ( 1.3.6.1.4.1.13040.37.1.1 + NAME 'jetaPrefs' + DESC 'Jeta Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# DIMP attribute branch 1.3.6.1.4.1.13040.38.1.* +# +attributetype ( 1.3.6.1.4.1.13040.38.1.1 + NAME 'dimpPrefs' + DESC 'DIMP Preferences' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} ) + +# +# Horde objectclass branch 1.3.6.1.4.1.13040.2.2.* +# +objectclass ( 1.3.6.1.4.1.13040.2.2.1 + NAME 'hordePerson' + DESC 'Horde Preferences' + SUP top + AUXILIARY + MAY ( mail $ hordePrefs $ impPrefs $ turbaPrefs $ + gollemPrefs $ kronolithPrefs $ mnemoPrefs $ + nagPrefs $ klutzPrefs $ jonahPrefs $ + hermesPrefs $ treanPrefs $ whupsPrefs $ + ingoPrefs $ geniePrefs $ scryPrefs $ + anselPrefs $ wickedPrefs $ choraPrefs $ + agoraPrefs $ goopsPrefs $ merkPrefs $ + volosPrefs $ mimpPrefs $ mottlePrefs $ + nicPrefs $ occamPrefs $ rakimPrefs $ + seshaPrefs $ swooshPrefs $ ulaformPrefs $ + jetaPrefs $ dimpPrefs + ) ) + +objectclass ( 1.3.6.1.4.1.13040.2.2.2 + NAME 'hordeGroup' + DESC 'Horde Group' + SUP top + AUXILIARY + MAY ( mail ) ) + +# +# IMP objectclass branch 1.3.6.1.4.1.13040.3.2.* +# + +# Turba objectclass branch 1.3.6.1.4.1.13040.4.2.* +objectclass ( 1.3.6.1.4.1.13040.4.2.1 + NAME 'turbaContact' + DESC 'Turba Contact' + SUP top + AUXILIARY + MAY ( turbaType $ turbaMembers $ calFBURL ) + ) + +# +# Kronolith objectclass branch 1.3.6.1.4.1.13040.5.2.* +# + +# +# Nag objectclass branch 1.3.6.1.4.1.13040.6.2.* +# + +# +# Gollem objectclass branch 1.3.6.1.4.1.13040.7.2.* +# + +# +# Chora objectclass branch 1.3.6.1.4.1.13040.8.2.* +# + +# +# Mnemo objectclass branch 1.3.6.1.4.1.13040.9.2.* +# + +# +# Klutz objectclass branch 1.3.6.1.4.1.13040.11.2.* +# + +# +# Jonah objectclass branch 1.3.6.1.4.1.13040.12.2.* +# + +# +# Hermes objectclass branch 1.3.6.1.4.1.13040.13.2.* +# + +# +# Trean objectclass branch 1.3.6.1.4.1.13040.15.2.* +# + +# +# Whups objectclass branch 1.3.6.1.4.1.13040.16.2.* +# + +# +# Ingo objectclass branch 1.3.6.1.4.1.13040.17.2.* +# + +# +# Ansel objectclass branch 1.3.6.1.4.1.13040.18.2.* +# + +# +# Genie objectclass branch 1.3.6.1.4.1.13040.19.2.* +# + +# +# Scry objectclass branch 1.3.6.1.4.1.13040.20.2.* +# + +# +# Wicked objectclass branch 1.3.6.1.4.1.13040.21.2.* +# + +# +# Agora objectclass branch 1.3.6.1.4.1.13040.22.2.* +# + +# +# Goops objectclass branch 1.3.6.1.4.1.13040.24.2.* +# + +# +# Merk objectclass branch 1.3.6.1.4.1.13040.25.2.* +# + +# +# MIMP objectclass branch 1.3.6.1.4.1.13040.26.2.* +# + +# +# Mottle objectclass branch 1.3.6.1.4.1.13040.27.2.* +# + +# +# Nic objectclass branch 1.3.6.1.4.1.13040.28.2.* +# + +# +# Occam objectclass branch 1.3.6.1.4.1.13040.29.2.* +# + +# +# Rakim objectclass branch 1.3.6.1.4.1.13040.31.2.* +# + +# +# Sesha objectclass branch 1.3.6.1.4.1.13040.32.2.* +# + +# +# Swoosh objectclass branch 1.3.6.1.4.1.13040.33.2.* +# + +# +# Ulaform objectclass branch 1.3.6.1.4.1.13040.35.2.* +# + +# +# Volos objectclass branch 1.3.6.1.4.1.13040.36.2.* +# + +# +# Jeta objectclass branch 1.3.6.1.4.1.13040.37.2.* +# + +# +# DIMP objectclass branch 1.3.6.1.4.1.13040.38.2.* +# diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde new file mode 100644 index 0000000..45b2368 --- /dev/null +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde @@ -0,0 +1,92 @@ +{ + use esmith::ConfigDB; + use esmith::php; + my $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n"; + my $horde = $c->get( "horde" ); + + my $version = PhpFpmVersionToUse($horde,"72"); #$horde->prop('PHPVersion') || '72'; + my $status = $horde->prop('status') || 'disabled'; + return unless ($status eq 'enabled' && $version eq $PHP_VERSION); + my $key = $horde->key; + my $pool_name = lc $key; + my $memory_limit = $horde->prop('PHPMemoryLimit') || '128M'; + my $max_execution_time = $horde->prop('PHPMaxExecutionTime') || '30'; + my $max_input_time = $horde->prop('PHPMaxInputTime') || '60'; + my $allow_url_fopen = $horde->prop('PHPAllowUrlFopen') || 'disabled'; + my $post_max_size = $horde->prop('PHPPostMaxSize') || '10M'; + my $upload_max_filesize = $horde->prop('PHPUploadMaxFilesize') || '10M'; + my $file_upload = $horde->prop('PHPFileUpload') || 'enabled'; + my $include_path = ".:/usr/share/pear-addons:/usr/share/pear:/usr/share/pear-data/:/usr/share/php". + ":/opt/remi/php55/root/usr/share/pear-data/:/opt/remi/php56/root/usr/share/pear-data/". + ":/opt/remi/php70/root/usr/share/pear-data/:/opt/remi/php71/root/usr/share/pear-data/:/opt/remi/php72/root/usr/share/pear-data/: /opt/remi/php73/root/usr/share/pear-data/: /opt/remi/php74/root/usr/share/pear-data/". + ":/opt/remi/php55/root/usr/share/pear/:/opt/remi/php56/root/usr/share/pear/". + ":/opt/remi/php70/root/usr/share/pear/:/opt/remi/php71/root/usr/share/pear/:/opt/remi/php72/root/usr/share/pear/: /opt/remi/php73/root/usr/share/pear/: /opt/remi/php74/root/usr/share/pear/" ; + my $open_basedir = $horde->prop('PHPBaseDir') || '/usr/share/horde' . + ':/etc/horde/' . + ':/var/lib/php/' . $key . + ":$include_path" . + ":/etc/resolv.conf". + ":/usr/bin/gpg:/usr/bin/gpg2:/usr/bin/hunspell:/usr/bin/openssl:/home/e-smith/ssl.crt/:/usr/bin/convert:/usr/bin/identify:/usr/bin/misc/magic". + ":/usr/bin/quota:/bin/grep:/etc/mtab"; + # needed for php-fpm 5.4, does not seem to handle the sys_temp_dir + # not that a security concern as systemd use a rooted /tmp + $open_basedir .= ":/tmp/" if $version eq ""; + my $disabled_functions = $horde->prop('PHPDisabledFunctions') || 'system,show_source,' . + 'symlink,exec,dl,shell_exec,' . + 'passthru,phpinfo,' . + 'escapeshellarg,escapeshellcmd'; + my $MailForceSender = $horde->prop('MailForceSender') || "$name\@$DomainName"; + # Format vars + $file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; + $allow_url_fopen = "off" ; # ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; + $disabled_functions = join(', ', split /[,;:]/, $disabled_functions); + $open_basedir = join(':', split(/[,;:]/, $open_basedir . ",/usr/share/php")); + + $OUT .=<<"_EOF" if ($version eq $PHP_VERSION); + +[$pool_name] +user = www +group = www +listen.owner = root +listen.group = www +listen.mode = 0660 +listen = /var/run/php-fpm/php$version-$pool_name.sock +pm = dynamic +pm.max_children = 15 +pm.start_servers = 3 +pm.min_spare_servers = 3 +pm.max_spare_servers = 4 +pm.max_requests = 1000 +slowlog = /var/log/$key/slow.log +php_admin_value[session.save_path] = /var/lib/php/$key/session +php_admin_value[opcache.file_cache] = /var/lib/php/$key/opcache +php_admin_value[upload_tmp_dir] = /var/lib/php/$key/tmp +php_admin_value[sys_temp_dir] = /var/lib/php/$key/tmp +php_admin_value[mail.force_extra_parameters] = '-f $MailForceSender' +php_admin_flag[display_errors] = off +php_admin_value[error_reporting] =E_ERROR | E_WARNING | E_PARSE +php_admin_value[error_log] = /var/log/$key/error.log +php_admin_value[memory_limit] = $memory_limit +php_admin_value[max_execution_time] = $max_execution_time +php_admin_value[post_max_size] = $post_max_size +php_admin_value[upload_max_filesize] = $upload_max_filesize +php_admin_value[max_input_time] = $max_input_time +php_admin_value[disable_functions] = $disabled_functions +php_admin_flag[allow_url_fopen] = $allow_url_fopen +php_admin_flag[file_upload] = $file_upload +php_admin_flag[session.cookie_httponly] = on +php_admin_flag[allow_url_include] = off +php_admin_value[session.save_handler] = files +php_admin_value[open_basedir] = $open_basedir + +php_admin_value[auto_prepend_file] = /usr/share/php/auth_translation.php +php_value[include_path] = $include_path +php_flag[magic_quotes_gpc] = off +php_flag[track_vars] = on +php_flag[session.use_trans_sid] = off + + +_EOF + + +} diff --git a/root/etc/e-smith/templates/etc/rsyslog.conf/32horde b/root/etc/e-smith/templates/etc/rsyslog.conf/32horde new file mode 100644 index 0000000..c5cc024 --- /dev/null +++ b/root/etc/e-smith/templates/etc/rsyslog.conf/32horde @@ -0,0 +1,10 @@ +# horde logging +# first remove noise with php base dir +if $programname == "HORDE" and $msg contains '/home/e-smith/.pearrc' then stop +if $programname == "HORDE" and $msg contains '/gpg) is not within the allowed path' then stop +# then more noise +if $msg contains 'DIGEST-MD5 common mech free' then stop +# horde log +:programname, isequal, "HORDE" /var/log/horde/error.log +& stop + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/conf.php/00begin b/root/etc/e-smith/templates/usr/share/horde/config/conf.php/00begin new file mode 100644 index 0000000..65c8499 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/conf.php/00begin @@ -0,0 +1,6 @@ +{ + use esmith::util; + $basedn = esmith::util::ldapBase ($DomainName); + $ldapPW = esmith::util::LdapPassword (); + $OUT = ''; +} diff --git a/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP b/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP new file mode 100644 index 0000000..0970a83 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP @@ -0,0 +1,250 @@ +//100ConfHordePHP +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Hash: dd22d3283033d73071e7f49fd9e570144d651fcd +// $Id: 5841de7a8bd742b764f603953bef5d16a75a0da4 $ +$conf['vhosts'] = false; +$conf['debug_level'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED; +$conf['max_exec_time'] = 0; +$conf['compress_pages'] = true; +$conf['secret_key'] = '{$horde{SecretKey}}'; +$conf['umask'] = 077; +$conf['testdisable'] = true; +$conf['use_ssl'] = 2; +$conf['server']['name'] = $_SERVER['SERVER_NAME']; +$conf['urls']['token_lifetime'] = 30; +$conf['urls']['hmac_lifetime'] = 30; +$conf['urls']['pretty'] = false; +$conf['safe_ips'] = array(); +$conf['session']['name'] = 'Horde'; +{ + if (($horde{'Cookies'} || 'enabled') eq 'disabled') + { + $OUT .="\$conf['session']['use_only_cookies'] = false;"; + } else { + $OUT .="\$conf['session']['use_only_cookies'] = true;"; } +} +$conf['session']['timeout'] = 0; +$conf['session']['cache_limiter'] = 'nocache'; +$conf['session']['max_time'] = 0; +$conf['cookie']['domain'] = $_SERVER['SERVER_NAME']; +$conf['cookie']['path'] = '/horde'; +$conf['sql']['username'] = 'horde'; +$conf['sql']['password'] = '{$horde{DbPassword}}'; +$conf['sql']['socket'] = '/var/lib/mysql/mysql.sock'; +$conf['sql']['protocol'] = 'unix'; +$conf['sql']['database'] = 'horde'; +$conf['sql']['charset'] = 'latin1'; +$conf['sql']['ssl'] = false; +$conf['sql']['splitread'] = false; +$conf['sql']['logqueries'] = false; +$conf['sql']['phptype'] = 'mysqli'; +$conf['nosql']['phptype'] = false; +{ + if (($ldap{'Authentication'} || 'disabled') eq 'enabled') + { +$OUT .= qq(\$conf['ldap']['hostspec'] = 'localhost';) . "\n"; +$OUT .= qq(\$conf['ldap']['port'] = 389;) . "\n"; +$OUT .= qq(\$conf['ldap']['tls'] = false;) . "\n"; +$OUT .= qq(\$conf['ldap']['version'] = 3;) . "\n"; +$OUT .= qq(// #May not need next two lines) . "\n"; +$OUT .= qq(\$conf['ldap']['binddn'] = 'cn=root,$basedn';) . "\n"; +$OUT .= qq(\$conf['ldap']['bindpw'] = '$ldapPW';) . "\n"; +$OUT .= qq(\$conf['ldap']['bindas'] = 'anon';) . "\n"; +$OUT .= qq(\$conf['ldap']['useldap'] = true;) . "\n"; + } else { +$OUT .= qq(\$conf['ldap']['useldap'] = false;) . "\n"; + } +} +{ + my @HordeAdmins = split /[,:]/, $horde{Admins} || ''; + $OUT .= "\$conf['auth']['admins'] = array("; + if (($horde{RemoveUsers} || 'disabled') eq 'enabled') + { + $OUT .= "'adminremoveuser'" . ", " ; + } + $OUT .= "'admin', "; + foreach my $HordeAdmins (sort @HordeAdmins) + { + $OUT .= "'$HordeAdmins'" . ", " ; + } + $OUT .= ");"; +} +$conf['auth']['checkip'] = true; +$conf['auth']['checkbrowser'] = true; +$conf['auth']['resetpassword'] = false; +$conf['auth']['alternate_login'] = false; +$conf['auth']['redirect_on_logout'] = false; +$conf['auth']['list_users'] = 'list'; +{ + if (($ldap{'Authentication'} || 'disabled') eq 'enabled') + { +$OUT .= qq(\$conf['auth']['params']['basedn'] = 'ou=Users,$basedn';) . "\n"; +$OUT .= qq(\$conf['auth']['params']['scope'] = 'sub';) . "\n"; +$OUT .= qq(\$conf['auth']['params']['ad'] = false;) . "\n"; +$OUT .= qq(\$conf['auth']['params']['uid'] = 'uid';) . "\n"; +$OUT .= qq(\$conf['auth']['params']['encryption'] = 'ssha';) . "\n"; +$OUT .= qq(\$conf['auth']['params']['newuser_objectclass'] = array('shadowAccount', 'inetOrgPerson');) . "\n"; +$OUT .= qq(\$conf['auth']['params']['filter'] = '(objectclass=inetOrgPerson)';) . "\n"; +$OUT .= qq(\$conf['auth']['params']['password_expiration'] = 'no';) . "\n"; +$OUT .= qq(\$conf['auth']['params']['driverconfig'] = 'horde';) . "\n"; +$OUT .= qq(\$conf['auth']['driver'] = 'ldap';) . "\n"; + } else { + $OUT =<<'HERE'; +$conf['auth']['params']['app'] = 'imp'; +$conf['auth']['driver'] = 'application'; +HERE + } +} +$conf['auth']['params']['count_bad_logins'] = true; +$conf['auth']['params']['login_block'] = true; +$conf['auth']['params']['login_block_count'] = 5; +$conf['auth']['params']['login_block_time'] = 5; +$conf['signup']['allow'] = false; +$conf['log']['priority'] = 'NOTICE'; +$conf['log']['ident'] = 'HORDE'; +$conf['log']['name'] = LOG_USER; +$conf['log']['type'] = 'syslog'; +$conf['log']['enabled'] = true; +$conf['log_accesskeys'] = false; +$conf['prefs']['maxsize'] = 65535; +$conf['prefs']['params']['table'] = 'horde_prefs'; +$conf['prefs']['params']['driverconfig'] = 'horde'; +$conf['prefs']['driver'] = 'Sql'; +$conf['alarms']['params']['table'] = 'horde_alarms'; +$conf['alarms']['params']['driverconfig'] = 'horde'; +$conf['alarms']['params']['ttl'] = 300; +$conf['alarms']['driver'] = 'Sql'; +$conf['group']['params']['driverconfig'] = 'horde'; +$conf['group']['driver'] = 'Sql'; +$conf['perms']['driverconfig'] = 'horde'; +$conf['perms']['driver'] = 'Sql'; +$conf['share']['no_sharing'] = false; +$conf['share']['auto_create'] = true; +$conf['share']['world'] = true; +$conf['share']['any_group'] = true; +$conf['share']['hidden'] = false; +$conf['share']['cache'] = false; +$conf['share']['driver'] = 'Sql'; +$conf['cache']['default_lifetime'] = 1800; +$conf['cache']['params']['dir'] = '/var/lib/php/horde/tmp/'; +$conf['cache']['params']['sub'] = 0; +$conf['cache']['driver'] = 'File'; +$conf['cache']['use_memorycache'] = ''; +{ + if (($horde{'cache'} || 'disabled') eq 'enabled') + { + $OUT =<<'HERE'; +$conf['cachecssparams']['driver'] = 'filesystem'; +$conf['cachecssparams']['filemtime'] = false; +$conf['cachecssparams']['lifetime'] = 86400; +$conf['cachecss'] = true; +$conf['cachejsparams']['driver'] = 'filesystem'; +$conf['cachejsparams']['compress'] = 'php'; +$conf['cachejsparams']['lifetime'] = 604800; +$conf['cachejs'] = true; +$conf['cachethemesparams']['check'] = 'appversion'; +$conf['cachethemesparams']['lifetime'] = 604800; +$conf['cachethemes'] = true; +HERE + } else { + $OUT =<<'HERE'; +$conf['cachecssparams']['url_version_param'] = true; +$conf['cachecss'] = false; +$conf['cachejsparams']['url_version_param'] = true; +$conf['cachejs'] = false; +$conf['cachethemes'] = false; +HERE + } +} +$conf['lock']['driver'] = 'Null'; +$conf['token']['driver'] = 'Null'; +$conf['history']['params']['driverconfig'] = 'horde'; +$conf['history']['driver'] = 'Sql'; +$conf['davstorage']['params']['driverconfig'] = 'horde'; +$conf['davstorage']['driver'] = 'Sql'; +$conf['mailer']['params']['secure'] = 'tls'; +$conf['mailer']['params']['auth'] = false; +$conf['mailer']['params']['lmtp'] = false; +$conf['mailer']['type'] = 'smtp'; +$conf['vfs']['params']['vfsroot'] = '/var/lib/php/horde/tmp'; +$conf['vfs']['type'] = 'File'; +$conf['sessionhandler']['type'] = 'Builtin'; +$conf['sessionhandler']['hashtable'] = false; +$conf['spell']['params']['path'] = '/usr/bin/hunspell'; +$conf['spell']['driver'] = 'aspell'; +$conf['gnupg']['path'] = '/usr/bin/gpg'; +$conf['gnupg']['keyserver'] = array('pool.sks-keyservers.net', 'subkeys.pgp.net', 'pgp.mit.edu'); +$conf['gnupg']['timeout'] = 10; +$conf['openssl']['cafile'] = '/home/e-smith/ssl.crt/{ $SystemName }.{ $DomainName }.crt'; +$conf['openssl']['path'] = '/usr/bin/openssl'; +$conf['nobase64_img'] = false; +$conf['image']['convert'] = '/usr/bin/convert'; +$conf['image']['identify'] = '/usr/bin/identify'; +$conf['image']['driver'] = 'Im'; +$conf['exif']['driver'] = 'Bundled'; +$conf['mime']['magic_db'] = '/usr/share/magic'; +$conf['timezone']['location'] = 'ftp://ftp.iana.org/tz/tzdata-latest.tar.gz'; +$conf['problems']['email'] = 'admin@{ $DomainName }'; +$conf['problems']['maildomain'] = '{ $DomainName }'; +$conf['problems']['tickets'] = false; +$conf['problems']['attachments'] = false; +$conf['menu']['links']['help'] = 'authenticated'; +$conf['menu']['links']['prefs'] = 'authenticated'; +$conf['menu']['links']['problem'] = 'never'; +$conf['menu']['links']['login'] = 'all'; +$conf['menu']['links']['logout'] = 'authenticated'; +$conf['portal']['fixed_blocks'] = array(); +$conf['accounts']['params']['quota_path'] = '/usr/bin/quota'; +$conf['accounts']['params']['grep_path'] = '/bin/grep'; +$conf['accounts']['params']['translateMountPoint'] = false; +$conf['accounts']['params']['translationTable'] = '/etc/mtab'; +$conf['accounts']['driver'] = 'localhost'; +$conf['user']['verify_from_addr'] = true; +$conf['user']['select_view'] = true; +$conf['facebook']['enabled'] = false; +$conf['twitter']['enabled'] = false; +$conf['urlshortener'] = false; +$conf['weather']['provider'] = false; +$conf['imap']['enabled'] = false; +$conf['imsp']['enabled'] = false; +$conf['kolab']['enabled'] = false; +$conf['hashtable']['driver'] = 'none'; +{ + if (($horde{'ActiveSync'} || 'disabled') eq 'enabled') + { + $OUT =<<'HERE'; +$conf['activesync']['params']['driverconfig'] = 'horde'; +$conf['activesync']['storage'] = 'Sql'; +$conf['activesync']['emailsync'] = true; +$conf['activesync']['version'] = '14.1'; +$conf['activesync']['auth']['type'] = 'basic'; +$conf['activesync']['autodiscovery'] = 'user'; +$conf['activesync']['outlookdiscovery'] = false; +$conf['activesync']['ping']['heartbeatmin'] = 60; +$conf['activesync']['ping']['heartbeatmax'] = 2700; +$conf['activesync']['ping']['heartbeatdefault'] = 480; +$conf['activesync']['ping']['deviceping'] = true; +$conf['activesync']['ping']['waitinterval'] = 5; +$conf['activesync']['enabled'] = true; +HERE + } else { + $OUT =<<'HERE'; +$conf['activesync']['enabled'] = false; +HERE + } +} +{ + if (($horde{'DeviceLog'} || 'disabled') eq 'enabled') + { + $OUT =<<'HERE'; +$conf['activesync']['logging']['path'] = '/var/lib/php/horde/tmp'; +$conf['activesync']['logging']['level'] = '1'; +$conf['activesync']['logging']['type'] = 'perdevice'; +HERE + } else { + $OUT =<<'HERE'; +$conf['activesync']['logging']['type'] = false; +HERE +} +} + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/config/conf.php/999footer new file mode 100644 index 0000000..f75791e --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/conf.php/999footer @@ -0,0 +1,2 @@ +//999Footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ diff --git a/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/100classhook b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/100classhook new file mode 100644 index 0000000..82926a5 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/100classhook @@ -0,0 +1,3 @@ +class Horde_Hooks +\{ + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/150preauthenticate b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/150preauthenticate new file mode 100644 index 0000000..28147fa --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/150preauthenticate @@ -0,0 +1,12 @@ + public function preauthenticate($userId, $credentials) + \{ + # here we filter out @domain.com from login, this will allow someone to still login if they use their full email + # this would be a good place to add an array pseudonyms => user to convert the userID from a list of pseudo: + # $translate = array("jenifer@domain1.net" => "jenny" , "jd"=> "johndavros") + # $userId = ( $translate[$userId] ? translate[$userId] : $userId); + $userId = (strpos($userId, '@')? substr($userId, 0, strpos($userId, '@')) : $userId ); + return array( + 'userId' => Horde_String::lower($userId), + 'credentials' => $credentials); + \} + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/200authusername b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/200authusername new file mode 100644 index 0000000..c25849e --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/200authusername @@ -0,0 +1,7 @@ + public function authusername($userId, $toHorde) + \{ + # we only want a userid as login for horde and smeserver imap + $userId = (strpos($userId, '@')? substr($userId, 0, strpos($userId, '@')) : $userId ); + return ltrim(rtrim(Horde_String::lower($userId))) ; + \} + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/300pref_init b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/300pref_init new file mode 100644 index 0000000..c717b95 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/300pref_init @@ -0,0 +1,65 @@ + public function prefs_init($pref, $value, $username, $scope_ob) + \{ + if (is_null($username)) \{ // not logged in + return $value; + \} + # get the virtualhost + $vdomain = getenv('HTTP_HOST'); + # if it is an ip, let's use the Primary domain + if (filter_var($vdomain, FILTER_VALIDATE_IP)) \{ + $vdomain = "{$DomainName}"; + \} else\{ # else filter the virtual domain to remove unwanted parts +{ + my @filtered = split /[;,: ]/, $horde{SubdomainFilter} || "www,mail,webmail"; + $OUT .= " \$patterns = array();\n"; + foreach my $filter (sort @filtered) + { + $OUT .= " array_push(\$patterns,'|^$filter\\.|i');\n"; + } +} + $vdomain = preg_replace($patterns, '', $vdomain); + \} + $vdomain = Horde_String::lower($vdomain); +{ # override to Primary Domain + my $UsePrimary = $horde{ForcePrimaryDomain} || "disabled"; + $OUT .= ($UsePrimary eq "enabled") ? " \$vdomain = '$DomainName';\n" : " # ForcePrimaryDomain disabled\n # \$vdomain = '$DomainName';\n" ; + + my $basedn = esmith::util::ldapBase ($DomainName); + $OUT .= " \$ldapServer = 'localhost'; + \$ldapPort = '389'; + \$searchBase = 'ou=Users,$basedn'; + \$ds = \@ldap_connect(\$ldapServer, \$ldapPort); + if (\@ldap_bind(\$ds )) { + \$searchResult = \@ldap_search(\$ds, \$searchBase, 'uid=' . \$username); + } + \$information = \@ldap_get_entries(\$ds, \$searchResult);"; + +} + + switch ($pref) \{ + + case 'default_share' : + if (is_null($username)) \{ + return $value; + \} + return $username; + + case 'from_addr': + if($value == '') \{ + $value = "$username@$vdomain"; + \} + return $value; + case 'fullname': + if($value == '') \{ + $value = "$username"; + \} + if (($information['count'] > 0) && ($information[0]['displayname'][0] != '') ) \{ + $value = $information[0]['displayname'][0]; + \} else \{ + $value = "$username"; + \} + return $value; + \} + + \} + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/999classhook b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/999classhook new file mode 100644 index 0000000..dbea7aa --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/hooks.local.php/999classhook @@ -0,0 +1 @@ +\} diff --git a/root/etc/e-smith/templates/usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php b/root/etc/e-smith/templates/usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php new file mode 100644 index 0000000..71dccf0 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/mime_drivers.local.php/10mime_drivers.php @@ -0,0 +1,102 @@ +$mime_drivers = array( + /* MS Word display. + * This driver requires AbiWord to be installed. + * AbiWord homepage: http://www.abisource.com/ */ + 'msword' => array( + // Disabled by default +{ + if (($horde{inlineMSWord} || "false") eq "true") { + $OUT .=" 'disable' => false,"; +} else { + $OUT .=" 'disable' => true,"; +} +} + 'handles' => array( + 'application/msword', + 'application/vnd.ms-word' + ), + 'icons' => array( + 'default' => 'msword.png' + ), + + // REQUIRED: Location of the AbiWord binary + 'location' => '/usr/bin/abiword' + ), + + /* MS Excel display. + * This driver requires Gnumeric to be installed. + * Gnumeric homepage: http://projects.gnome.org/gnumeric/ */ + 'msexcel' => array( + // Disabled by default +{ + if (($horde{inlineMSExcel} || "false") eq "true") { + $OUT .=" 'disable' => false,"; +} else { + $OUT .=" 'disable' => true,"; +} +} + 'handles' => array( + 'application/msexcel', + 'application/x-msexcel', + 'application/vnd.ms-excel' + ), + 'icons' => array( + 'default' => 'msexcel.png' + ), + + // REQUIRED: Location of the ssconvert binary + 'location' => '/usr/bin/ssconvert' + ), + + /* MS Powerpoint display. + * This driver requires ppthtml, included with xlhtml, to be installed. + * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/ */ + 'mspowerpoint' => array( + // Disabled by default +{ + if (($horde{inlineMSPowerpoint} || "false") eq "true") { + $OUT .=" 'disable' => false,"; +} else { + $OUT .=" 'disable' => true,"; +} +} + 'handles' => array( + 'application/mspowerpoint', + 'application/vnd.ms-powerpoint' + ), + 'icons' => array( + 'default' => 'mspowerpoint.png' + ), + + // REQUIRED: Location of the ppthtml binary + 'location' => '/usr/bin/ppthtml' + ), + + /* WordPerfect document display. + * This driver requires wpd2html to be installed. + * libwpd homepage: http://libwpd.sourceforge.net/ */ + 'wordperfect' => array( + // Disabled by default +{ + if (($horde{inlineWordperfect} || "false") eq "true") { + $OUT .=" 'disable' => false,"; +} else { + $OUT .=" 'disable' => true,"; +} +} + 'handles' => array( + 'application/vnd.wordperfect', + 'application/wordperf', + 'application/wordperfect', + 'application/wpd', + 'application/x-wpwin' + ), + 'icons' => array( + 'default' => 'wordperfect.png' + ), + + // REQUIRED: location of the wpd2html binary + 'location' => '/usr/bin/wpd2html' + ), +); + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/100HordePrefs.php b/root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/100HordePrefs.php new file mode 100644 index 0000000..4adf672 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/100HordePrefs.php @@ -0,0 +1,4 @@ +$_prefs['initial_application']['value'] = 'imp'; + +$_prefs['sidebar_width']['value'] = 225; + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/101newpref.php b/root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/101newpref.php new file mode 100644 index 0000000..4eeab23 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/prefs.local.php/101newpref.php @@ -0,0 +1,4 @@ +$_prefs['id']['value'] = 'Default Identity'; +$_prefs['fullname']['hook'] = true; +$_prefs['from_addr']['hook'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/100WebRoot b/root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/100WebRoot new file mode 100644 index 0000000..513bdc9 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/100WebRoot @@ -0,0 +1,3 @@ +// 100webRoot + $app_webroot = '/horde'; + diff --git a/root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/200ingo b/root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/200ingo new file mode 100644 index 0000000..1b7eddb --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/config/registry.local.php/200ingo @@ -0,0 +1,3 @@ + +$this->applications['ingo']['menu_parent'] = ''; + diff --git a/root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/100Overrides b/root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/100Overrides new file mode 100644 index 0000000..87c1c64 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/100Overrides @@ -0,0 +1,3 @@ +//100Overrides +$servers['imap']['disabled'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/120IMAPServers b/root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/120IMAPServers new file mode 100644 index 0000000..cb48c5b --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/imp/config/backends.local.php/120IMAPServers @@ -0,0 +1,59 @@ +//120IMAPServers +{ + use esmith::DomainsDB; + my $db = esmith::DomainsDB->open_ro; + my @domains = ($DomainName, + map { $_->key } + grep { my $p = $_->prop('SystemPrimaryDomain') || ''; $p ne 'yes' } + $db->get_all()); + foreach my $domain (@domains) + { + $OUT .= "\$servers['$domain'] = array(\n"; + $OUT .= " 'disabled' => false,\n"; + $OUT .= " 'name' => 'IMAP Server',\n"; + $OUT .= " 'hostspec' => 'localhost',\n"; + $OUT .= " 'hordeauth' => true,\n"; + $OUT .= " 'protocol' => 'imap',\n"; + $OUT .= " 'port' => '143',\n"; + $OUT .= " 'secure' => 'notls',\n"; + $OUT .= " 'maildomain' => '$domain',\n"; + $OUT .= " 'smtphost' => 'localhost',\n"; + if (defined($smtpd)) + { + + $OUT .= " 'smtpport' => '$smtpd{TCPPort}',\n"; + } else { + $OUT .= " 'smtpport' => '$qpsmtpd{TCPPort}',\n"; + } + $OUT .= " 'cache' => false,\n"; + if (($dovecot{'SharedMailbox'} || 'disabled') eq 'enabled') + { + $OUT .= " 'acl' => true, \n"; + } + if (($horde{'quota'} || 'disabled') eq 'enabled') + { + $OUT .= " 'quota' => array(\n"; + $OUT .= " 'driver' => 'imap',\n"; + $OUT .= " 'params' => array(\n"; + $OUT .= " 'hide_when_unlimited' => true,\n"; + $OUT .= " 'unit' => 'GB',\n"; + $OUT .= " 'interval' => 0,\n"; + $OUT .= " )\n"; + $OUT .= " ),\n"; + } + if (($spamassassin{'UseBayes'} || '0') eq '1' and (($spamassassin{'SpamLearning'} || 'disabled') eq 'enabled')) + { + $OUT .= " 'spam' => array(\n"; + $OUT .= " 'innocent' => array(\n"; + $OUT .= " 'display' => true,\n"; + $OUT .= " 'program' => '/usr/bin/spamc -C revoke -u %l',\n"; + $OUT .= " ),\n"; + $OUT .= " 'spam' => array(\n"; + $OUT .= " 'display' => false,\n"; + $OUT .= " 'program' => '/usr/bin/spamc -C report -u %l',\n"; + $OUT .= " )\n"; + $OUT .= " ),\n"; + } + $OUT .= ");\n"; + } +} diff --git a/root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/100ConfImpPHP b/root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/100ConfImpPHP new file mode 100644 index 0000000..9e0906b --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/100ConfImpPHP @@ -0,0 +1,30 @@ +// 100ConfImpPHP +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Id: 48bf0b4cc99e7941b4432a29e70e145b8d654cc7 $ +$conf['user']['allow_view_source'] = true; +$conf['server']['server_list'] = 'none'; +$conf['compose']['use_vfs'] = false; +$conf['compose']['link_attachments'] = false; +$conf['compose']['attach_size_limit'] = 0; +$conf['compose']['attach_count_limit'] = 0; +$conf['compose']['reply_limit'] = 0; +$conf['compose']['ac_threshold'] = 3; +$conf['compose']['htmlsig_img_size'] = 30000; +$conf['pgp']['keylength'] = 2048; +$conf['maillog']['driver'] = 'history'; +{ + if (($horde{'LogMessages'} || 'disabled') eq 'enabled') + { +$OUT .="\$conf['sentmail']['params']['threshold'] = 60;" . "\n"; +$OUT .="\$conf['sentmail']['params']['limit_period'] = 24;" . "\n"; +$OUT .="\$conf['sentmail']['params']['table'] = 'imp_sentmail';" . "\n"; +$OUT .="\$conf['sentmail']['params']['driverconfig'] = 'horde';" . "\n"; +$OUT .="\$conf['sentmail']['driver'] = 'Sql';" + } else { +$OUT .="\$conf['sentmail']['driver'] = 'Null';"; + } +} +$conf['contactsimage']['backends'] = array('IMP_Contacts_Avatar_Addressbook'); +$conf['tasklist']['use_tasklist'] = true; +$conf['notepad']['use_notepad'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/999footer new file mode 100644 index 0000000..ccc160d --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/imp/config/conf.php/999footer @@ -0,0 +1,2 @@ +// 999footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ diff --git a/root/etc/e-smith/templates/usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php b/root/etc/e-smith/templates/usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php new file mode 100644 index 0000000..a38f79f --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/imp/config/mime_drivers.local.php/10mime_drivers.local.php @@ -0,0 +1,14 @@ +//10mime_drivers.local.php +{ + $Inline = (defined $horde{Limitinlinesize}) + ? $horde{Limitinlinesize} + : 1048576; + $OUT = qq(\$mime_drivers['plain']['limit_inline_size'] = $Inline;); +} + +$mime_drivers['plain']['pgp_inline'] = true; + +$mime_drivers['html']['inline'] = { $horde{inlineHTML} || 'true' }; + +$mime_drivers['images']['inline'] = { $horde{inlineImages} || 'true' }; + diff --git a/root/etc/e-smith/templates/usr/share/horde/imp/config/prefs.local.php/10prefs_local.php b/root/etc/e-smith/templates/usr/share/horde/imp/config/prefs.local.php/10prefs_local.php new file mode 100644 index 0000000..17ca9ad --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/imp/config/prefs.local.php/10prefs_local.php @@ -0,0 +1,6 @@ +$_prefs['atc_flag']['value'] = 1; + +$_prefs['ckeditor_buttons'] = array( + 'value' => "[['Source','Maximize','-','Templates'],['Cut','Copy','Paste'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],'/',['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],'/',['Styles','Format','Font','FontSize'],['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['TextColor','BGColor']]",); + +$_prefs['subscribe']['value'] = 0; diff --git a/root/etc/e-smith/templates/usr/share/horde/ingo/config/backends.local.php/100Ingo b/root/etc/e-smith/templates/usr/share/horde/ingo/config/backends.local.php/100Ingo new file mode 100644 index 0000000..4d4fde5 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/ingo/config/backends.local.php/100Ingo @@ -0,0 +1,22 @@ +{ +my $SievePort = $sieve{TCPPort} || '4190'; +my @SieveHosts = split /[,: ]/, $sieve{Listen} || 'localhost'; +if (($sieve{'status'} || 'disabled') eq 'enabled') + { + $OUT .= "\$backends['imap']['disabled'] = true;\n"; + $OUT .= "\$backends['sieve']['disabled'] = false;\n"; + $OUT .= "\$backends['sieve']['transport'][Ingo::RULE_ALL]['params']['hostspec'] = "; + foreach my $SieveHosts (sort @SieveHosts) + { + $OUT .= "'$SieveHosts' "; + } + $OUT .= ";\n"; + $OUT .= "\$backends['sieve']['transport'][Ingo::RULE_ALL]['params']['logintype'] = 'PLAIN';\n"; + $OUT .= "\$backends['sieve']['transport'][Ingo::RULE_ALL]['params']['port'] = '$SievePort';\n"; + $OUT .= "\$backends['sieve']['transport'][Ingo::RULE_ALL]['params']['usetls'] = false;\n"; + $OUT .= "\$backends['sieve']['script'][Ingo::RULE_ALL]['params']['utf8'] = true;\n"; + } else { + $OUT = "\$backends['imap']['preferred'] = '$DomainName';"; + } +} + diff --git a/root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/100IngoConfPHP b/root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/100IngoConfPHP new file mode 100644 index 0000000..4242af7 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/100IngoConfPHP @@ -0,0 +1,15 @@ +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Id: 48142d13ef06c07f56427fe5b43981631bdbfdb0 $ +$conf['storage']['params']['driverconfig'] = 'horde'; +{ + if (($horde{'IngoSqlPrefs'} || 'disabled') eq 'enabled') + { + $OUT .="\$conf['storage']['driver'] = 'sql';"; + } else { + $OUT .="\$conf['storage']['driver'] = 'prefs';"; } +} +$conf['rules']['userheader'] = true; +$conf['spam']['header'] = 'X-Spam-Level'; +$conf['spam']['char'] = '*'; +$conf['spam']['compare'] = 'string'; + diff --git a/root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/999footer new file mode 100644 index 0000000..952ee71 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/ingo/config/conf.php/999footer @@ -0,0 +1,3 @@ +//999footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ + diff --git a/root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/100KronolithConfPHP b/root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/100KronolithConfPHP new file mode 100644 index 0000000..b361a3c --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/100KronolithConfPHP @@ -0,0 +1,26 @@ +//100KronolithConfPHP +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Id: 380230c774efc2661b03a58bd71824d28cdc6040 $ +$conf['calendar']['params']['table'] = 'kronolith_events'; +$conf['calendar']['params']['driverconfig'] = 'horde'; +$conf['calendar']['params']['utc'] = true; +$conf['calendar']['driver'] = 'sql'; +$conf['storage']['default_domain'] = '{$DomainName}'; +$conf['storage']['params']['table'] = 'kronolith_storage'; +$conf['storage']['params']['driverconfig'] = 'horde'; +$conf['storage']['driver'] = 'sql'; +$conf['calendars']['driver'] = 'default'; +$conf['resource']['params']['table'] = 'kronolith_resources'; +$conf['resource']['params']['driverconfig'] = 'horde'; +$conf['resource']['params']['utc'] = true; +$conf['resource']['driver'] = 'sql'; +$conf['reminder']['server_name'] = 'www.{$DomainName}'; +$conf['reminder']['from_addr'] = 'reminders@{$DomainName}'; +$conf['autoshare']['shareperms'] = 'read'; +$conf['share']['notify'] = true; +$conf['holidays']['enable'] = true; +$conf['menu']['import_export'] = true; +$conf['maps']['providers'] = array('Google'); +$conf['maps']['geocoder'] = 'Google'; +$conf['maps']['geodriver'] = false; +$conf['maps']['driver'] = 'Horde'; diff --git a/root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/999footer new file mode 100644 index 0000000..f1e926b --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/kronolith/config/conf.php/999footer @@ -0,0 +1,3 @@ +// 999footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ + diff --git a/root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/100MnemoConfPHP b/root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/100MnemoConfPHP new file mode 100644 index 0000000..97647b4 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/100MnemoConfPHP @@ -0,0 +1,8 @@ +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Id: d97e56b407852ff0a86c7d88c9a57c8f3089e82f $ +$conf['storage']['params']['table'] = 'mnemo_memos'; +$conf['storage']['params']['driverconfig'] = 'horde'; +$conf['storage']['driver'] = 'sql'; +$conf['notepads']['driver'] = 'default'; +$conf['menu']['import_export'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/999footer new file mode 100644 index 0000000..f1e926b --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/mnemo/config/conf.php/999footer @@ -0,0 +1,3 @@ +// 999footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ + diff --git a/root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/100NagConfPHP b/root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/100NagConfPHP new file mode 100644 index 0000000..79cd353 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/100NagConfPHP @@ -0,0 +1,8 @@ +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Id: 7a2eb8e9002cee73d99d618dfb6509a56ab639ec $ +$conf['storage']['params']['table'] = 'nag_tasks'; +$conf['storage']['params']['driverconfig'] = 'horde'; +$conf['storage']['driver'] = 'sql'; +$conf['tasklists']['driver'] = 'default'; +$conf['menu']['import_export'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/999footer new file mode 100644 index 0000000..f1e926b --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/nag/config/conf.php/999footer @@ -0,0 +1,3 @@ +// 999footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ + diff --git a/root/etc/e-smith/templates/usr/share/horde/smeserver/mysql_set_horde_password.sql b/root/etc/e-smith/templates/usr/share/horde/smeserver/mysql_set_horde_password.sql new file mode 100644 index 0000000..145a237 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/smeserver/mysql_set_horde_password.sql @@ -0,0 +1,11 @@ +CONNECT mysql; + +REPLACE INTO user (host, user, password) + VALUES ( + 'localhost', + 'horde', + password('{$horde{DbPassword}}') + ); + +FLUSH PRIVILEGES; + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/05TurbaAttributes b/root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/05TurbaAttributes new file mode 100644 index 0000000..2e8f7bc --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/05TurbaAttributes @@ -0,0 +1,19 @@ +$attributes['fax'] = array( + 'label' => _("Work Fax"), + 'type' => 'phone', + 'required' => false, + 'params' => array('size' => 15) +); +$attributes['homePhone2'] = array( + 'label' => _("Alt Home Phone"), + 'type' => 'phone', + 'required' => false, + 'params' => array('size' => 15) +); +$attributes['workPhone2'] = array( + 'label' => _("Alt Work Phone"), + 'type' => 'phone', + 'required' => false, + 'params' => array('size' => 15) +); + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/100SMEAttributes b/root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/100SMEAttributes new file mode 100644 index 0000000..2fd7a4b --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/attributes.local.php/100SMEAttributes @@ -0,0 +1,27 @@ +//100SMEAttributes +/* SME Server attributes */ +$attributes['displayName'] = array( + 'label' => _("Display Name"), + 'type' => 'text', + 'required' => false +); +$attributes['groupdescription'] = array( + 'label' => _("Group Description"), + 'type' => 'text', + 'required' => false +); +$attributes['groupmembers'] = array( + 'label' => _("Group Members"), + 'type' => 'text', + 'required' => false +); + +//Turba override allow multiple email addresses per contact +/* Communication. */ +$attributes['emails'] = array( + 'label' => _("Email Address"), + 'type' => 'email', + 'required' => false, + 'params' => array('allow_multi' => true, 'strip_domain' => false, 'link_compose' => true, 'link_name' => null, 'delimiters' => ',', 'size' => null) +); + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/00begin b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/00begin new file mode 100644 index 0000000..2685a72 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/00begin @@ -0,0 +1,6 @@ +{ + + use esmith::util; + $basedn = esmith::util::ldapBase ($DomainName); + $OUT = ''; +} diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/40LocalSQL b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/40LocalSQL new file mode 100644 index 0000000..a5a82f8 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/40LocalSQL @@ -0,0 +1,36 @@ +//40LocalSQL +{ + my $sab = ($horde{SharedAddressBooks} || 'enabled') eq 'disabled' ? 'false' : 'true'; + $OUT = "\$cfgSources['localsql']['use_shares'] = $sab;" +} + +$cfgSources['localsql']['map']['children'] = 'object_children'; +$cfgSources['localsql']['map']['emails'] = 'object_email'; +$cfgSources['localsql']['map']['homeEmail'] = 'object_homeemail'; +$cfgSources['localsql']['map']['workEmail'] = 'object_workemail'; + +$cfgSources['localsql']['tabs'] = array( + _("Personal") => array('firstname', 'lastname', 'middlenames', + 'namePrefix', 'nameSuffix', 'name', 'alias', + 'birthday', 'spouse', 'anniversary', 'children', + 'yomifirstname', 'yomilastname', 'photo'), + _("Location") => array('homeStreet', 'homePOBox', 'homeCity', + 'homeProvince', 'homePostalCode', 'homeCountry', + 'homeAddress', 'workStreet', 'workPOBox', + 'workCity', 'workProvince', 'workPostalCode', + 'workCountry', 'workAddress', 'otherStreet', + 'otherPOBox', 'otherCity', 'otherProvince', + 'otherPostalCode', 'otherCountry', + 'otherAddress','timezone'), + _("Communications") => array('emails', 'homeEmail', 'workEmail', + 'homePhone', 'homePhone2', + 'workPhone', 'workPhone2', 'carPhone', + 'radioPhone', 'companyPhone', + 'assistPhone', 'homeFax', + 'cellPhone', 'fax', 'pager', 'imaddress', + 'imaddress2', 'imaddress3'), + _("Organization") => array('title', 'role', 'company', 'department', 'logo', 'assistant', 'manager'), + _("Other") => array('notes', 'website', 'freebusyUrl', + 'pgpPublicKey', 'smimePublicKey'), +); + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/50LocalLDAP b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/50LocalLDAP new file mode 100644 index 0000000..63037d2 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/50LocalLDAP @@ -0,0 +1,137 @@ +//50LocalLDAP +/** + * A local address book in an LDAP directory. This implements a public + * (shared) address book. + * + * To store distribution lists in the LDAP directory, you'll need to include + * horde.schema from Horde in your LDAP configuration. + * + * To store freebusy information in the LDAP directory, you'll need to include + * rfc2739.schema from Horde in your LDAP configuration. + */ +$cfgSources['localldap'] = array( + // Disabled by default + 'disabled' => false, + 'title' => _("Local LDAP Users Address Book"), + 'type' => 'ldap', + 'params' => array( + 'server' => 'localhost', + 'port' => 389, + 'tls' => false, +{ + $OUT .= qq( 'root' => '$basedn',); +} +// 'bind_dn' => 'cn=admin,ou=users,dc=example,dc=com', +// // For Active Directory: +// // 'bind_dn' => 'username@example.com', +// 'bind_password' => '********', + 'sizelimit' => 200, +// // For Active Directory: +// // 'sizelimit' => 0, + 'dn' => array('cn'), + 'objectclass' => array('top', + 'person', + 'organizationalPerson', +{ + if (($horde{freebusy} || "disabled") eq "enabled") { + $OUT =< array('organizationalPerson', + // 'user', + // 'group', + // 'contact'), + 'scope' => 'sub', + // For Active Directory: + // 'scope' => 'sub', + 'charset' => 'UTF-8', + // Consult the LDAP schema to verify that all required attributes for + // an entry are set and add them if needed. + 'checkrequired' => false, + // Value used to fill in missing required attributes. + 'checkrequired_string' => ' ', + // Check LDAP schema for valid syntax. If this is false an address + // field is assumed to have postalAddress syntax; otherwise the schema + // is consulted for the syntax to use. + 'checksyntax' => false, + 'version' => 3, + 'filter' => '&(objectClass=inetOrgPerson)(!(mail=admin@{$DomainName}))', + + // For Active Directory you probably want to also set the following + // parameters: + // 'deref' => LDAP_DEREF_ALWAYS, + // 'filter' => '&(SAMAccountName=*)(mail=*)', + // 'referrals' => 0, + ), + 'map' => array( + '__key' => 'dn', + + // Remove this mapping if using Active Directory server: + '__uid' => 'uid', + + // From horde.schema. Make sure you have 'turbaContact' objectClass + // included above: + '__type' => 'turbaType', + '__members' => 'turbaMembers', + + 'name' => 'cn', + 'email' => 'mail', + 'homePhone' => 'homephone', + 'workPhone' => 'telephonenumber', + 'cellPhone' => 'mobiletelephonenumber', +// 'homeAddress' => 'street', <-- this is what was used for sme7 before horde 4 + 'homeAddress' => 'homepostaladdress', + + // From rfc2739.schema: +{ + if (($horde{freebusy} || "disabled") eq "enabled") { + $OUT =< 'calFBURL', +HERE +} else { + $OUT =< 'displayname', + // 'title' => 'title', + // 'cellPhone' => 'mobile', + // 'department' => 'department', + // 'company' => 'company', + ), + 'search' => array( + 'name', + 'email', + 'homePhone', + 'workPhone', + 'cellPhone', + 'homeAddress' + ), + 'strict' => array( + 'dn', + ), + 'approximate' => array( + 'cn', + ), +// // For Active Directory servers: +// // 'approximate' => array( +// // 'displayname', +// // 'samaccountname', +// // ), + 'export' => true, + 'browse' => true, +); + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/60LocalLDAPGroups b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/60LocalLDAPGroups new file mode 100644 index 0000000..de04e64 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/60LocalLDAPGroups @@ -0,0 +1,55 @@ +//60LocalLDAPGroups +/** + * A local address book in an LDAP directory. This implements a public + * (shared) address book. + * + * To store distribution lists in the LDAP directory, you'll need to include + * horde/scripts/ldap/horde.schema in your LDAP configuration. + * + * To store freebusy information in the LDAP directory, you'll need to include + * turba/scripts/ldap/rfc2739.schema in your LDAP configuration. + */ +$cfgSources['localldapgroups'] = array( + 'disabled' => false, + 'title' => _("Local LDAP Groups Address Book"), + 'type' => 'ldap', + 'params' => array( + 'server' => 'localhost', + 'port' => 389, + 'tls' => false, +{ + $OUT .= qq( 'root' => '$basedn',); +} + 'sizelimit' => 200, + 'dn' => array('cn'), + 'objectclass' => array('posixGroup'), + 'scope' => 'sub', + 'charset' => 'UTF-8', + 'checkrequired' => false, + 'checkrequired_string' => ' ', + 'version' => 3, + ), + 'map' => array( + '__key' => 'dn', + '__uid' => 'uid', + 'name' => 'cn', + 'email' => 'mail', + 'groupdescription' => 'description', + 'groupmembers' => 'memberUid', + ), + 'search' => array( + 'name', + 'email', + 'groupdescription', + 'groupmembers', + ), + 'strict' => array( + 'dn', + ), + 'approximate' => array( + 'cn', + ), + 'export' => true, + 'browse' => true, +); + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/90Favourites b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/90Favourites new file mode 100644 index 0000000..67f9081 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/backends.local.php/90Favourites @@ -0,0 +1,3 @@ +//90 Favourites +$cfgSources['favourites']['disabled'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/100TurbaConfPHP b/root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/100TurbaConfPHP new file mode 100644 index 0000000..8efb2f1 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/100TurbaConfPHP @@ -0,0 +1,10 @@ +// 100TurbaConfPHP +/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ +// $Id: 4cd616848fb2e5c81200bf7c65930e9086ec2dcd $ +$conf['menu']['import_export'] = true; +$conf['gal']['addressbook'] = 'localldap'; +$conf['shares']['source'] = 'localsql'; +$conf['comments']['allow'] = true; +$conf['documents']['type'] = 'horde'; +$conf['tags']['enabled'] = true; + diff --git a/root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/999footer b/root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/999footer new file mode 100644 index 0000000..ab8f810 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/horde/turba/config/conf.php/999footer @@ -0,0 +1,2 @@ +// 999Footer +/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */ \ No newline at end of file diff --git a/root/usr/share/horde/smeserver/horde_mysql_create_db.sql b/root/usr/share/horde/smeserver/horde_mysql_create_db.sql new file mode 100644 index 0000000..f748de1 --- /dev/null +++ b/root/usr/share/horde/smeserver/horde_mysql_create_db.sql @@ -0,0 +1,2 @@ +CREATE DATABASE IF NOT EXISTS horde; + diff --git a/root/usr/share/horde/smeserver/ingo-convert-datatree-shares-to-sql b/root/usr/share/horde/smeserver/ingo-convert-datatree-shares-to-sql new file mode 100644 index 0000000..30983ac --- /dev/null +++ b/root/usr/share/horde/smeserver/ingo-convert-datatree-shares-to-sql @@ -0,0 +1,150 @@ +#!/usr/bin/env php +get('horde_dir', null, 'pear.horde.org') . '/ingo/lib/Application.php'; +} +Horde_Registry::appInit('ingo', array('cli' => true)); + +$db = $injector->getInstance('Horde_Db_Adapter'); + +$error_cnt = 0; +$delete_dt_data = true; + +/* Get the share entries */ +$shares_result = $db->selectAssoc('SELECT datatree_id, datatree_name FROM horde_datatree WHERE group_uid = ' . $db->quoteString('horde.shares.ingo')); + +$query = 'SELECT attribute_name, attribute_key, attribute_value FROM horde_datatree_attributes WHERE datatree_id = ?'; +foreach ($shares_result as $share_id => $share_name) { + /* Build an array to hold the new row data */ + $nextId = null; + $data = array('share_name' => $share_name); + $rows = $db->selectAll($query, array($share_id)); + $users = array(); + $groups = array(); + + foreach ($rows as $row) { + if ($row['attribute_name'] == 'perm_groups') { + /* Group table entry */ + $groups[] = array('group_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } elseif ($row['attribute_name'] == 'perm_users') { + /* User table entry */ + $users[] = array('user_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } else { + /* Everything else goes in the main share table */ + switch ($row['attribute_name']) { + case 'perm_creator': + case 'perm_default': + case 'perm_guest': + $data[$row['attribute_name']] = $row['attribute_value']; + break; + + case 'owner': + $data['share_owner'] = $row['attribute_value']; + break; + + case 'name': + // Note the key to the $data array is not related to + // the attribute_name field in the dt_attributes table. + $data['attribute_name'] = $row['attribute_value']; + break; + + case 'desc': + $data['attribute_desc'] = $row['attribute_value']; + break; + } + } + } + + /* Set flags */ + $data['share_flags'] = 0; + if (count($users)) { + $data['share_flags'] |= 1; + } + if (count($groups)) { + $data['share_flags'] |= 2; + } + + /* Insert the new data */ + $cli->message('Migrating share data for share_id: ' . $share_id, 'cli.message'); + $error = false; + $db->beginDbTransaction(); + try { + $nextId = insertData('ingo_shares', $data, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + if (count($groups)) { + foreach ($groups as $group) { + $group['share_id'] = $nextId; + try { + insertData('ingo_shares_groups', $group, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + if (count($users)) { + foreach ($users as $user) { + $user['share_id'] = $nextId; + try { + insertData('ingo_shares_users', $user, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + + /* Delete the datatree data, but ONLY if it was requested */ + if ($delete_dt_data && !$error) { + $cli->message('DELETING datatree data for share_id: ' . $share_id, 'cli.message'); + try { + $db->delete('DELETE FROM horde_datatree_attributes WHERE datatree_id = ?', array($share_id)); + $db->delete('DELETE FROM horde_datatree WHERE datatree_id = ?', array($share_id)); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + + /* Cleanup */ + unset($row, $rows, $data, $groups, $users); + if ($error) { + $db->rollbackDbTransaction(); + $cli->message('Rollback for share data for share_id: ' . $share_id, 'cli.message'); + ++$error_cnt; + } else { + $db->commitDbTransaction(); + $cli->message('Commit for share data for share_id: ' . $share_id, 'cli.message'); + } +} +if ($error_cnt) { + $cli->message(sprintf("Encountered %u errors.", $error_cnt)); +} +echo "\nDone.\n"; + +/** + * Helper function + */ +function insertData($table, $data, $db) +{ + $fields = array_keys($data); + $values = array_values($data); + $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . str_repeat('?, ', count($values) - 1); + return $db->insert($sql, $values); +} + diff --git a/root/usr/share/horde/smeserver/kronolith-convert-datatree-shares-to-sql b/root/usr/share/horde/smeserver/kronolith-convert-datatree-shares-to-sql new file mode 100644 index 0000000..7d19076 --- /dev/null +++ b/root/usr/share/horde/smeserver/kronolith-convert-datatree-shares-to-sql @@ -0,0 +1,163 @@ +#!/usr/bin/env php +get('horde_dir', null, 'pear.horde.org') . '/kronolith/'; +} +require_once $baseDir . 'lib/Application.php'; +Horde_Registry::appInit('kronolith', array('cli' => true)); + +$db = $injector->getInstance('Horde_Db_Adapter'); +$error_cnt = 0; +$delete_dt_data = true; + +/** + *** Remarked by John H. Bennett III for automated SME Server install + $delete_dt_data = false; + $answer = $cli->prompt('Do you want to keep your old datatree data or delete it?', array('Keep', 'Delete')); + if ($answer == 1) { + $delete_dt_data = true; + } + $answer = $cli->prompt(sprintf("Data will be copied into the new tables, and %s be deleted from the datatree.\n Is this what you want?", (($delete_dt_data) ? 'WILL' : 'WILL NOT')), array('y' => 'Yes', 'n' => 'No')); + if ($answer != 'y') { + exit; + } + *** End of remark + */ + +/* Get the share entries */ +try { + $shares_result = $db->selectAssoc('SELECT datatree_id, datatree_name FROM horde_datatree WHERE group_uid = ' . $db->quoteString('horde.shares.kronolith')); +} catch (Horde_Db_Exception $e) { + die($e->getMessage()); +} + +$query = 'SELECT attribute_name, attribute_key, attribute_value FROM horde_datatree_attributes WHERE datatree_id = ?'; +foreach ($shares_result as $share_id => $share_name) { + $data = array('share_name' => $share_name); + $rows = $db->selectAll($query, array($share_id)); + $users = array(); + $groups = array(); + foreach ($rows as $row) { + if ($row['attribute_name'] == 'perm_groups') { + /* Group table entry */ + $groups[] = array('group_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } elseif ($row['attribute_name'] == 'perm_users') { + /* User table entry */ + $users[] = array('user_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } else { + /* Everything else goes in the main share table */ + switch ($row['attribute_name']) { + case 'perm_creator': + case 'perm_default': + case 'perm_guest': + $data[$row['attribute_name']] = $row['attribute_value']; + break; + + case 'owner': + $data['share_owner'] = $row['attribute_value']; + break; + + case 'name': + // Note the key to the $data array is not related to + // the attribute_name field in the dt_attributes table. + $data['attribute_name'] = $row['attribute_value']; + break; + + case 'desc': + $data['attribute_desc'] = $row['attribute_value']; + break; + } + } + } + + /* Set flags */ + $data['share_flags'] = 0; + if (count($users)) { + $data['share_flags'] |= 1; + } + if (count($groups)) { + $data['share_flags'] |= 2; + } + + /* Insert the new data */ + $cli->message('Migrating share data for share_id: ' . $share_id, 'cli.message'); + $error = false; + $db->beginDbTransaction(); + try { + $newId = insertData('kronolith_shares', $data, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error=true; + } + if (count($groups)) { + foreach ($groups as $group) { + try { + $group['share_id'] = $newId; + insertData('kronolith_shares_groups', $group, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + if (count($users)) { + foreach ($users as $user) { + try { + $user['share_id'] = $newId; + insertData('kronolith_shares_users', $user, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + + /* Delete the datatree data, but ONLY if it was requested */ + if ($delete_dt_data && !$error) { + $cli->message('DELETING datatree data for share_id: ' . $share_id, 'cli.message'); + try { + $db->delete('DELETE FROM horde_datatree_attributes WHERE datatree_id = ?', array($share_id)); + $db->delete('DELETE FROM horde_datatree WHERE datatree_id = ?', array($share_id)); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + + /* Cleanup */ + unset($row, $rows, $data, $groups, $users); + if ($error) { + $db->rollbackDbTransaction(); + $cli->message('Rollback for share data for share_id: ' . $share_id, 'cli.message'); + ++$error_cnt; + } else { + $db->commitDbTransaction(); + $cli->message('Commit for share data for share_id: ' . $share_id, 'cli.message'); + } +} + +if ($error_cnt) { + $cli->message(sprintf("Encountered %u errors.", $error_cnt)); +} +echo "\nDone.\n"; + +/** + * Helper function + */ +function insertData($table, $data, $db) +{ + $fields = array_keys($data); + $values = array_values($data); + $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . str_repeat('?, ', count($values) - 1) . '?)'; + return $db->insert($sql, $values); +} diff --git a/root/usr/share/horde/smeserver/mnemo-convert-datatree-shares-to-sql b/root/usr/share/horde/smeserver/mnemo-convert-datatree-shares-to-sql new file mode 100644 index 0000000..56a138f --- /dev/null +++ b/root/usr/share/horde/smeserver/mnemo-convert-datatree-shares-to-sql @@ -0,0 +1,166 @@ +#!/usr/bin/env php +get('horde_dir', null, 'pear.horde.org') . '/mnemo/'; +} +require_once $baseDir . 'lib/Application.php'; +Horde_Registry::appInit('mnemo', array('cli' => true)); + +$db = $injector->getInstance('Horde_Db_Adapter'); + +$error_cnt = 0; +$delete_dt_data = true; + +/** + *** Remarked by John H. Bennett III for automated SME Server install + $delete_dt_data = false; + $answer = $cli->prompt('Do you want to keep your old datatree data or delete it?', array('Keep', 'Delete')); + if ($answer == 1) { + $delete_dt_data = true; + } + $answer = $cli->prompt(sprintf("Data will be copied into the new tables, and %s be deleted from the datatree.\n Is this what you want?", (($delete_dt_data) ? 'WILL' : 'WILL NOT')), array('y' => 'Yes', 'n' => 'No')); + if ($answer != 'y') { + exit; + } + *** End of remark + */ + +/* Get the share entries */ +try { + $shares_result = $db->selectAssoc('SELECT datatree_id, datatree_name FROM horde_datatree WHERE group_uid = ' . $db->quoteString('horde.shares.mnemo')); +} catch (Horde_Db_Exception $e) { + die($e->getMessage()); +} + +$query = 'SELECT attribute_name, attribute_key, attribute_value FROM horde_datatree_attributes WHERE datatree_id = ?'; +foreach ($shares_result as $share_id => $share_name) { + $data = array('share_name' => $share_name); + $rows = $db->selectAll($query, array($share_id)); + $users = array(); + $groups = array(); + + foreach ($rows as $row) { + if ($row['attribute_name'] == 'perm_groups') { + /* Group table entry */ + $groups[] = array('group_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } elseif ($row['attribute_name'] == 'perm_users') { + /* User table entry */ + $users[] = array('user_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } else { + /* Everything else goes in the main share table */ + switch ($row['attribute_name']) { + case 'perm_creator': + case 'perm_default': + case 'perm_guest': + $data[$row['attribute_name']] = $row['attribute_value']; + break; + + case 'owner': + $data['share_owner'] = $row['attribute_value']; + break; + + case 'name': + // Note the key to the $data array is not related to + // the attribute_name field in the dt_attributes table. + $data['attribute_name'] = $row['attribute_value']; + break; + + case 'desc': + $data['attribute_desc'] = $row['attribute_value']; + break; + } + } + } + + /* Set flags */ + $data['share_flags'] = 0; + if (count($users)) { + $data['share_flags'] |= 1; + } + if (count($groups)) { + $data['share_flags'] |= 2; + } + + /* Insert the new data */ + $cli->message('Migrating share data for share_id: ' . $share_id, 'cli.message'); + $error = false; + $db->beginDbTransaction(); + try { + $nextId = insertData('mnemo_shares', $data, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + if (count($groups)) { + foreach ($groups as $group) { + $group['share_id'] = $nextId; + try { + insertData('mnemo_shares_groups', $group, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + if (count($users)) { + foreach ($users as $user) { + $user['share_id'] = $nextId; + try { + insertData('mnemo_shares_users', $user, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + + /* Delete the datatree data, but ONLY if it was requested */ + if ($delete_dt_data && !$error) { + $cli->message('DELETING datatree data for share_id: ' . $share_id, 'cli.message'); + try { + $db->delete('DELETE FROM horde_datatree_attributes WHERE datatree_id = ?',array($share_id)); + $db->delete('DELETE FROM horde_datatree WHERE datatree_id = ?', array($share_id)); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + + /* Cleanup */ + unset($row, $rows, $data, $groups, $users); + if ($error) { + $db->rollbackDbTransaction(); + $cli->message('Rollback for share data for share_id: ' . $share_id, 'cli.message'); + ++$error_cnt; + } else { + $db->commitDbTransaction(); + $cli->message('Commit for share data for share_id: ' . $share_id, 'cli.message'); + } +} +if ($error_cnt) { + $cli->message(sprintf("Encountered %u errors.", $error_cnt)); +} +echo "\nDone.\n"; + +/** + * Helper function + */ +function insertData($table, $data, $db) +{ + $fields = array_keys($data); + $values = array_values($data); + $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . str_repeat('?, ', count($values) - 1) . '?)'; + return $db->insert($sql, $values); +} diff --git a/root/usr/share/horde/smeserver/mysql_migrate_horde.sql b/root/usr/share/horde/smeserver/mysql_migrate_horde.sql new file mode 100644 index 0000000..9968f00 --- /dev/null +++ b/root/usr/share/horde/smeserver/mysql_migrate_horde.sql @@ -0,0 +1,6 @@ +CONNECT mysql; + +DELETE FROM user WHERE user = 'horde' and host = '%'; +DELETE FROM tables_priv WHERE user = 'horde' and host = '%'; + +FLUSH PRIVILEGES; diff --git a/root/usr/share/horde/smeserver/mysql_update_horde_privs.sql b/root/usr/share/horde/smeserver/mysql_update_horde_privs.sql new file mode 100644 index 0000000..ccd6a3e --- /dev/null +++ b/root/usr/share/horde/smeserver/mysql_update_horde_privs.sql @@ -0,0 +1,16 @@ +CONNECT mysql; + +REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv, + delete_priv, create_priv, drop_priv, alter_priv, index_priv, + references_priv) + VALUES ( + 'localhost', + 'horde', + 'horde', + 'Y', 'Y', 'Y', 'Y', + 'Y', 'Y', 'Y', 'Y', + 'Y' + ); + +FLUSH PRIVILEGES; + diff --git a/root/usr/share/horde/smeserver/nag-convert-datatree-shares-to-sql b/root/usr/share/horde/smeserver/nag-convert-datatree-shares-to-sql new file mode 100644 index 0000000..5056e5e --- /dev/null +++ b/root/usr/share/horde/smeserver/nag-convert-datatree-shares-to-sql @@ -0,0 +1,169 @@ +#!/usr/bin/env php +get('horde_dir', null, 'pear.horde.org') . '/nag/lib/Application.php'; +} +Horde_Registry::appInit('nag', array('cli' => true)); + +$db = $injector->getInstance('Horde_Db_Adapter'); + +$error_cnt = 0; +$delete_dt_data = true; + +/** + *** Remarked by John H. Bennett III for automated SME Server install + $delete_dt_data = false; + $answer = $cli->prompt('Do you want to keep your old datatree data or delete it?', array('Keep', 'Delete')); + if ($answer == 1) { + $delete_dt_data = true; + } + $answer = $cli->prompt(sprintf("Data will be copied into the new tables, and %s be deleted from the datatree.\n Is this what you want?", (($delete_dt_data) ? 'WILL' : 'WILL NOT')), array('y' => 'Yes', 'n' => 'No')); + if ($answer != 'y') { + exit; + } + *** End of remark + */ + +/* Get the share entries */ +try { + $shares_result = $db->selectAssoc('SELECT datatree_id, datatree_name FROM horde_datatree WHERE group_uid = ' . $db->quoteString('horde.shares.nag')); +} catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + exit; +} +$query = 'SELECT attribute_name, attribute_key, attribute_value FROM horde_datatree_attributes WHERE datatree_id = ?'; +foreach ($shares_result as $share_id => $share_name) { + $data = array('share_name' => $share_name); + try { + $rows = $db->select($query, array($share_id)); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + exit; + } + $users = array(); + $groups = array(); + + foreach ($rows as $row) { + if ($row['attribute_name'] == 'perm_groups') { + /* Group table entry */ + $groups[] = array('group_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } elseif ($row['attribute_name'] == 'perm_users') { + /* User table entry */ + $users[] = array('user_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } else { + /* Everything else goes in the main share table */ + switch ($row['attribute_name']) { + case 'perm_creator': + case 'perm_default': + case 'perm_guest': + $data[$row['attribute_name']] = $row['attribute_value']; + break; + + case 'owner': + $data['share_owner'] = $row['attribute_value']; + break; + + case 'name': + // Note the key to the $data array is not related to + // the attribute_name field in the dt_attributes table. + $data['attribute_name'] = $row['attribute_value']; + break; + + case 'desc': + $data['attribute_desc'] = $row['attribute_value']; + break; + } + } + } + + /* Set flags */ + $data['share_flags'] = 0; + if (count($users)) { + $data['share_flags'] |= 1; + } + if (count($groups)) { + $data['share_flags'] |= 2; + } + + /* Insert the new data */ + $cli->message('Migrating share data for share_id: ' . $share_id, 'cli.message'); + $error = false; + $db->beginDbTransaction(); + try { + $nextId = insertData('nag_shares', $data, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + if (count($groups)) { + foreach ($groups as $group) { + $group['share_id'] = $nextId; + try { + insertData('nag_shares_groups', $group, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + if (count($users)) { + foreach ($users as $user) { + $user['share_id'] = $nextId; + try { + $result = insertData('nag_shares_users', $user, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($result->getMessage(), 'cli.error'); + $error = true; + } + } + } + + /* Delete the datatree data, but ONLY if it was requested */ + if ($delete_dt_data && !$error) { + $cli->message('DELETING datatree data for share_id: ' . $share_id, 'cli.message'); + try { + $db->delete('DELETE FROM horde_datatree_attributes WHERE datatree_id = ?', array($share_id)); + $db->delete('DELETE FROM horde_datatree WHERE datatree_id = ?', array($share_id)); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + + unset($row, $rows, $data, $groups, $users); + if ($error) { + $db->rollbackDbTransaction(); + $cli->message('Rollback for share data for share_id: ' . $share_id, 'cli.message'); + ++$error_cnt; + } else { + $db->commitDbTransaction(); + $cli->message('Commit for share data for share_id: ' . $share_id, 'cli.message'); + } +} +if ($error_cnt) { + $cli->message(sprintf("Encountered %u errors.", $error_cnt)); +} +echo "\nDone.\n"; + +/** + * Helper function + */ +function insertData($table, $data, $db) +{ + $fields = array_keys($data); + $values = array_values($data); + $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . str_repeat('?, ', count($values) - 1) . '?)'; + return $db->insert($sql, $values); +} diff --git a/root/usr/share/horde/smeserver/turba-convert-datatree-shares-to-sql b/root/usr/share/horde/smeserver/turba-convert-datatree-shares-to-sql new file mode 100644 index 0000000..7dd4cff --- /dev/null +++ b/root/usr/share/horde/smeserver/turba-convert-datatree-shares-to-sql @@ -0,0 +1,168 @@ +#!/usr/bin/env php +get('horde_dir', null, 'pear.horde.org') . '/turba/'; +} +require_once $baseDir . 'lib/Application.php'; +Horde_Registry::appInit('turba', array('cli' => true)); + +$db = $injector->getInstance('Horde_Db_Adapter'); + +$error_cnt = 0; +$delete_dt_data = true; + +/** + *** Remarked by John H. Bennett III for automated SME Server install + $delete_dt_data = false; + $answer = $cli->prompt('Do you want to keep your old datatree data or delete it?', array('Keep', 'Delete')); + if ($answer == 1) { + $delete_dt_data = true; + } + $answer = $cli->prompt(sprintf("Data will be copied into the new tables, and %s be deleted from the datatree.\n Is this what you want?", (($delete_dt_data) ? 'WILL' : 'WILL NOT')), array('y' => 'Yes', 'n' => 'No')); + if ($answer != 'y') { + exit; + } + *** End of remark + */ + +/* Get the share entries */ +try { + $shares_result = $db->selectAssoc('SELECT datatree_id, datatree_name FROM horde_datatree WHERE group_uid = ' . $db->quoteString('horde.shares.turba')); +} catch (Horde_Db_Exception $e) { + die($e->getMessage()); +} + +$query = 'SELECT attribute_name, attribute_key, attribute_value FROM horde_datatree_attributes WHERE datatree_id = ?'; +foreach ($shares_result as $share_id => $share_name) { + $data = array('share_name' => $share_name); + $rows = $db->selectAll($query, array($share_id)); + $users = array(); + $groups = array(); + foreach ($rows as $row) { + if ($row['attribute_name'] == 'perm_groups') { + /* Group table entry */ + $groups[] = array('group_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } elseif ($row['attribute_name'] == 'perm_users') { + /* User table entry */ + $users[] = array('user_uid' => $row['attribute_key'], + 'perm' => $row['attribute_value']); + } else { + /* Everything else goes in the main share table */ + switch ($row['attribute_name']) { + case 'perm_creator': + case 'perm_default': + case 'perm_guest': + $data[$row['attribute_name']] = $row['attribute_value']; + break; + + case 'owner': + $data['share_owner'] = $row['attribute_value']; + break; + + case 'name': + // Note the key to the $data array is not related to + // the attribute_name field in the dt_attributes table. + $data['attribute_name'] = $row['attribute_value']; + break; + + case 'desc': + $data['attribute_desc'] = $row['attribute_value']; + break; + + case 'params': + $data['attribute_params'] = $row['attribute_value']; + break; + } + } + } + + /* Set flags */ + $data['share_flags'] = 0; + if (count($users)) { + $data['share_flags'] |= 1; + } + if (count($groups)) { + $data['share_flags'] |= 2; + } + + /* Insert the new data */ + $cli->message('Migrating share data for share_id: ' . $share_id, 'cli.message'); + $error = false; + $db->beginDbTransaction(); + try { + $nextId = insertData('turba_shares', $data, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + if (count($groups)) { + foreach ($groups as $group) { + $group['share_id'] = $nextId; + try { + insertData('turba_shares_groups', $group, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + if (count($users)) { + foreach ($users as $user) { + $user['share_id'] = $nextId; + try { + insertData('turba_shares_users', $user, $db); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + } + + /* Delete the datatree data, but ONLY if it was requested */ + if ($delete_dt_data && !$error) { + $cli->message('DELETING datatree data for share_id: ' . $share_id, 'cli.message'); + try { + $db->delete('DELETE FROM horde_datatree_attributes WHERE datatree_id = ?', array($share_id)); + $db->delete('DELETE FROM horde_datatree WHERE datatree_id = ?', array($share_id)); + } catch (Horde_Db_Exception $e) { + $cli->message($e->getMessage(), 'cli.error'); + $error = true; + } + } + + /* Cleanup */ + unset($row, $rows, $data, $groups, $users); + if ($error) { + $db->rollbackDbTransaction(); + $cli->message('Rollback for share data for share_id: ' . $share_id, 'cli.message'); + ++$error_cnt; + } else { + $db->commitDbTransaction(); + $cli->message('Commit for share data for share_id: ' . $share_id, 'cli.message'); + } +} +if ($error_cnt) { + $cli->message(sprintf("Encountered %u errors.", $error_cnt)); +} +echo "\nDone.\n"; + +/** + * Helper function + */ +function insertData($table, $data, $db) +{ + $fields = array_keys($data); + $values = array_values($data); + $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . str_repeat('?, ', count($values) - 1) . '?)'; + return $db->insert($sql, $values); +} diff --git a/root/usr/share/horde/smeserver/turba_create_objects.pl b/root/usr/share/horde/smeserver/turba_create_objects.pl new file mode 100644 index 0000000..fc70cb4 --- /dev/null +++ b/root/usr/share/horde/smeserver/turba_create_objects.pl @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w +#---------------------------------------------------------------------- +# copyright (C) 2002-2005 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from Mitel Networks +# Please visit our web site www.mitel.com/sme/ for details. +#---------------------------------------------------------------------- + +use strict; +use DBI; +use esmith::ConfigDB; +use esmith::util; + +# Exit early if there is nothing to do +die("horde db must exist") unless ( -d "/var/lib/mysql/horde/"); +die("turba db must exist") unless ( -f "/var/lib/mysql/horde/turba_objects.frm"); + +my $conf = esmith::ConfigDB->open_ro + or die "Can't open configuration database: $!\n"; +our $username = 'root'; +our $password = esmith::util::LdapPassword(); +our $TURBA_DATABASE = 'horde'; +our $dbi_options = {RaiseError => 1, ChopBlanks => 1, AutoCommit => 1}; + +my $db_turbahandle = DBI->connect + ("DBI:mysql:$TURBA_DATABASE", + $username, $password, $dbi_options ) + || die ("Connection error: $DBI::errstr"); + +my $sth = $db_turbahandle->prepare("show columns from turba_objects"); +$sth->execute; +my $turba_objects = $sth->fetchall_hashref('Field'); + + + unless (defined $turba_objects->{object_children}) +{ + my $statement = + "ALTER TABLE turba_objects ADD COLUMN object_children ". + "VARCHAR(255)"; + $statement = $db_turbahandle->prepare($statement) or + die "prepare: $$statement: $DBI::errstr"; + $statement->execute or die "execute: $$statement: $DBI::errstr"; +} diff --git a/root/var/lib/php/horde/opcache/.gitignore b/root/var/lib/php/horde/opcache/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/var/lib/php/horde/session/.gitignore b/root/var/lib/php/horde/session/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/var/lib/php/horde/tmp/.gitignore b/root/var/lib/php/horde/tmp/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/smeserver-horde.spec b/smeserver-horde.spec new file mode 100644 index 0000000..a512ccb --- /dev/null +++ b/smeserver-horde.spec @@ -0,0 +1,211 @@ +# $Id: e-smith-horde.spec,v 1.22 2010/05/11 04:07:35 mrjhb3 Exp $ + +Summary: e-smith specific Horde configuration and templates. +%define name smeserver-horde +Name: %{name} +%define version 1.0.0 +%define release 35 +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: Networking/Daemons +Source: %{name}-%{version}.tar.xz + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArchitectures: noarch +Requires: e-smith-base >= 4.9.44, php-horde-horde >= 5.2, mariadb +Requires: e-smith-apache >= 2.6.0-19 +BuildRequires: e-smith-devtools >= 1.13.1-03 +AutoReqProv: no +Obsoletes: horde-h3, e-smith-horde, imp-h3, e-smith-imp +Obsoletes: ingo-h3, e-smith-ingo, turba-h3, e-smith-turba +Obsoletes: kronolith-h3, smeserver-kronolith, nag-h3, smeserver-nag +Obsoletes: mnemo-h3, smeserver-mnemo +Requires: php-horde-content, php-horde-imp, php-horde-ingo, php-horde-kronolith +Requires: php-horde-mnemo, php-horde-nag, php-horde-turba +# optional functions we provide +Requires: php-horde-Horde-ActiveSync +Requires: php-horde-Horde-Service-Facebook +Requires: php-horde-Horde-Service-Twitter +Requires: php-pear-Date-Holidays-Australia, php-pear-Date-Holidays-Denmark +Requires: php-pear-Date-Holidays-Germany, php-pear-Date-Holidays-Italy +Requires: php-pear-Date-Holidays-Netherlands, php-pear-Date-Holidays-Norway +Requires: php-pear-Date-Holidays-Portugal, php-pear-Date-Holidays-Russia +Requires: php-pear-Date-Holidays-Slovenia, php-pear-Date-Holidays-Sweden +Requires: php-pear-Date-Holidays-France, php-pear-Date-Holidays-Turkey +Requires: php-horde-Horde-Text-Filter-Csstidy +Requires: timeobjects +# maybe not required, but JHB used to have them in previous installs +Requires: php-pear-Auth-SASL2 +Requires: php-pear-Cache-Lite +Requires: php-pear-Console-GetoptPlus +Requires: php-pear-Crypt-Blowfish +Requires: php-pear-File-CSV +Requires: php-pear-File-Util +Requires: php-pear-HTTP +Requires: php-pear-HTTP-Request2 +Requires: php-pear-HTTP_WebDAV_Server +Requires: php-pear-Log +Requires: php-pear-MDB2 +Requires: php-pear-Net-URL2 +Requires: php-pear-XML-Parser2 +Requires: php-pear-XML-RPC2 +Requires: ImageMagick + +%changelog +* Sat Mar 23 2024 cvs2git.sh aka Brian Read 1.0.0-35.sme +- Roll up patches and move to git repo [SME: 12338] + +* Sat Mar 23 2024 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Sun Feb 05 2023 Jean-Philippe Pialasse 1.0.0-34.sme +- use php full path for mysql.init scripts [SME: 12296] + +* Thu May 26 2022 Jean-Philippe Pialasse 1.0.0-33.sme +- fix invalid domain if ForcePrimaryDomain is enabled [SME: 11980] +- fix $ldapServer is commented out if Horde ForcePrimaryDomain is disabled [SME: 11981] + +* Sun Apr 17 2022 Jean-Philippe Pialasse 1.0.0-32.sme +- use httpd 2.4 access control syntax [SME: 11945] + +* Sat Apr 16 2022 Terry Fage 1.0.0-31.sme +- fix previous patch error extra line [SME: 11694] + +* Tue Apr 05 2022 Jean-Philippe Pialasse 1.0.0-30.sme +- fix alarm noise when disabled [SME: 11694] + +* Sun Nov 07 2021 Greg Simpson 1.0.0-29.sme +- Syntax error, unexpected '(T_STRING), expecting ')' [SME: 11738] +- thanks to zsolt vasarhelyi for patch test + +* Sat Sep 18 2021 Terry Fage 1.0.0-28.sme +- Ingo filters TLS error if sieve is enabled [SME: 11628] + +* Wed Mar 24 2021 Jean-Philippe Pialasse 1.0.0-27.sme +- fix missing call to perl module emsith::php [SME: 11489] + +* Tue Mar 16 2021 Jean-Philippe Pialasse 1.0.0-26.sme +- clean rsyslog syntax for horde [SME: 11422] + +* Wed Mar 10 2021 Jean-Philipe Pialasse 1.0.0-25.sme +- improved php basedir, with filtering of noise for gpg [SME: 10945] +- force SSL for horde [SME: 11443] +- fix horde not honoring switch to php-fpm 5.4 [SME: 11433] +- update mail settings for the php-pool [SME: 11431] + +* Sun Feb 21 2021 Jean-Philipe Pialasse 1.0.0-24.sme +- spamd SpamLearning property migrated to spamassassin SpamLearning [SME: 11376] + +* Sat Feb 20 2021 Jean-Philipe Pialasse 1.0.0-23.sme +- Configuration is not up to date, hash to update [SME: 11308] + +* Fri Dec 11 2020 Jean-Philipe Pialasse 1.0.0-22.sme +- fix wrong template path for php55, php56 and php [SME: 11255] + +* Mon Dec 07 2020 Jean-Philipe Pialasse 1.0.0-20.sme +- fix webmail not accessible after enabling from manager [SME: 11233] + +* Tue Nov 17 2020 Jean-Philipe Pialasse 1.0.0-19.sme +- update rsyslog syntax [SME: 11016] + move fragment so syntax is similar to message + +* Sat Jun 27 2020 Jean-Philipe Pialasse 1.0.0-18.sme +- remove harcoded ports [SME: 10969] + +* Tue Jun 23 2020 Jean-Philipe Pialasse 1.0.0-17.sme +- add gpg to php base dir [SME: 10945] + +* Wed May 13 2020 Jean-Philipe Pialasse 1.0.0-16.sme +- workaround logging noise caused by libsasl [SME: 10943] + +* Fri Mar 27 2020 Jean-Philipe Pialasse 1.0.0-15.sme +- log as admin and not admin@domain for cli tasks [SME: 10910] +- fix ingo imap preferences [SME: 10912] + +* Fri Mar 27 2020 Jean-Philipe Pialasse 1.0.0-14.sme +- allow httpd-auth for calendar, tasks access using rpc.php ... [SME: 10908] +- add smeserver-horde-update event [SME: 10909] + +* Fri Mar 27 2020 Jean-Philipe Pialasse 1.0.0-13.sme +- avoid loss of user parameter on Primary Domain change [SME: 1005] + this will also avoid the loss of parameter if we log with a different virtualhost + horde preference is now stored with the SME username without @domain +- fix bad regex to strip domain [SME: 10224] + also we can now force Primary domain to use as default email + we can strip heading string from virtualhost domain to create email + default identity email will update as long as no other identity is created for the user + +* Wed Mar 11 2020 Jean-Philipe Pialasse 1.0.0-12.sme +- fix typo in php-fpm patch [SME: 10872] + +* Tue Mar 10 2020 Jean-Philipe Pialasse 1.0.0-11.sme +- remove php3 references [SME: 10866] +- remove strict and warning alert from error log [SME: 10823] +- dedicated php-fpm pool for horde [SME: 10872] + +* Tue Jan 28 2020 Jean-Philipe Pialasse 1.0.0-8.sme +- apply patches from John H. Bennett III [SME: 10717] +- cvs admin -ko on patch1 + +* Fri Apr 14 2017 Jean-Philipe Pialasse 1.0.0-6.sme +- revert requires php-pear-Math_BigInteger provided by php-phpseclib-math-biginteger [SME: 9600] + +* Wed Apr 12 2017 Jean-Philipe Pialasse 1.0.0-5.sme +- fix incorrect expansion of backends.local.php with non numerical releases [SME: 10092] +- add requires php-pear-Math_BigInteger [SME: 9600] + +* Sun Jul 24 2016 Jean-Philipe Pialasse 1.0.0-4.sme +- added last optionals dependencies [SME: 9645] +- added France Holidays. + +* Wed Jul 06 2016 Jean-Philipe Pialasse 1.0.0-3.sme +- added Requires for pear Dates [SME: 9645] +- Activesync, timeobjects, Facebook. Twitter, Text-Filter + +* Wed Jul 06 2016 Jean-Philipe Pialasse 1.0.0-2.sme +- add main Required packages php-horde-* [SME: 9645] + +* Sun Jun 19 2016 John H. Bennett III 1.0.0-1 +- First released build for SME10 + +%description +This package adds necessary templates and configuration items +for Horde, Imp, Ingo, Kronolith, Mnemo, Nag and Turba +to work on SME Server 10 + +%prep +%setup +mkdir -p root/var/lib/php/horde/session +mkdir -p root/var/lib/php/horde/opcache +mkdir -p root/var/lib/php/horde/tmp + +%build +for i in post-install post-upgrade +do + mkdir -p root/etc/e-smith/events/$i +done +perl createlinks + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --dir /var/lib/php/horde/session 'attr(0770,root,www)' \ + --dir /var/lib/php/horde/tmp 'attr(0770,root,www)' \ + --dir /var/lib/php/horde/opcache 'attr(0770,root,www)' \ +> %{name}-%{version}-filelist +echo "%doc COPYING" >> %{name}-%{version}-filelist + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +%preun +%post + +%postun + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root)