Project

General

Profile

Actions

Bug #304

closed

sqwebmail (cgi) works under http but not https

Added by Anonymous over 18 years ago. Updated over 15 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_cgi
Target version:
-
ASK QUESTIONS IN Forums:

Description

Curious little bug, lighttpd 1.4.4

OK, I'm using courier (0.48.1) with sqwebmail. It worked fine under apache2 and ssl, but under lighttpd it's doing something odd.

If I run lighttpd in regular (http) mode, it works like a champ.

If I run lighttpd in secure (ssl) mode, it refuses to connect (the same dialog as if I try to connect via http when lighty is in ssl mode, which could be telling).

My other CGIs, etc work fine in both modes. Only sqwebmail dies.

Needless to say, I'd like my webmail back. Is this a configuration problem or a lighty problem?

-- vputz

Actions #1

Updated by Anonymous over 17 years ago

It might be a bug with the cgi module:

sqwebmail expects an environment variable named "HTTPS" to be passed to it. Don't know if this is in CGI specs or if it's a "proprietary" Apache extension.
Sqwebmail generates the correct url for the login form and to do that it depends on that variable. You're probably getting a login form where the action is to submit to http and not to https. This is what I had and what caused the strange error message "cgi died?".

There is an easy workaround:
include "mod_setenv" in your server.modules and put something like this in your domain/subdomain configuration (only put this where you have ssl, obviously):


setenv.add-environment = ( "HTTPS" => "on" )

-- anonymous coward

Actions #2

Updated by Anonymous about 17 years ago

Sqwebmail "may" expect an HTTPS environment variable, but it depends on how sqwebmail was compiled. When sqwebmail is compiled, the --enable-https option governs whether or not sqwebmail will generate https URLs. There is one settings of interest with three possible values: --enable-https, --enable-https=no, and --enable-https=login.

Don't use the latter. If you provide SSL, then encourage the entire webmail session to be encrypted by simply choosing --enable-https. This has the nifty side effect of not switching between http and https during the session, which is making it hard to determine why sqwebmail doesn't seem to work under lighttpd.

So, you've got two choices: #1 don't use --enable-https at all. Sqwebmail will work just fine under lighttpd via http URLs. or #2 is use --enable-https and set up lighttpd for SSL support. Both work. Using sqwebmail's --enable-https=login does not. Even with the added environment variable cited above.

-- matt

Actions #4

Updated by Anonymous almost 17 years ago

Hi,searched in searchengine for one, and has found absolutely another, happens such!
http://clarinex-onli.sinfree.net/clarinex-kaufen-usa.html

-- Yuts

Actions #5

Updated by Anonymous over 16 years ago

The provided solution did not work for me, don't know why i compiled sqwebmail with --enable-https and running it throu ssl.
For some reason, that i am to tired to figure out, sqwebmail still generated http:// urls even though i did setenv.add-environment = ( "HTTPS" => "on" ) in my config.
what i did is a simple hack that costs some cpu but works (as long as nobody klicks on an http link in an html email.)

i moved the sqwebmail executeable to sqwebmail and wrote a simple shell script:

#!/bin/sh
./sqwebmail_do -h|sed "s/http:\/\//https:\/\//"

it should be clear how this works, but honestly it sucks.
sqwebmail broke the moment i added another ssl site. I am doing forwarding from http to https on both of them. And seriosly the adress-allready-in-use-BUG is annoying.

-- djunky

Actions #6

Updated by stbuehler about 16 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

I don't think this is a lighttpd bug.

Actions #7

Updated by stbuehler over 15 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom