commit 1f13b87a4217d429d904877b802c0e5e6d3bbc9e Author: Daniel Berteaud Date: Sat Mar 31 14:26:38 2012 +0200 initial commit diff --git a/root/etc/e-smith/db/configuration/sogosync/access b/root/etc/e-smith/db/configuration/sogosync/access new file mode 100644 index 0000000..a48cf0d --- /dev/null +++ b/root/etc/e-smith/db/configuration/sogosync/access @@ -0,0 +1 @@ +public diff --git a/root/etc/e-smith/db/configuration/sogosync/status b/root/etc/e-smith/db/configuration/sogosync/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/sogosync/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/sogosync/type b/root/etc/e-smith/db/configuration/sogosync/type new file mode 100644 index 0000000..1b93c9e --- /dev/null +++ b/root/etc/e-smith/db/configuration/sogosync/type @@ -0,0 +1 @@ +webapp diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98SOGoSync b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98SOGoSync new file mode 100644 index 0000000..245a095 --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98SOGoSync @@ -0,0 +1,35 @@ +{ +my $sogosync = $sogosync{'status'} || 'enabled'; +my $access = $sogosync{'access'} || 'private'; +my $allow = ($access eq 'public') ? 'all':"$localAccess $externalSSLAccess"; + +if ($sogosync eq 'enabled'){ + $OUT .=<<"EOF"; + +Alias /Microsoft-Server-ActiveSync /usr/share/sogosync/index.php + + + SSLRequireSSL on + AddType application/x-httpd-php .php .php3 + AllowOverride None + php_admin_flag magic_quotes_gpc off + php_admin_flag register_globals off + php_admin_flag magic_quotes_runtime off + php_admin_flag short_open_tag on + php_admin_value open_basedir /usr/share/sogosync:/usr/share/awl/in + Order deny,allow + Deny from all + Allow from $allow + + + + Deny from all + + +EOF + +} +else{ + $OUT .= "# sogosync is disabled\n"; +} +} diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHost/61RedirSOGoSync b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHost/61RedirSOGoSync new file mode 100644 index 0000000..486677b --- /dev/null +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHost/61RedirSOGoSync @@ -0,0 +1,13 @@ +{ +my $sslport = $modSSL{'TCPPort'} || '443'; +my $sogosync = $sogosync{'status'} || 'enabled'; + +if (($port ne $sslport) && ($sogosync eq 'enabled')){ + + ## Redirect Web Address to Secure Address + $OUT .= " RewriteEngine on\n"; + $OUT .= " RewriteRule ^/Microsoft-Server-ActiveSync(/.*|\$) https://%{HTTP_HOST}/Microsoft-Server-ActiveSync\$1 \[L,R\]\n"; + +} +} + diff --git a/smeserver-sogosync.spec b/smeserver-sogosync.spec new file mode 100644 index 0000000..93619fe --- /dev/null +++ b/smeserver-sogosync.spec @@ -0,0 +1,42 @@ +Name: smeserver-sogosync +Version: 0.0.1 +Release: 0.beta0%{?dist} +Summary: SME Server integration for sogosync + +Group: Application/System +License: GNU GPL v2 +URL: https://github.com/xbgmsharp/sogosync +Source0: %{name}-%{version}.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildRequires: e-smith-devtools +Requires: smeserver-webapps-common +Requires: sogosync + +%description +Integrate sogosync, which provides an ActiveSync compatible server for SOGo, +based on Z-Push + + +%prep +%setup -q -n %{name}-%{version} + +%build + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) +/bin/rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + > %{name}-%{version}-filelist + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root) + + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog +* Sat Mar 31 2012 Daniel Berteaud 0.0.1-1 +- initial package