Initial import

tags/ipasserelle-groupware-0.2.37-1
Daniel Berteaud 13 years ago
commit deb24f27cb
  1. 29
      createlinks
  2. 145
      ipasserelle-groupware.spec
  3. 7
      root/etc/cron.hourly/sogo-sessions
  4. 1
      root/etc/e-smith/db/configuration/defaults/apple-carddav/TCPPort
  5. 1
      root/etc/e-smith/db/configuration/defaults/apple-carddav/access
  6. 1
      root/etc/e-smith/db/configuration/defaults/apple-carddav/status
  7. 1
      root/etc/e-smith/db/configuration/defaults/apple-carddav/type
  8. 1
      root/etc/e-smith/db/configuration/defaults/memcached-sogo/status
  9. 1
      root/etc/e-smith/db/configuration/defaults/memcached-sogo/type
  10. 1
      root/etc/e-smith/db/configuration/defaults/sogod/ACLsSendEMailNotifications
  11. 1
      root/etc/e-smith/db/configuration/defaults/sogod/AdminUsers
  12. 1
      root/etc/e-smith/db/configuration/defaults/sogod/AuxiliaryUserAccounts
  13. 1
      root/etc/e-smith/db/configuration/defaults/sogod/DraftsFolder
  14. 1
      root/etc/e-smith/db/configuration/defaults/sogod/EMailAlarms
  15. 1
      root/etc/e-smith/db/configuration/defaults/sogod/PublicAccess
  16. 1
      root/etc/e-smith/db/configuration/defaults/sogod/SentFolder
  17. 1
      root/etc/e-smith/db/configuration/defaults/sogod/TCPPort
  18. 1
      root/etc/e-smith/db/configuration/defaults/sogod/status
  19. 1
      root/etc/e-smith/db/configuration/defaults/sogod/type
  20. 33
      root/etc/e-smith/db/configuration/migrate/SOGoPassword
  21. 4
      root/etc/e-smith/events/actions/sogo-backup
  22. 4
      root/etc/e-smith/events/actions/sogo-delete-backup
  23. 62
      root/etc/e-smith/locale/fr/etc/e-smith/web/functions/sogo
  24. 1
      root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30sogo_mysql_create_database
  25. 1
      root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_mysql_update_privileges
  26. 1
      root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/31sogo_upgrade
  27. 3
      root/etc/e-smith/templates.metadata/home/sogo/GNUstep/Defaults/.GNUstepDefaults
  28. 7
      root/etc/e-smith/templates/etc/cron.d/sogo-alarm/10All
  29. 3
      root/etc/e-smith/templates/etc/e-smith/sql/init/30sogo_mysql_create_database
  30. 3
      root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_mysql_update_privileges
  31. 3
      root/etc/e-smith/templates/etc/e-smith/sql/init/31sogo_upgrade
  32. 15
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/35SSL00ListenAppleWorkArround
  33. 15
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80NameVirtualHostsAppleWorkArround
  34. 35
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAccess
  35. 40
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAppleWorkArround
  36. 18
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/61SogoSSL
  37. 8
      root/etc/e-smith/templates/etc/logrotate.d/sogo/10default
  38. 11
      root/etc/e-smith/templates/etc/sysconfig/sogo/Prefork
  39. 5
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10start
  40. 4
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/15mysql
  41. 1
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/16memcached
  42. 11
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/20mail
  43. 6
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/25notifications
  44. 3
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/30defaultPrefs
  45. 2
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/35external
  46. 11
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/40sieve
  47. 3
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/45admins
  48. 1
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/50timezone
  49. 58
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/55authSource
  50. 5
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/60various
  51. 2
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/99end
  52. 5
      root/etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/template-begin
  53. 22
      root/etc/e-smith/templates/home/sogo/smeserver/sogo_mysql_update_privileges.sql
  54. 75
      root/etc/e-smith/web/functions/sogo
  55. 6
      root/home/sogo/GNUstep/Defaults/.GNUstepDefaults
  56. 78
      root/home/sogo/GNUstep/Library/SOGo/Templates/MainUI/SOGoRootPage.wox
  57. 29
      root/home/sogo/smeserver/sogo_mysql_create_database.sql
  58. 1
      root/home/sogo/smeserver/sogo_mysql_update_privileges.sql
  59. BIN
      root/usr/lib/GNUstep/SOGo/WebServerResources/logo_ipasserelle.png
  60. 122
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/sogo.pm
  61. 7
      root/var/service/memcached-sogo/log/run
  62. 5
      root/var/service/memcached-sogo/run

