Commit 036612ba authored by Markus Wanner's avatar Markus Wanner

Add sqwebmail apache2 config and enable it by default.

parent 3ada747e
......@@ -24,6 +24,8 @@ courier (1.0.1-1) UNRELEASED; urgency=medium
* courier-webadmin: Add dependency on libcgi-pm-perl. Closes: #910525.
* courier-webadmin: Correct ownership and permissions on
/etc/courier/webadmin/password (mode 0600, courier owned).
* sqwebmail: provide a default apache24 configuration and enable it
from the postinst script, if possible.
* sqwebmail.postinst: eliminate trailing slash passed on to
dpkg-statoverride.
* sqwebmail/install-www: change table to use split choices.
......
......@@ -12,10 +12,10 @@ add_override() {
}
if [ "$1" = "configure" ]; then
add_override root courier 0750 /etc/courier/webadmin
add_override root courier 0750 /etc/courier/webadmin/added
add_override root courier 0750 /etc/courier/webadmin/removed
add_override root courier 0755 /usr/lib/courier/courier/webmail
add_override root courier 4755 /usr/lib/courier/courier/webmail/webadmin
# install CGI script for Courier web administration
......
......@@ -22,6 +22,7 @@ if [ "$1" = "purge" ]; then
del_override root courier 0750 /etc/courier/webadmin
del_override root courier 0750 /etc/courier/webadmin/added
del_override root courier 0750 /etc/courier/webadmin/removed
del_override root courier 0755 /usr/lib/courier/courier/webmail
del_override root courier 4755 /usr/lib/courier/courier/webmail/webadmin
# Remove remains of web administration
......
......@@ -130,6 +130,10 @@ override_dh_install:
# Ispell dictionary configuration will be produced by postinst
rm -f $(BUILD)/usr/lib/courier/sqwebmail/html/en-us/ISPELLDICT
# Install apache 2.4 configuration
install -D -m0644 debian/sqwebmail.apache24.conf \
$(CURDIR)/debian/sqwebmail/etc/sqwebmail/apache24.conf
# Remove examples
rm -f $(BUILD)/usr/lib/courier/perlfilter-example.pl
rm -f $(BUILD)/etc/courier/quotawarnmsg.example
......
......@@ -19,8 +19,8 @@ moved to /etc/courier/ispelldict.
URL
***
The URL for SqWebMail is http://localhost/cgi-bin/sqwebmail on a
Debian system with a standard webserver setup.
The URL for SqWebMail is http://localhost/sqwebmail on a Debian
system with an apache2 webserver.
Runtime Configuration
*********************
......
# Sqwebmail configuration for apache2
ScriptAlias /sqwebmail /usr/lib/courier/courier/webmail/webmail
<Directory /usr/lib/courier/courier/webmail/webmail>
# Allow only connections from localhost by default.
Require local
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Directory>
......@@ -11,8 +11,21 @@ add_override() {
fi
}
if [ "$1" = "configure" ]; then
apache24_install() {
if [ -d /etc/apache2/conf-available ] && [ ! -e /etc/apache2/conf-available/sqwebmail.conf ]; then
ln -s ../../sqwebmail/apache24.conf /etc/apache2/conf-available/sqwebmail.conf
# activate configuration on new install with apache2-mainscript-helper
if [ -z "$2" ]; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf sqwebmail.conf
fi
fi
fi
}
if [ "$1" = "configure" ]; then
db_get sqwebmail/install-www
if [ "$RET" = "symlink" ]; then
db_get sqwebmail/install-www-backup
......@@ -46,7 +59,10 @@ if [ "$1" = "configure" ]; then
db_get sqwebmail/dictionary
echo -n "$RET" > /etc/courier/ispelldict
add_override root courier 0700 /usr/lib/courier/courier/webmail
# possibly link and enable apache configuration
apache24_install "$@"
add_override root courier 0755 /usr/lib/courier/courier/webmail
add_override courier courier 2755 /usr/lib/courier/courier/sqwebpasswd
add_override courier courier 0700 /var/cache/sqwebmail
add_override courier courier 0750 /var/lib/courier/calendar
......
......@@ -28,7 +28,7 @@ if [ "$1" = "purge" ]; then
# remove ispelldict configuration
rm -f /etc/courier/ispelldict
del_override root courier 0700 /usr/lib/courier/courier/webmail
del_override root courier 0755 /usr/lib/courier/courier/webmail
del_override courier courier 2755 /usr/lib/courier/courier/sqwebpasswd
del_override courier courier 0700 /var/cache/sqwebmail
del_override courier courier 0750 /var/lib/courier/calendar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment