[CiderWebmail] How to configure session store (or ciderwebmail in general)

Nikolaus Rath Nikolaus at rath.org
Tue Sep 3 16:36:26 GMT 2013

On 09/02/2013 12:00 AM, Stefan Seifert wrote:
> Hi Nikolaus,
> On Sunday 01 September 2013 23:28:30 Nikolaus Rath wrote:
>> I'm trying to set up my first ciderwebmail installation. With some
>> educated guesses, I've got the ciderwebmail_fastcgi.pl script to run
>> under fastcgi.
> Can you tell us what things you had to guess? I'd love to put some docs 
> together to make it easier for people to install. Also please don't hesitate 
> to ask on this list if you come upon any other questions.

Well, I started by installing the Debian package, but the only
installation information I found was that ciderwebmail uses PSGI and is
"compatible with many PSGI implementations" but that package "does not
integrate with any specific one".

The minimal example given ("plackup
/etc/ciderwebmail/ciderwebmail.psgi") didn't give me any information on
how to actually access the frontend, how to integrate it into my
webserver, or how to tell it which imap server to use.

I then decided to go with the included example files for apache2 and
uwsgi. This didn't work out of the box and it seemed that in order to
get it to work I'd first have to get familiar with both uwsgi and psgi.
That seemed like a rather complicated way to do things, and the
description of the uwsgi apache plugin as "stable but a bit hacky"
didn't encourage me either.

Instead I took a look at the list of files installed by the ciderwebmail
debian package and found ciderwebmail_{fastcgi,cgi}.pl files which
seemed like a more promising place to start.

After installing the apache2 fcgid module, I had some trouble to make
Apache treat the file as a cgi script (a Files section with Options
+ExecCGI and SetHandler fastcgi-script didn't work), so I created a new
directory, symlinked ciderwebmail_fastcgi.pl into it as
ciderwebmail.fcgi and made the whole directory +ExecGCI. This is where I
am right now. Apache seems to forward the requests correctly, but the
script isn't starting.

>> However, as soon as I try to access the configured URL, I'm getting the
>> following error:
>> [Mon Sep 02 06:17:02 2013] [notice] Apache/2.2.22 (Debian)
>> mod_auth_tkt/2.1.0 mod_fcgid/2.3.6 mod_ssl/2.2.22 OpenSSL/1.0.1e
>> mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
>> Open of share file /tmp/ciderwebmail/session_data failed: Permission
>> denied at /usr/lib/perl5/Cache/FastMmap.pm line 640.
> Try creating the /tmp/ciderwebmail directory and change the owner to the user 
> you're using for running CiderWebmail. E.g.:
> mkdir /tmp/ciderwebmail
> chown -R wwwrun /tmp/ciderwebmail
> You may want to add it to your startup script.

Hmm. I was actually hoping there'd be a way to configure this location.
The Debian documentation mentioned that "CiderWebmail needs a place for
user configuration. Something like this: mkdir /var/lib/ciderwebmail;
chown www-data: /var/lib/ciderwebmail".

I was assuming that I could tell ciderwebmail to use this directory for
its session data.. but if session data always goes in /tmp/ciderwebmail,
then what is the /var/lib/ciderwebmail directory for?


More information about the Cider-webmail mailing list