@ -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');

@ -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 <daniel@firewall-services.com> - 0.2.0-1.sme
- Migrate to git
* Wed Feb 15 2012 Daniel Berteaud <daniel@firewall-services.com> - 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 <daniel@firewall-services.com> - 0.1-15.sme
- Fix sogo-ealarm-notify path in cron job
* Fri Nov 18 2011 Daniel Berteaud <daniel@firewall-services.com> - 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 <daniel@firewall-services.com> - 0.1-13.sme
- Compatibility with SOGo 1.3.9
* Fri Oct 07 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.1-12.sme
- Also apply the filter to group addressbook
* Thu Sep 01 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.1-11.sme
- Change SOGo spool path to /var/spool/sogo
* Mon Jun 20 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.1-10.sme
- FR locale corrections
* Thu Jun 09 2011 Daniel B. <daniel@firewall-services.com> - 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. <daniel@firewall-services.com> - 0.1-8.sme
- Templates /etc/sysconfig/sogo and default prefork to 5
* Fri Mar 25 2011 Daniel B. <daniel@firewall-services.com> - 0.1-7.sme
- Fix RewriteRules for SSL vhosts
* Fri Mar 25 2011 Daniel B. <daniel@firewall-services.com> - 0.1-6.sme
- RewriteRule to $SystemName.$DomainName
* Wed Mar 23 2011 Daniel B. <daniel@firewall-services.com> - 0.1-5.sme
- Allow custom WebServerRessources folder
* Wed Mar 16 2011 Daniel B. <daniel@firewall-services.com> - 0.1-4.sme
- Rewrite /sogo to /SOGo (using a rewriterule)
* Wed Mar 16 2011 Daniel B. <daniel@firewall-services.com> - 0.1-3.sme
- Fix week number (first week of year)
* Mon Mar 14 2011 Daniel B. <daniel@firewall-services.com> - 0.1-2.sme
- Re-add x-webobjects-server-url (needed for images)
* Fri Feb 4 2011 Daniel B. <daniel@firewall-services.com> - 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

@ -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;"

@ -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);
}
}

@ -0,0 +1,4 @@
#!/bin/bash
su - sogo -c "/usr/sbin/sogo-tool backup /home/e-smith/db/sogo ALL" > /dev/null 2>&1

