commit deb24f27cb2c4977182bd8d573046de54db196a9 Author: Daniel Berteaud Date: Wed Mar 14 22:25:52 2012 +0100 Initial import diff --git a/createlinks b/createlinks new file mode 100755 index 0000000..a6b6ff1 --- /dev/null +++ b/createlinks @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +use esmith::Build::CreateLinks qw(:all); + +service_link_enhanced("memcached-sogo", "S55", "7"); +service_link_enhanced("sogod", "S85", "7"); + +templates2events("/etc/e-smith/sql/init/30sogo_mysql_create_database", qw(email-update bootstrap-console-save)); +templates2events("/etc/e-smith/sql/init/31sogo_mysql_update_privileges", qw(email-update bootstrap-console-save)); +templates2events("/home/sogo/smeserver/sogo_mysql_update_privileges.sql", qw(email-update bootstrap-console-save)); +templates2events("/etc/cron.d/sogo-alarm", qw(email-update bootstrap-console-save)); +templates2events("/home/sogo/GNUstep/Defaults/.GNUstepDefaults", qw(email-update bootstrap-console-save pre-backup)); +templates2events("/etc/sysconfig/sogo", qw(email-update bootstrap-console-save)); +templates2events("/etc/logrotate.d/sogo", qw(email-update bootstrap-console-save)); + +safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/sogod"); +safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/memcached-sogo"); +safe_symlink("restart", "root/etc/e-smith/events/email-update/services2adjust/mysql.init"); + +event_link("sogo-delete-backup", "pre-backup", "60"); +event_link("sogo-delete-backup", "post-backup", "60"); +event_link("sogo-backup", "pre-backup", "70"); + +panel_link("sogo", "manager"); + +safe_touch("root/var/service/memcached-sogo/down"); +safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/memcached-sogo'); +safe_symlink("/var/service/memcached-sogo" , 'root/service/memcached-sogo'); + diff --git a/ipasserelle-groupware.spec b/ipasserelle-groupware.spec new file mode 100644 index 0000000..5fe9434 --- /dev/null +++ b/ipasserelle-groupware.spec @@ -0,0 +1,145 @@ + +%define version 0.2.0 +%define release 1.beta3 +%define name ipasserelle-groupware + +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Summary: iPasserelle Groupware module +Group: Networking/Daemons +License: GPLv3+ +URL: http://www.ipasserelle.com +Source0: %{name}-%{version}.tar.gz + +BuildArch: noarch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildRequires: e-smith-devtools +Requires: smeserver-release >= 8 +Requires: e-smith-ldap >= 5.2.0-19 +Requires: sogo >= 1.3.9 +Requires: sogo-tool +Requires: sope49-gdl1-mysql +Requires: sogo-ealarms-notify +Requires: ipasserelle-base + +Obsoletes: smeserver-sogo +Provides: smeserver-sogo + +%description +iPasserelle module for the groupware application. +Based on smeserver-sogo from nethesis + + +%changelog +* Wed Mar 14 2012 Daniel Berteaud - 0.2.0-1.sme +- Migrate to git + +* Wed Feb 15 2012 Daniel Berteaud - 0.1-16.sme +- Purge old (default to 24h) sessions from database +- Use a unix socket to connect to memcached + +* Tue Feb 14 2012 Daniel Berteaud - 0.1-15.sme +- Fix sogo-ealarm-notify path in cron job + +* Fri Nov 18 2011 Daniel Berteaud - 0.1-14.sme +- Adjust number of prefork (1 for 15 users, 3 workers minimum) +- Enable sieve if available (smeserver-dovecot is needed for this) +- Change display name of LDAP address books +- Reorder configuration directives +- Split templates in separated files +- Requires sogo-tool +- Remove default forward mechanism as attached (go back to inline) +- Backup with sogo-tool +- Don't force access using $SystemName.$DomainName +- Set default charset to UTF8 +- Remove Priority column + +* Tue Nov 01 2011 Daniel Berteaud - 0.1-13.sme +- Compatibility with SOGo 1.3.9 + +* Fri Oct 07 2011 Daniel Berteaud - 0.1-12.sme +- Also apply the filter to group addressbook + +* Thu Sep 01 2011 Daniel Berteaud - 0.1-11.sme +- Change SOGo spool path to /var/spool/sogo + +* Mon Jun 20 2011 Daniel Berteaud - 0.1-10.sme +- FR locale corrections + +* Thu Jun 09 2011 Daniel B. - 0.1-9.sme +- Access restriction based on group membership +- Small panel to configure SOGo +- Replace SOGo logo with iPasserelle one on the login page + +* Thu Apr 07 2011 Daniel B. - 0.1-8.sme +- Templates /etc/sysconfig/sogo and default prefork to 5 + +* Fri Mar 25 2011 Daniel B. - 0.1-7.sme +- Fix RewriteRules for SSL vhosts + +* Fri Mar 25 2011 Daniel B. - 0.1-6.sme +- RewriteRule to $SystemName.$DomainName + +* Wed Mar 23 2011 Daniel B. - 0.1-5.sme +- Allow custom WebServerRessources folder + +* Wed Mar 16 2011 Daniel B. - 0.1-4.sme +- Rewrite /sogo to /SOGo (using a rewriterule) + +* Wed Mar 16 2011 Daniel B. - 0.1-3.sme +- Fix week number (first week of year) + +* Mon Mar 14 2011 Daniel B. - 0.1-2.sme +- Re-add x-webobjects-server-url (needed for images) + +* Fri Feb 4 2011 Daniel B. - 0.1-1.sme +- Fork from smeserver-sogo-0.5.3 +- Add OCSSessionsFolderURL (compatibility with sogo-1.3.5) +- Add support for Apple CardDav +- Remove sogo-modify event (use email-update instead) +- Don't redirect to https://systemname.domainname/SOGo +- Prop to enable email alarms +- Prop to enable public access +- Prop to enable aux accounts +- Default to check messages every 10 min +- First day of week is monday +- Change default fwd mode to attached + + +%prep +%setup -q + +%build +%{__mkdir_p} root/var/log/memcached-sogo +perl ./createlinks + +%install +rm -rf $RPM_BUILD_ROOT +rm -f %{name}-%{version}-filelist + +(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) + +%{__mkdir_p} $RPM_BUILD_ROOT/home/e-smith/db/sogo + +/sbin/e-smith/genfilelist \ + --dir /home/sogo 'attr(0700,sogo,sogo)' \ + --dir /home/sogo/GNUstep 'attr(0755,sogo,sogo)' \ + --dir /home/sogo/GNUstep/Defaults 'attr(0755,sogo,sogo)' \ + --dir /home/e-smith/db/sogo 'attr(0700, sogo, sogo)' \ + --file /var/service/memcached-sogo/run 'attr(0755, root, root)' \ + --file /var/service/memcached-sogo/log/run 'attr(0755, root, root)' \ + --dir /var/log/memcached-sogo 'attr(0700, sogo, sogo)' \ + --file /etc/cron.hourly/sogo-sessions 'attr(0755, root, root)' \ + $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist + +%files -f %{name}-%{version}-%{release}-filelist + +%clean +rm -rf $RPM_BUILD_ROOT + +%post + +%postun + diff --git a/root/etc/cron.hourly/sogo-sessions b/root/etc/cron.hourly/sogo-sessions new file mode 100644 index 0000000..7c0f46d --- /dev/null +++ b/root/etc/cron.hourly/sogo-sessions @@ -0,0 +1,7 @@ +#!/bin/bash + +TIME=$(/sbin/e-smith/db configuration getprop sogod SessionDuration || echo 1440) +TIME=$(($TIME*60)) + +# Remove old SOGo sessions entries +/usr/bin/mysql sogo -e "delete from sogo_sessions_folder where unix_timestamp(now())-c_lastseen > $TIME;" diff --git a/root/etc/e-smith/db/configuration/defaults/apple-carddav/TCPPort b/root/etc/e-smith/db/configuration/defaults/apple-carddav/TCPPort new file mode 100644 index 0000000..c76f480 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/apple-carddav/TCPPort @@ -0,0 +1 @@ +8843 diff --git a/root/etc/e-smith/db/configuration/defaults/apple-carddav/access b/root/etc/e-smith/db/configuration/defaults/apple-carddav/access new file mode 100644 index 0000000..a48cf0d --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/apple-carddav/access @@ -0,0 +1 @@ +public diff --git a/root/etc/e-smith/db/configuration/defaults/apple-carddav/status b/root/etc/e-smith/db/configuration/defaults/apple-carddav/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/apple-carddav/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/apple-carddav/type b/root/etc/e-smith/db/configuration/defaults/apple-carddav/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/apple-carddav/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/defaults/memcached-sogo/status b/root/etc/e-smith/db/configuration/defaults/memcached-sogo/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/memcached-sogo/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/memcached-sogo/type b/root/etc/e-smith/db/configuration/defaults/memcached-sogo/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/memcached-sogo/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/ACLsSendEMailNotifications b/root/etc/e-smith/db/configuration/defaults/sogod/ACLsSendEMailNotifications new file mode 100644 index 0000000..7ecb56e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/ACLsSendEMailNotifications @@ -0,0 +1 @@ +no diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/AdminUsers b/root/etc/e-smith/db/configuration/defaults/sogod/AdminUsers new file mode 100644 index 0000000..7fbe952 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/AdminUsers @@ -0,0 +1 @@ +admin diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/AuxiliaryUserAccounts b/root/etc/e-smith/db/configuration/defaults/sogod/AuxiliaryUserAccounts new file mode 100644 index 0000000..7ecb56e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/AuxiliaryUserAccounts @@ -0,0 +1 @@ +no diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/DraftsFolder b/root/etc/e-smith/db/configuration/defaults/sogod/DraftsFolder new file mode 100644 index 0000000..2c19063 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/DraftsFolder @@ -0,0 +1 @@ +Drafts diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/EMailAlarms b/root/etc/e-smith/db/configuration/defaults/sogod/EMailAlarms new file mode 100644 index 0000000..7ecb56e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/EMailAlarms @@ -0,0 +1 @@ +no diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/PublicAccess b/root/etc/e-smith/db/configuration/defaults/sogod/PublicAccess new file mode 100644 index 0000000..7ecb56e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/PublicAccess @@ -0,0 +1 @@ +no diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/SentFolder b/root/etc/e-smith/db/configuration/defaults/sogod/SentFolder new file mode 100644 index 0000000..52665cf --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/SentFolder @@ -0,0 +1 @@ +Sent diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/TCPPort b/root/etc/e-smith/db/configuration/defaults/sogod/TCPPort new file mode 100644 index 0000000..b92677e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/TCPPort @@ -0,0 +1 @@ +20000 diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/status b/root/etc/e-smith/db/configuration/defaults/sogod/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/sogod/type b/root/etc/e-smith/db/configuration/defaults/sogod/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/sogod/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/migrate/SOGoPassword b/root/etc/e-smith/db/configuration/migrate/SOGoPassword new file mode 100644 index 0000000..7d0b86e --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/SOGoPassword @@ -0,0 +1,33 @@ +{ + my $sogodrec = $DB->get('sogod') + || $DB->new_record('sogod', {type => 'service'}); + my $sogod_pw = $sogodrec->prop('DbPassword'); + if (not $sogod_pw or length($sogod_pw) < 57) + { + use MIME::Base64 qw(encode_base64); + + $sogod_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 + { + $sogod_pw = encode_base64($buf); + chomp $sogod_pw; + $sogod_pw =~ s/\//\./g; # SOGo hates passwords with slashes + } + close RANDOM; + } + else + { + warn "Could not open /dev/urandom: $!"; + } + $sogodrec->set_prop('DbPassword', $sogod_pw); + } +} diff --git a/root/etc/e-smith/events/actions/sogo-backup b/root/etc/e-smith/events/actions/sogo-backup new file mode 100644 index 0000000..aedf906 --- /dev/null +++ b/root/etc/e-smith/events/actions/sogo-backup @@ -0,0 +1,4 @@ +#!/bin/bash + +su - sogo -c "/usr/sbin/sogo-tool backup /home/e-smith/db/sogo ALL" > /dev/null 2>&1 + diff --git a/root/etc/e-smith/events/actions/sogo-delete-backup b/root/etc/e-smith/events/actions/sogo-delete-backup new file mode 100644 index 0000000..718349d --- /dev/null +++ b/root/etc/e-smith/events/actions/sogo-delete-backup @@ -0,0 +1,4 @@ +#!/bin/sh + +exec /bin/rm -f /home/e-smith/db/sogo/* + diff --git a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo new file mode 100644 index 0000000..8391aa4 --- /dev/null +++ b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo @@ -0,0 +1,62 @@ + + + Groupware + Collecticiel + + + FORM_TITLE + Configuration du collecticiel SOGo + + + STATUS_DESC + Vous pouvez choisir de désactiver entièrement le service + + + STATUS + État + + + SEND_ACL_MAIL_DESC + Lorsqu'un utilisateur donne des droits (sur un agenda ou carnet d'adresse), SOGo peut prévenir automatiquement les personnes concernées que de nouvelles données sont accessibles, en leur envoyant un mail. Voulez-vous activer cette fonction ? + + + SEND_ACL_MAIL + Notification des changements de droit d'accès + + + MAIL_ALARM_DESC + Par défaut, SOGo affiche un pop-up pour vous rappeler vos rendez-vous. Si vous activez cette fonction, les utilisateurs pourront également recevoir un mail de rappel + + + MAIL_ALARM + Rappel par mail + + + AUX_ACCOUNTS_DESC + Si cette fonction est activée, les utilisateurs pourront s'abonner à des comptes IMAP externes. Ils pourront ainsi gérer tous leurs comptes emails depuis l'interface web. Souhaitez-vous activer cette fonction ? + + + AUX_ACCOUNTS + Comptes externes + + + PUBLIC_ACCESS_DESC + Si cette fonction est activée, les utilisateurs pourront partager certaines ressources publiquement (sans aucune authentification). Souhaitez-vous activer cette fonction ? + + + PUBLIC_ACCESS + Accès public + + + ALLOWED_GROUPS_DESC + Vous pouvez restreindre l'accès à SOGo à une liste de groupes. Si au moins un groupe est coché, seuls les membres du/des groupe(s) sélectionnés pourront utiliser SOGo. Si aucun groupe n'est coché, alors tous les utilisateurs pourront l'utiliser + + + ALLOWED_GROUPS + Groupes autorisés + + + ALLOWED_OR_NOT + Autorisé ? + + diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30sogo_mysql_create_database b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30sogo_mysql_create_database new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30sogo_mysql_create_database @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_mysql_update_privileges b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_mysql_update_privileges new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_mysql_update_privileges @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_upgrade b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_upgrade new file mode 100644 index 0000000..6a29f37 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_upgrade @@ -0,0 +1 @@ +PERMS=0540 diff --git a/root/etc/e-smith/templates.metadata/home/sogo/GNUstep/Defaults/.GNUstepDefaults b/root/etc/e-smith/templates.metadata/home/sogo/GNUstep/Defaults/.GNUstepDefaults new file mode 100644 index 0000000..6655fc6 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/home/sogo/GNUstep/Defaults/.GNUstepDefaults @@ -0,0 +1,3 @@ +UID="sogo" +GID="sogo" +PERMS=0600 diff --git a/root/etc/e-smith/templates/etc/cron.d/sogo-alarm/10All b/root/etc/e-smith/templates/etc/cron.d/sogo-alarm/10All new file mode 100644 index 0000000..9f6b57c --- /dev/null +++ b/root/etc/e-smith/templates/etc/cron.d/sogo-alarm/10All @@ -0,0 +1,7 @@ +# SOGo Email Alarms +{ +if (($sogod{'EMailAlarms'} || 'no') =~ m/^no$/i){ + $OUT .= "# Email alarms are disabled\n# "; +} +$OUT .= "* * * * * sogo /usr/sbin/sogo-ealarms-notify\n"; +} diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/30sogo_mysql_create_database b/root/etc/e-smith/templates/etc/e-smith/sql/init/30sogo_mysql_create_database new file mode 100644 index 0000000..f5ef3fb --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/30sogo_mysql_create_database @@ -0,0 +1,3 @@ +#! /bin/sh + +exec mysql < /home/sogo/smeserver/sogo_mysql_create_database.sql diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_mysql_update_privileges b/root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_mysql_update_privileges new file mode 100644 index 0000000..e614329 --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_mysql_update_privileges @@ -0,0 +1,3 @@ +#! /bin/sh + +exec mysql < /home/sogo/smeserver/sogo_mysql_update_privileges.sql diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_upgrade b/root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_upgrade new file mode 100644 index 0000000..643584f --- /dev/null +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_upgrade @@ -0,0 +1,3 @@ +#! /bin/sh + +exec /etc/e-smith/events/actions/sogo_upgrade diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00ListenAppleWorkArround b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00ListenAppleWorkArround new file mode 100644 index 0000000..1f74ac9 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00ListenAppleWorkArround @@ -0,0 +1,15 @@ +{ + +my $applePort = ${'apple-carddav'}{'TCPPort'} || "8843"; +my $sogoStatus = $sogod{'status'} || "enabled"; +my $appleStatus = ${'apple-carddav'}{'status'} || "enabled"; + +if (($sogoStatus eq 'enabled') && ($appleStatus eq 'enabled')){ + $OUT .=<<"EOF"; + +Listen 0.0.0.0:$applePort + +EOF +} + +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80NameVirtualHostsAppleWorkArround b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80NameVirtualHostsAppleWorkArround new file mode 100644 index 0000000..aea9c7a --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80NameVirtualHostsAppleWorkArround @@ -0,0 +1,15 @@ +{ + +my $applePort = ${'apple-carddav'}{'TCPPort'} || "8843"; +my $sogoStatus = $sogod{'status'} || "enabled"; +my $appleStatus = ${'apple-carddav'}{'status'} || "enabled"; + +if (($sogoStatus eq 'enabled') && ($appleStatus eq 'enabled')){ + $OUT .=<<"EOF"; + +NameVirtualHost 0.0.0.0:$applePort + +EOF +} + +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAccess b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAccess new file mode 100644 index 0000000..bd1d8d4 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAccess @@ -0,0 +1,35 @@ +# SOGo Groupware +{ + $sogoStatus = $sogod{'status'} || "disabled"; + $webmailStatus = $imp{'status'} || "disabled"; + $style = $sogod{'WebServerResources'} || '/usr/lib/GNUstep/SOGo/WebServerResources/'; + $style = '/usr/lib/GNUstep/SOGo/WebServerResources/' unless ( -d $style); + $style =~ s#$#/# unless ( $style =~ m#/$# ); + + $OUT = ""; +} + +ProxyPass /SOGo http://127.0.0.1:{$sogod{'TCPPort'}}/SOGo +ProxyPassReverse /SOGo http://127.0.0.1:{$sogod{'TCPPort'}}/SOGo +SetEnvIf Host (.*) REQUEST_HOST=$1 + + order deny,allow + deny from all + allow from all + SSLRequireSSL on + AddDefaultCharset UTF-8 + RequestHeader set "x-webobjects-server-url" "https://%\{REQUEST_HOST\}e/SOGo" + + +Alias /.woa/WebServerResources/ {"$style";} +Alias /SOGo.woa/WebServerResources/ {"$style";} +Alias /SOGo/WebServerResources/ {"$style";} +AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2 + + + AllowOverride None + Options +ExecCGI -Includes + Order allow,deny + Allow from all + + diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAppleWorkArround b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAppleWorkArround new file mode 100644 index 0000000..f85f30a --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAppleWorkArround @@ -0,0 +1,40 @@ +{ + +my $sogoPort = $sogod{'TCPPort'} || "20000"; +my $applePort = ${'apple-carddav'}{'TCPPort'} || "8843"; +my $sogoStatus = $sogod{'status'} || "enabled"; +my $appleStatus = ${'apple-carddav'}{'status'} || "enabled"; + +if (($sogoStatus eq 'enabled') && ($appleStatus eq 'enabled')){ + $OUT .=<<"EOF"; + + + ServerName $SystemName.$DomainName + SSLEngine On + ProxyRequests Off + SetEnv proxy-nokeepalive 1 + ProxyPreserveHost On + ProxyPassInterpolateEnv On + RewriteEngine On + RewriteRule /principals(.*) /\$1 [L,R] + RewriteRule /SOGo/dav(.*) /\$1 [L,R] + ProxyPass / http://127.0.0.1:$sogoPort/SOGo/dav/ interpolate + + + RequestHeader set "x-webobjects-server-port" "$applePort" + RequestHeader set "x-webobjects-server-name" "$SystemName.$DomainName:$applePort" + RequestHeader set "x-webobjects-server-url" "https://$SystemName.$DomainName:$applePort" + RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0" + RequestHeader set "x-webobjects-remote-host" "127.0.0.1" + AddDefaultCharset UTF-8 + Order allow,deny + Allow from all + + + +EOF +} +else{ + $OUT .= ""; +} +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/61SogoSSL b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/61SogoSSL new file mode 100644 index 0000000..be90ed3 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/61SogoSSL @@ -0,0 +1,18 @@ +{ +my $sslport = $modSSL{'TCPPort'} || '443'; +my $webmailstatus = $horde{'status'} || 'disabled'; +my $sogostatus = $sogod{'status'} || 'disabled'; + +$OUT .= " RewriteEngine on\n"; +$OUT .= " RewriteRule ^/sogo(/.*|\$) https://%{HTTP_HOST}/SOGo\$1 \[L,R\]\n"; + +if (($webmailstatus eq 'disabled') and ($sogostatus eq 'enabled')) { + $OUT .= " RewriteRule ^/webmail(.*|\$) https://%{HTTP_HOST}/SOGo\$1\n"; +} + +if ($port ne $sslport){ + ## Redirect Web Address to Secure Address + $OUT .= " RewriteRule ^/SOGo(/.*|\$) https://%{HTTP_HOST}/SOGo\$1 \[L,R\]\n"; +} +} + diff --git a/root/etc/e-smith/templates/etc/logrotate.d/sogo/10default b/root/etc/e-smith/templates/etc/logrotate.d/sogo/10default new file mode 100644 index 0000000..7a7d9fb --- /dev/null +++ b/root/etc/e-smith/templates/etc/logrotate.d/sogo/10default @@ -0,0 +1,8 @@ +/var/log/sogo/*.log \{ + missingok + weekly + rotate 24 + compress + notifempty + copytruncate +\} diff --git a/root/etc/e-smith/templates/etc/sysconfig/sogo/Prefork b/root/etc/e-smith/templates/etc/sysconfig/sogo/Prefork new file mode 100644 index 0000000..a510fb2 --- /dev/null +++ b/root/etc/e-smith/templates/etc/sysconfig/sogo/Prefork @@ -0,0 +1,11 @@ +{ + +use esmith::AccountsDB; +my $a = esmith::AccountsDB->open_ro || die "Couldn't open AccountsDB\n"; +my $users = scalar($a->users()); +my $fork = int($users/15); +$fork = 3 if ($fork < 3); + +$OUT .= "PREFORK=$fork"; + +} diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10start b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10start new file mode 100644 index 0000000..2ffdaf2 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10start @@ -0,0 +1,5 @@ +\{ + NSGlobalDomain = \{ + \}; + sogod = \{ + diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/15mysql b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/15mysql new file mode 100644 index 0000000..1063f56 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/15mysql @@ -0,0 +1,4 @@ + OCSFolderInfoURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_folder_info"; + OCSSessionsFolderURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_sessions_folder"; + OCSEMailAlarmsFolderURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_alarms_folder"; + SOGoProfileURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_user_profile"; diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/16memcached b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/16memcached new file mode 100644 index 0000000..4d7469a --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/16memcached @@ -0,0 +1 @@ + SOGoMemcachedHost = "/var/run/sogo/memcached.sock"; diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/20mail b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/20mail new file mode 100644 index 0000000..8001989 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/20mail @@ -0,0 +1,11 @@ + SOGoMailSpoolPath = "/var/spool/sogo"; + SOGoMailDomain = {$DomainName}; + SOGoMailingMechanism = smtp; + SOGoSMTPServer = localhost; + SOGoIMAPServer = "imap://localhost:{$imap{'TCPPort'} || '143'}"; + SOGoDraftsFolderName = {($sogod{'DraftsFolder'} || "Drafts")}; + SOGoSentFolderName = {($sogod{'SentFolder'} || "Sent")}; + SOGoTrashFolderName = {($sogod{'TrashFolder'} || "Trash")}; + SOGoMailListViewColumnsOrder = ( + Flagged, Attachment, Subject, From, Unread, Date, Size + ); diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/25notifications b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/25notifications new file mode 100644 index 0000000..6f4c0c0 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/25notifications @@ -0,0 +1,6 @@ + SOGoEnableEMailAlarms = {uc($sogod{'EMailAlarms'} || "no")}; + SOGoACLsSendEMailNotifications = {uc($sogod{'ACLsSendEMailNotifications'} || "no")}; + SOGoAppointmentSendEMailNotifications = YES; + SOGoAppointmentSendEMailReceipts = YES; + SOGoFoldersSendEMailNotifications = NO; + diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/30defaultPrefs b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/30defaultPrefs new file mode 100644 index 0000000..5579acf --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/30defaultPrefs @@ -0,0 +1,3 @@ + SOGoMailMessageCheck = "every_10_minutes"; + SOGoFirstDayOfWeek = "1"; + SOGoFirstWeekOfYear = "FirstFullWeek"; diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/35external b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/35external new file mode 100644 index 0000000..8969d6a --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/35external @@ -0,0 +1,2 @@ + SOGoMailAuxiliaryUserAccountsEnabled = {uc($sogod{'AuxiliaryUserAccounts'} || "no")}; + SOGoEnablePublicAccess = {uc($sogod{'PublicAccess'} || "no")}; diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/40sieve b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/40sieve new file mode 100644 index 0000000..e6d1918 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/40sieve @@ -0,0 +1,11 @@ +{ + if (($sieve{'status'} || 'disabled') eq 'enabled'){ + my $sieveport = $sieve{'TCPPort'} || '4190'; + $OUT .=<<"HERE"; + SOGoSieveServer = "sieve://localhost:$sieveport"; + SOGoVacationEnabled = YES; + SOGoForwardEnabled = YES; + SOGoSieveScriptsEnabled = YES; +HERE + } +} diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/45admins b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/45admins new file mode 100644 index 0000000..9b83a6b --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/45admins @@ -0,0 +1,3 @@ + SOGoSuperUsernames = ( + {($sogod{'AdminUsers'} || 'admin')} + ); diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/50timezone b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/50timezone new file mode 100644 index 0000000..f4457df --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/50timezone @@ -0,0 +1 @@ + SOGoTimeZone = {$TimeZone}; diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/55authSource b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/55authSource new file mode 100644 index 0000000..43e1722 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/55authSource @@ -0,0 +1,58 @@ + SOGoUserSources = ( + \{ +{ + # If AllowedGroups prop is set, build a LDAP filter + # based on the posixMemberOf attribute + # (Only available on iPasserelle) + + my @groups = split(/[;,]/, ($sogod{'AllowedGroups'} || '')); + $filter = ''; + if (scalar(@groups) == 1){ + $filter = "(posixMemberOf=$groups[0])"; + } + elsif (scalar(@groups) gt 1){ + $filter = '('; + my $i = 0; + foreach (@groups){ + $i++; + $filter .= "(posixMemberOf=$_)"; + $filter .= ' OR ' if ($i < scalar(@groups)); + } + $filter .= ')'; + } + $OUT .= ($filter eq '') ? '' : ' filter = "' . $filter . '";'; +} + CNFieldName = cn; + IDFieldName = uid; + UIDFieldName = uid; + baseDN = "ou=Users,{ esmith::util::ldapBase($DomainName); }"; + bindFields = uid; + canAuthenticate = YES; + displayName = "{($sogo{'LDAPUserSourceName'} || 'Utilisateurs')}"; + hostname = localhost; + id = users; + isAddressBook = YES; + port = {$ldap{'TCPPort'}}; + type = ldap; + \}, + \{ +{ + # Use the same filter, against the cn attr + $filter =~ s/posixMemberOf=/cn=/g; + $OUT .= ($filter eq '') ? '' : ' filter = "' . $filter . '";'; +} + CNFieldName = cn; + IDFieldName = cn; + UIDFieldName = cn; + baseDN = "ou=Groups,{ esmith::util::ldapBase($DomainName); }"; + bindFields = cn; + canAuthenticate = YES; + displayName = "{($sogo{'LDAPGroupSourceName'} || 'Groupes')}"; + hostname = localhost; + id = groups; + isAddressBook = YES; + port = {$ldap{'TCPPort'}}; + type = ldap; + \} + ); + diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/60various b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/60various new file mode 100644 index 0000000..baaa089 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/60various @@ -0,0 +1,5 @@ + NGUseUTF8AsURLEncoding = YES; + WOMessageUseUTF8 = YES; + WOParsersUseUTF8 = YES; + WOPort = 127.0.0.1:{$sogod{'TCPPort'}}; + WOUseRelativeURLs = YES; diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/99end b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/99end new file mode 100644 index 0000000..0b195f2 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/99end @@ -0,0 +1,2 @@ + \}; +\} diff --git a/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/template-begin b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/template-begin new file mode 100644 index 0000000..d69b983 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/template-begin @@ -0,0 +1,5 @@ +/* +{ + $OUT = Text::Template::_load_text("/etc/e-smith/templates-default/template-begin"); + $OUT =~ s/^#/ * /gm +} */ diff --git a/root/etc/e-smith/templates/home/sogo/smeserver/sogo_mysql_update_privileges.sql b/root/etc/e-smith/templates/home/sogo/smeserver/sogo_mysql_update_privileges.sql new file mode 100644 index 0000000..2510a81 --- /dev/null +++ b/root/etc/e-smith/templates/home/sogo/smeserver/sogo_mysql_update_privileges.sql @@ -0,0 +1,22 @@ +CONNECT mysql; + +REPLACE INTO user (host, user, password) + VALUES ( + 'localhost', + 'sogo', + password('{$sogod{DbPassword}}') + ); + +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', + 'sogo', + 'sogo', + 'Y', 'Y', 'Y', 'Y', + 'Y', 'Y', 'Y', 'Y', + 'Y' + ); + +FLUSH PRIVILEGES; diff --git a/root/etc/e-smith/web/functions/sogo b/root/etc/e-smith/web/functions/sogo new file mode 100644 index 0000000..897a274 --- /dev/null +++ b/root/etc/e-smith/web/functions/sogo @@ -0,0 +1,75 @@ +#!/usr/bin/perl -wT + +# vim: ft=xml ts=4 sw=4 et: +#---------------------------------------------------------------------- +# heading : Collaboration +# description : Groupware +# navigation : 2000 3000 +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- +# copyright (C) 2011 Firewall-Services +# +# 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 +# +#---------------------------------------------------------------------- + +use strict; +use esmith::FormMagick::Panel::sogo; + +my $fm = esmith::FormMagick::Panel::sogo->new(); + +$fm->display(); + +__DATA__ +
+ + + STATUS_DESC + + + + SEND_ACL_MAIL_DESC + + + + MAIL_ALARM_DESC + + + + AUX_ACCOUNTS_DESC + + + + PUBLIC_ACCESS_DESC + + + + ALLOWED_GROUPS_DESC + + + + +
diff --git a/root/home/sogo/GNUstep/Defaults/.GNUstepDefaults b/root/home/sogo/GNUstep/Defaults/.GNUstepDefaults new file mode 100644 index 0000000..134567b --- /dev/null +++ b/root/home/sogo/GNUstep/Defaults/.GNUstepDefaults @@ -0,0 +1,6 @@ +{ + NSGlobalDomain = { + }; + sogod = { + }; +} diff --git a/root/home/sogo/GNUstep/Library/SOGo/Templates/MainUI/SOGoRootPage.wox b/root/home/sogo/GNUstep/Library/SOGo/Templates/MainUI/SOGoRootPage.wox new file mode 100644 index 0000000..7340dd5 --- /dev/null +++ b/root/home/sogo/GNUstep/Library/SOGo/Templates/MainUI/SOGoRootPage.wox @@ -0,0 +1,78 @@ + + + + +
+ +
+
+
+ + + + + + + +
+ + + + + + + + + + +
+

+
+
+
+ diff --git a/root/home/sogo/smeserver/sogo_mysql_create_database.sql b/root/home/sogo/smeserver/sogo_mysql_create_database.sql new file mode 100644 index 0000000..1598846 --- /dev/null +++ b/root/home/sogo/smeserver/sogo_mysql_create_database.sql @@ -0,0 +1,29 @@ +-- SOGo Database Creation + +CREATE DATABASE IF NOT EXISTS `sogo`; + +CONNECT `sogo`; + +CREATE TABLE IF NOT EXISTS `sogo_folder_info` ( + `c_folder_id` bigint(20) unsigned NOT NULL auto_increment, + `c_path` varchar(255) NOT NULL, + `c_path1` varchar(255) NOT NULL, + `c_path2` varchar(255) default NULL, + `c_path3` varchar(255) default NULL, + `c_path4` varchar(255) default NULL, + `c_foldername` varchar(255) NOT NULL, + `c_location` varchar(2048) NOT NULL, + `c_quick_location` varchar(2048) default NULL, + `c_acl_location` varchar(2048) default NULL, + `c_folder_type` varchar(255) NOT NULL, + PRIMARY KEY (`c_path`), + UNIQUE KEY `c_folder_id` (`c_folder_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS `sogo_user_profile` ( + `c_uid` varchar(255) NOT NULL, + `c_defaults` text, + `c_settings` text, + PRIMARY KEY (`c_uid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + diff --git a/root/home/sogo/smeserver/sogo_mysql_update_privileges.sql b/root/home/sogo/smeserver/sogo_mysql_update_privileges.sql new file mode 100644 index 0000000..a62dfad --- /dev/null +++ b/root/home/sogo/smeserver/sogo_mysql_update_privileges.sql @@ -0,0 +1 @@ +-- sogo_mysql_privileges.sql template diff --git a/root/usr/lib/GNUstep/SOGo/WebServerResources/logo_ipasserelle.png b/root/usr/lib/GNUstep/SOGo/WebServerResources/logo_ipasserelle.png new file mode 100644 index 0000000..c75be1f Binary files /dev/null and b/root/usr/lib/GNUstep/SOGo/WebServerResources/logo_ipasserelle.png differ diff --git a/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm b/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm new file mode 100644 index 0000000..a8fe0d5 --- /dev/null +++ b/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm @@ -0,0 +1,122 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 2011 Firewall-Services +# +# 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 +#---------------------------------------------------------------------- +package esmith::FormMagick::Panel::sogo; + +use strict; + +use esmith::FormMagick; +use esmith::AccountsDB; +use esmith::ConfigDB; +use esmith::cgi; +use esmith::util; +use Exporter; +use Carp qw(verbose); + +our @ISA = qw(esmith::FormMagick Exporter); + +our @EXPORT = qw( + get_prop + print_allowed_groups + apply +); + + +our $accountdb = esmith::AccountsDB->open(); +our $configdb = esmith::ConfigDB->open(); + +sub new { + shift; + my $self = esmith::FormMagick->new(); + $self->{calling_package} = (caller)[0]; + bless $self; + return $self; +} + +sub get_prop{ + my ($fm, $prop, $default) = @_; + return $configdb->get_prop("sogod", $prop) || $default; +} + +sub print_allowed_groups { + my ($self) = @_; + my $q = $self->{cgi}; + + my @allowedGroups = split(/[,;]/, (get_prop($self, 'AllowedGroups', ''))); + + if (my @groups = $accountdb->groups()) { + + print "", + $self->localise('ALLOWED_GROUPS'), + "\n"; + + print $q->start_table({-class => "sme-border"}),"\n"; + print $q->Tr( + esmith::cgi::genSmallCell($q, $self->localise('ALLOWED_OR_NOT'),"header"), + esmith::cgi::genSmallCell($q, $self->localise('GROUP'),"header"), + esmith::cgi::genSmallCell($q, $self->localise('DESCRIPTION'),"header") + ); + + foreach my $g (@groups) { + my $groupname = $g->key(); + my $checked; + if (grep { $groupname eq $_ } @allowedGroups) { + $checked = 'checked'; + } else { + $checked = ''; + } + + print $q->Tr( + $q->td( + "" + ), + esmith::cgi::genSmallCell($q, $groupname,"normal"), + esmith::cgi::genSmallCell( $q, $accountdb->get($groupname)->prop("Description"),"normal") + ); + } + + print "\n"; + + } + + return undef; + +} + +sub apply { + my ($self) = @_; + my $q = $self->{cgi}; + + $configdb->set_prop('sogod', 'status', $q->param("status")); + $configdb->set_prop('sogod', 'ACLsSendEMailNotifications', $q->param("aclSendMail")); + $configdb->set_prop('sogod', 'EMailAlarms', $q->param("mailAlarm")); + $configdb->set_prop('sogod', 'AuxiliaryUserAccounts', $q->param("auxAccounts")); + $configdb->set_prop('sogod', 'PublicAccess', $q->param("publicAccess")); + $configdb->set_prop('sogod', 'AllowedGroups', join(',', $q->param("allowedGroups"))); + + unless ( system ("/sbin/e-smith/signal-event", "email-update") == 0 ){ + return $self->error('ERROR_OCCURED', 'FIRST');; + } + + return $self->success('SUCCESS','FIRST'); +} + +1; diff --git a/root/var/service/memcached-sogo/log/run b/root/var/service/memcached-sogo/log/run new file mode 100644 index 0000000..feb0a56 --- /dev/null +++ b/root/var/service/memcached-sogo/log/run @@ -0,0 +1,7 @@ +#!/bin/sh + +exec \ + /usr/local/bin/setuidgid sogo \ + /usr/local/bin/multilog t s5000000 \ + /var/log/memcached-sogo + diff --git a/root/var/service/memcached-sogo/run b/root/var/service/memcached-sogo/run new file mode 100644 index 0000000..1cb1e01 --- /dev/null +++ b/root/var/service/memcached-sogo/run @@ -0,0 +1,5 @@ +#!/bin/sh + +exec 2>&1 + +exec memcached -u sogo -v -s /var/run/sogo/memcached.sock -a 600