

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in net.sourceforge.lists.courier-sqwebmail[sqwebmail] SQWEBMAIL_TEMPLATEDIR and...| From | Sent On | Attachments |
|---|---|---|
| Pawel Tecza | May 30, 2006 1:07 am | |
| Sam Varshavchik | May 30, 2006 3:48 am | |
| Pawel Tecza | May 31, 2006 12:58 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [sqwebmail] SQWEBMAIL_TEMPLATEDIR and HTTP_ACCEPT_LANGUAGE | Actions... |
|---|---|---|
| From: | Pawel Tecza (p.te...@net.icm.edu.pl) | |
| Date: | May 30, 2006 1:07:51 am | |
| List: | net.sourceforge.lists.courier-sqwebmail | |
Hi Sam,
I have Debian 'sarge' box with Courier 0.53.1 backported from unstable. The default HTML templates are located in /usr/lib/courier/sqwebmail/html directory:
$ ls -l /usr/lib/courier/sqwebmail/html razem 3 lrwxrwxrwx 1 root root 5 2006-05-29 15:58 en -> en-us drwxr-xr-x 2 root root 3072 2006-05-29 15:58 en-us
I'm trying to set another HTMLLIBDIR path (e.g. /var/www/sqwebmail/html) using SQWEBMAIL_TEMPLATEDIR env variable, because we have own English and Polish templates with a lot of changes:
$ ls -l /var/www/sqwebmail/html razem 8 lrwxrwxrwx 1 root root 5 2006-05-29 14:28 en -> en-us drwxr-xr-x 2 root root 4096 2006-05-29 14:51 en-us lrwxrwxrwx 1 root root 5 2006-05-29 14:28 pl -> pl-pl drwxr-xr-x 2 root root 4096 2006-05-29 14:52 pl-pl
This is my Apache-SSL name-based configuration:
Alias /webmail/en /var/www/sqwebmail Alias /webmail/pl /var/www/sqwebmail Alias /webmail /var/www/sqwebmail SetEnvIf Request_URI "^/webmail/en/" HTTP_ACCEPT_LANGUAGE_OVERRIDE=en SetEnvIf Request_URI "^/webmail/pl/" HTTP_ACCEPT_LANGUAGE_OVERRIDE=pl
<Directory /var/www/sqwebmail> Options Indexes Includes FollowSymLinks MultiViews ExecCGI
AllowOverride None DirectoryIndex index.cgi
Order allow,deny Allow from all
SetEnv SQWEBMAIL_TEMPLATEDIR /var/www/sqwebmail/html </Directory>
The aliases above were created, because our webmail is available at following URLs:
- Polish version: https://my.domain.com/webmail/pl/ - English version: https://my.domain.com/webmail/en/
And this is my index.cgi file:
#!/bin/sh
if ! [ -z "$HTTP_ACCEPT_LANGUAGE_OVERRIDE" ]; then HTTP_ACCEPT_LANGUAGE=$HTTP_ACCEPT_LANGUAGE_OVERRIDE export HTTP_ACCEPT_LANGUAGE fi
/usr/lib/courier/courier/webmail/webmail
Unfortunately, I can't see Polish templates when I go at https://my.domain.com/webmail/pl/ URL. I still can see English version there.
Is it my configuration wrong whether init_default_locale() function in sqwebmail.c file should be patched like below?
--- courier-0.53.1/webmail/sqwebmail.c-orig 2006-05-30 09:54:09.000000000 +0200 +++ courier-0.53.1/webmail/sqwebmail.c 2006-05-30 09:54:23.000000000 +0200 @@ -2013,17 +2013,18 @@
static void init_default_locale() { -char *cl=http11_best_content_language(HTMLLIBDIR, +char *templatedir=get_templatedir(); +char *cl=http11_best_content_language(templatedir, getenv("HTTP_ACCEPT_LANGUAGE"));
sqwebmail_content_language= - http11_content_language(HTMLLIBDIR, cl); + http11_content_language(templatedir, cl); sqwebmail_content_locale= - http11_content_locale(HTMLLIBDIR, cl); + http11_content_locale(templatedir, cl); sqwebmail_content_ispelldict= - http11_content_ispelldict(HTMLLIBDIR, cl); + http11_content_ispelldict(templatedir, cl); sqwebmail_content_charset= - http11_content_charset(HTMLLIBDIR, cl); + http11_content_charset(templatedir, cl);
free(cl); #if HAVE_LOCALE_H
Could you please help me to fix the problem?
Have a nice day,
Pawel Tecza