@ -0,0 +1,4 @@
#!/bin/sh
exec /bin/rm -f /home/e-smith/db/sogo/*

@ -0,0 +1,62 @@
<lexicon lang="fr">
<entry>
<base>Groupware</base>
<trans>Collecticiel</trans>
</entry>
<entry>
<base>FORM_TITLE</base>
<trans>Configuration du collecticiel SOGo</trans>
</entry>
<entry>
<base>STATUS_DESC</base>
<trans>Vous pouvez choisir de désactiver entièrement le service</trans>
</entry>
<entry>
<base>STATUS</base>
<trans>État</trans>
</entry>
<entry>
<base>SEND_ACL_MAIL_DESC</base>
<trans>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 ?</trans>
</entry>
<entry>
<base>SEND_ACL_MAIL</base>
<trans>Notification des changements de droit d'accès</trans>
</entry>
<entry>
<base>MAIL_ALARM_DESC</base>
<trans>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</trans>
</entry>
<entry>
<base>MAIL_ALARM</base>
<trans>Rappel par mail</trans>
</entry>
<entry>
<base>AUX_ACCOUNTS_DESC</base>
<trans>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 ?</trans>
</entry>
<entry>
<base>AUX_ACCOUNTS</base>
<trans>Comptes externes</trans>
</entry>
<entry>
<base>PUBLIC_ACCESS_DESC</base>
<trans>Si cette fonction est activée, les utilisateurs pourront partager certaines ressources publiquement (sans aucune authentification). Souhaitez-vous activer cette fonction ?</trans>
</entry>
<entry>
<base>PUBLIC_ACCESS</base>
<trans>Accès public</trans>
</entry>
<entry>
<base>ALLOWED_GROUPS_DESC</base>
<trans>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</trans>
</entry>
<entry>
<base>ALLOWED_GROUPS</base>
<trans>Groupes autorisés</trans>
</entry>
<entry>
<base>ALLOWED_OR_NOT</base>
<trans>Autorisé ?</trans>
</entry>
</lexicon>

@ -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";
}

@ -0,0 +1,3 @@
#! /bin/sh
exec mysql < /home/sogo/smeserver/sogo_mysql_create_database.sql

@ -0,0 +1,3 @@
#! /bin/sh
exec mysql < /home/sogo/smeserver/sogo_mysql_update_privileges.sql

@ -0,0 +1,3 @@
#! /bin/sh
exec /etc/e-smith/events/actions/sogo_upgrade

@ -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
}
}

@ -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
}
}

@ -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
<Location /SOGo>
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"
</Location>
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
<Directory {"\"$style\"";}>
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>

@ -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";
<VirtualHost 0.0.0.0:$applePort>
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
<Proxy http://127.0.0.1:$sogoPort>
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
</Proxy>
</VirtualHost>
EOF
}
else{
$OUT .= "";
}
}

@ -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";
}
}

@ -0,0 +1,8 @@
/var/log/sogo/*.log \{
missingok
weekly
rotate 24
compress
notifempty
copytruncate
\}

@ -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";
}

@ -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";

@ -0,0 +1 @@
SOGoMemcachedHost = "/var/run/sogo/memcached.sock";

@ -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
);

@ -0,0 +1,6 @@
SOGoEnableEMailAlarms = {uc($sogod{'EMailAlarms'} || "no")};
SOGoACLsSendEMailNotifications = {uc($sogod{'ACLsSendEMailNotifications'} || "no")};
SOGoAppointmentSendEMailNotifications = YES;
SOGoAppointmentSendEMailReceipts = YES;
SOGoFoldersSendEMailNotifications = NO;

@ -0,0 +1,3 @@
SOGoMailMessageCheck = "every_10_minutes";
SOGoFirstDayOfWeek = "1";
SOGoFirstWeekOfYear = "FirstFullWeek";

@ -0,0 +1,2 @@
SOGoMailAuxiliaryUserAccountsEnabled = {uc($sogod{'AuxiliaryUserAccounts'} || "no")};
SOGoEnablePublicAccess = {uc($sogod{'PublicAccess'} || "no")};

@ -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
}
}

@ -0,0 +1,3 @@
SOGoSuperUsernames = (
{($sogod{'AdminUsers'} || 'admin')}
);

@ -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;
\}
);

@ -0,0 +1,5 @@
NGUseUTF8AsURLEncoding = YES;
WOMessageUseUTF8 = YES;
WOParsersUseUTF8 = YES;
WOPort = 127.0.0.1:{$sogod{'TCPPort'}};
WOUseRelativeURLs = YES;

@ -0,0 +1,5 @@
/*
{
$OUT = Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
$OUT =~ s/^#/ * /gm
} */

@ -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;

@ -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__
<form title="FORM_TITLE" header="/etc/e-smith/web/common/head.tmpl" footer="/etc/e-smith/web/common/foot.tmpl">
<page name="First" pre-event="print_status_message()" post-event="apply()">
<field type="select" id="status" options="'enabled' =>
'ENABLED', 'disabled' => 'DISABLED'"
value="get_prop('status')">
<description>STATUS_DESC</description>
<label>STATUS</label>
</field>
<field type="select" id="aclSendMail" options="'yes' =>
'YES', 'no' => 'NO'"
value="get_prop('ACLsSendEMailNotifications')">
<description>SEND_ACL_MAIL_DESC</description>
<label>SEND_ACL_MAIL</label>
</field>
<field type="select" id="mailAlarm" options="'yes' =>
'YES', 'no' => 'NO'"
value="get_prop('EMailAlarms')">
<description>MAIL_ALARM_DESC</description>
<label>MAIL_ALARM</label>
</field>
<field type="select" id="auxAccounts" options="'yes' =>
'YES', 'no' => 'NO'"
value="get_prop('AuxiliaryUserAccounts')">
<description>AUX_ACCOUNTS_DESC</description>
<label>AUX_ACCOUNTS</label>
</field>
<field type="select" id="publicAccess" options="'yes' =>
'YES', 'no' => 'NO'"
value="get_prop('PublicAccess')">
<description>PUBLIC_ACCESS_DESC</description>
<label>PUBLIC_ACCESS</label>
</field>
<field type="literal" id="allowed_groups_desc"
value="">
<description>ALLOWED_GROUPS_DESC</description>
</field>
<subroutine src="print_allowed_groups()" />
<subroutine src="print_button('SAVE')" />
</page>
</form>

