From a1b33c1ce1579ecebccd7ad8c9c52755c7e5de84 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sun, 26 Aug 2012 17:55:44 +0000 Subject: [PATCH] configuring the webmail properly --- .gitattributes | 4 +-- bureau/admin/index.php | 16 +++-------- bureau/admin/nowebmail.php | 31 +++++++++++++++++++++ bureau/admin/webmail-redirect.php | 33 +++++++++++++++++++++++ bureau/admin/webmail/.htaccess | 0 bureau/admin/webmail/index.php | 3 --- etc/alternc/templates/alternc/bureau.conf | 3 +++ etc/alternc/templates/apache2/panel.conf | 5 +++- squirrelmail/squirrelmail-install | 8 ++++++ 9 files changed, 85 insertions(+), 18 deletions(-) create mode 100644 bureau/admin/nowebmail.php create mode 100644 bureau/admin/webmail-redirect.php delete mode 100644 bureau/admin/webmail/.htaccess delete mode 100644 bureau/admin/webmail/index.php diff --git a/.gitattributes b/.gitattributes index 66ac827e..bd05e298 100644 --- a/.gitattributes +++ b/.gitattributes @@ -286,6 +286,7 @@ bureau/admin/menu_quota.php -text bureau/admin/menu_sql.php -text bureau/admin/menu_web.php -text bureau/admin/mxlist.php -text +bureau/admin/nowebmail.php -text bureau/admin/phpinfo.php -text bureau/admin/piwik_addaccount.php -text bureau/admin/piwik_addsites.php -text @@ -318,8 +319,7 @@ bureau/admin/stats_members.php -text bureau/admin/styles/passwordStrengthMeter.css -text bureau/admin/styles/style.css -text bureau/admin/trash_dateselect.php -text -bureau/admin/webmail/.htaccess -text -bureau/admin/webmail/index.php -text +bureau/admin/webmail-redirect.php -text bureau/class/config.php -text bureau/class/config_nochk.php -text bureau/class/config_real.php -text diff --git a/bureau/admin/index.php b/bureau/admin/index.php index 34140abe..ee6a3ee4 100644 --- a/bureau/admin/index.php +++ b/bureau/admin/index.php @@ -41,7 +41,7 @@ if (!$charset) $charset="UTF-8"; ?> - + AlternC Desktop @@ -83,19 +83,11 @@ if (!$_SERVER[HTTPS]) { - - + +

+ -
- - - - - - -
" />
-
diff --git a/bureau/admin/nowebmail.php b/bureau/admin/nowebmail.php new file mode 100644 index 00000000..58338b34 --- /dev/null +++ b/bureau/admin/nowebmail.php @@ -0,0 +1,31 @@ + diff --git a/etc/alternc/templates/alternc/bureau.conf b/etc/alternc/templates/alternc/bureau.conf index 3754466a..383a6654 100644 --- a/etc/alternc/templates/alternc/bureau.conf +++ b/etc/alternc/templates/alternc/bureau.conf @@ -8,6 +8,9 @@ alias /alternc-sql /usr/share/phpmyadmin + RewriteEngine On + RewriteRule ^webmail /webmail-redirect.php [L] + # will be used to define aliases such as /javascript /webmail /squirrelmail ... Include /etc/alternc/apache-panel.d/*.conf diff --git a/etc/alternc/templates/apache2/panel.conf b/etc/alternc/templates/apache2/panel.conf index 9a3f77cc..256d05fe 100644 --- a/etc/alternc/templates/apache2/panel.conf +++ b/etc/alternc/templates/apache2/panel.conf @@ -8,7 +8,10 @@ alias /alternc-sql /usr/share/phpmyadmin - # will be used to define aliases such as /javascript /webmail /squirrelmail ... + RewriteEngine On + RewriteRule ^webmail /webmail-redirect.php [L] + + # will be used to define aliases such as /javascript /squirrelmail ... Include /etc/alternc/apache-panel.d/*.conf diff --git a/squirrelmail/squirrelmail-install b/squirrelmail/squirrelmail-install index 308b3c13..fb8e7456 100644 --- a/squirrelmail/squirrelmail-install +++ b/squirrelmail/squirrelmail-install @@ -28,6 +28,14 @@ then cp -f /etc/alternc/templates/squirrelmail/avelsieve-config.php /etc/alternc/templates/squirrelmail/apache.conf /etc/squirrelmail/ cp -f /etc/alternc/templates/javascript-common/javascript-common.conf /etc/javascript-common/ echo "Done" + + . /usr/lib/alternc/functions.sh + + echo "Setting squirrelmail as default webmail" + mysql_query "REPLACE INTO variable SET name='webmail_redirect', value='squirrelmail', comment='Set it to the name of your preferred webmail, /webmail will point to it';" + echo "Done" + fi +