@ -0,0 +1,6 @@
{
NSGlobalDomain = {
};
sogod = {
};
}

@ -0,0 +1,78 @@
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE var:component>
<var:component
className="UIxPageFrame"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label"
const:jsFiles="PasswordPolicy.js"
const:popup="YES"
><var:string var:value="doctype" const:escapeHTML="NO"/>
<div id="aboutBox" style="display:none;">
<div>
<p class="logo"><img const:alt="SOGo" rsrc:src="sogo-logo.png"/></p>
<p>Version <var:string value="version"/> <span class="buildDate">(<var:string value="buildDate" />)</span></p>
<p class="scroll"><var:string label:value="AboutBox" const:escapeHTML="NO"/></p>
<img const:alt="Inverse" rsrc:src="inverse.png"/>
<p class="links"><a href="http://www.sogo.nu/" target="_new">www.sogo.nu</a> /
<a href="http://www.inverse.ca/" target="_new">www.inverse.ca</a></p>
<p><a id="aboutClose" href="#" class="button">
<span><var:string label:value="OK" /></span></a></p>
</div>
</div>
<div id="linkBanner" class="linkbanner">
<a id="about" href="#"><var:string label:value="About" /></a>
</div>
<form id="connectForm" var:href="connectURL">
<div id="loginScreen">
<var:if condition="hasLoginSuffix"><script
type="text/javascript">var loginSuffix = '<var:string value="loginSuffix"/>';</script
></var:if>
<table width="560">
<tr>
<td>
<img const:alt="*" id="splash" rsrc:src="/logo_ipasserelle.png"/>
</td>
<td id="loginCell" width="230">
<label><var:string label:value="Username:"/><br/>
<input class="textField" id="userName" name="userName"
type="text" var:value="cookieUsername" /></label>
<label><var:string label:value="Password:"/><br/>
<input class="textField" id="password"
name="password" type="password" var:value="password" /></label>
<label><var:string label:value="Language:"/><br/>
<var:popup const:id="language" const:name="language"
list="languages"
item="item"
var:selection="item"
var:value="item"
string="languageText"
label:noSelectionString="choose"
/></label>
<var:if condition="hasLoginDomains">
<label><var:string label:value="Domain:"/><br/>
<var:popup const:id="domain" const:name="domain"
list="loginDomains"
item="item"
var:selection="item"
var:value="item"
string="item"
/></label>
</var:if>
<label><input id="rememberLogin" type="checkbox" class="checkBox" var:checked="rememberLogin"/> <var:string label:value="Remember username"/></label>
<label>
<a href="#" class="button" id="submit" name="submit">
<span><var:string label:value="Connect" /></span></a>
</label>
</td>
</tr>
<tr><td colspan="2"><label id="animation"><!-- busy.gif! --></label></td></tr>
</table>
<p id="errorMessage"><!-- space --></p>
</div>
</form
><img const:alt="*" id="preparedAnimation" rsrc:src="busy.gif"/>
</var:component>

@ -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;

@ -0,0 +1 @@
-- sogo_mysql_privileges.sql template

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -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 "<tr><td class=\"sme-noborders-label\">",
$self->localise('ALLOWED_GROUPS'),
"</td><td>\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(
"<input type=\"checkbox\""
. " name=\"allowedGroups\""
. " $checked value=\"$groupname\">"
),
esmith::cgi::genSmallCell($q, $groupname,"normal"),
esmith::cgi::genSmallCell( $q, $accountdb->get($groupname)->prop("Description"),"normal")
);
}
print "</table></td></tr>\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;

@ -0,0 +1,7 @@
#!/bin/sh
exec \
/usr/local/bin/setuidgid sogo \
/usr/local/bin/multilog t s5000000 \
/var/log/memcached-sogo

@ -0,0 +1,5 @@
#!/bin/sh
exec 2>&1
exec memcached -u sogo -v -s /var/run/sogo/memcached.sock -a 600
Loading…
Cancel
Save