FAQ
Hello,


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.


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.
Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line
317.
  at /usr/share/perl5/Catalyst/ScriptRunner.pm line 50
[Mon Sep 02 06:17:11 2013] [warn] [client 127.0.0.1] (104)Connection
reset by peer: mod_fcgid: error reading data from FastCGI server


Now, that's not really surprising because /tmp/ciderwebmail doesn't
exist and my /etc/ciderwebmail/ciderwebmail.conf contains nothing but:


name CiderWebmail
<server>
  host localhost
  port 143
</server>
language en
username_default_address 0
<send>
  method sendmail
</send>
<Model::DB>
  connect_info dbi:SQLite:/var/lib/ciderwebmail/user_settings.sql
</Model::DB>
root /usr/share/ciderwebmail/root
home /usr/share/ciderwebmail




However, despite extensive googling and grepping, I was unable to find
any documentation of how to configure the session storage, or generally
what I can put into the ciderwebmail.conf file.




Can anyone help?




Thanks,


    -Nikolaus


--
  ?Time flies like an arrow, fruit flies like a Banana.?


   PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C

Search Discussions

  • Nikolaus Rath at Sep 2, 2013 at 6:33 am
    Hello,


    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.


    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.
    Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line
    317.
      at /usr/share/perl5/Catalyst/ScriptRunner.pm line 50
    [Mon Sep 02 06:17:11 2013] [warn] [client 127.0.0.1] (104)Connection
    reset by peer: mod_fcgid: error reading data from FastCGI server


    Now, that's not really surprising because /tmp/ciderwebmail doesn't
    exist and my /etc/ciderwebmail/ciderwebmail.conf contains nothing but:


    name CiderWebmail
    <server>
      host localhost
      port 143
    </server>
    language en
    username_default_address 0
    <send>
      method sendmail
    </send>
    <Model::DB>
      connect_info dbi:SQLite:/var/lib/ciderwebmail/user_settings.sql
    </Model::DB>
    root /usr/share/ciderwebmail/root
    home /usr/share/ciderwebmail




    However, despite extensive googling and grepping, I was unable to find
    any documentation of how to configure the session storage, or generally
    what I can put into the ciderwebmail.conf file.




    Can anyone help?




    Thanks,


        -Nikolaus


    --
      ?Time flies like an arrow, fruit flies like a Banana.?


       PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
  • Stefan Seifert at Sep 2, 2013 at 7:00 am
    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.

    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.


    This is not exactly a CiderWebmail problem. It can happen with any application
    using the Catalyst::Plugin::Session::Store::FastMmap module. But the suggested
    solution seems always to be the same:


    http://www.google.com/search?q="Open+of+share+file"+"session_data"+failed


    Maybe we should use some other session storage plugin. FastMmap can be an
    annoyance with in house applications, but for an end user application it can
    be a real problem.

    However, despite extensive googling and grepping, I was unable to find
    any documentation of how to configure the session storage, or generally
    what I can put into the ciderwebmail.conf file.

    Ok, we definitely need some description of the config file. Thanks for that
    hint.


    Regards,
    Stefan
  • Nikolaus Rath at Sep 3, 2013 at 4:34 pm

    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?






    Best,
    Nikolaus
  • Nikolaus Rath at Sep 4, 2013 at 1:53 am

    Stefan Seifert writes:
    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.:

    Okay, I for now I've given the fastcgi process access to that
    directory. Now I'm getting the next error though:


    Couldn't instantiate component "CiderWebmail::Model::DB", "DBIx::Class::Storage::DBI::dbh(): DBI Connection failed: DBI connect('root/var/user_settings.sql','',...) failed: unable to open database file at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1249 at /usr/share/perl5/CiderWebmail/Model/DB.pm line 18"Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 317.
      at /usr/share/perl5/Catalyst/ScriptRunner.pm line 50


    Please do not tell me that ciderwebmail needs to use a /root/var
    directory :-).




    Thanks,




        -Nikolaus


    --
      ?Time flies like an arrow, fruit flies like a Banana.?


       PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
  • Stefan Seifert at Sep 4, 2013 at 4:48 pm

    On Tuesday 03 September 2013 18:53:25 Nikolaus Rath wrote:


    Now I'm getting the next error though:

    Couldn't instantiate component "CiderWebmail::Model::DB",
    "DBIx::Class::Storage::DBI::dbh(): DBI Connection failed: DBI
    connect('root/var/user_settings.sql','',...) failed: unable to open
    database file at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1249 at
    /usr/share/perl5/CiderWebmail/Model/DB.pm line 18"Compilation failed in
    require at /usr/share/perl5/Module/Runtime.pm line 317. at
    /usr/share/perl5/Catalyst/ScriptRunner.pm line 50

    Please do not tell me that ciderwebmail needs to use a /root/var
    directory :-).

    Not /root/var but root/var which would probably be
    /usr/share/ciderwebmail/root/var on your system.


    But according to the config you posted:
    <Model::DB>
             connect_info dbi:SQLite:/var/lib/ciderwebmail/user_settings.sql
    </Model::DB>
    the user setting database should be at /var/lib/ciderwebmail/


    It would seem like CiderWebmail cannot find your config file. I tried it
    locally and get the correct error message:
    DBI connect('/var/lib/ciderwebmail/user_settings.sql','',...) failed: unable
    to open database file


    Stefan
  • Nikolaus Rath at Sep 4, 2013 at 10:58 pm

    On 09/04/2013 09:48 AM, Stefan Seifert wrote:
    On Tuesday 03 September 2013 18:53:25 Nikolaus Rath wrote:

    Now I'm getting the next error though:

    Couldn't instantiate component "CiderWebmail::Model::DB",
    "DBIx::Class::Storage::DBI::dbh(): DBI Connection failed: DBI
    connect('root/var/user_settings.sql','',...) failed: unable to open
    database file at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1249 at
    /usr/share/perl5/CiderWebmail/Model/DB.pm line 18"Compilation failed in
    require at /usr/share/perl5/Module/Runtime.pm line 317. at
    /usr/share/perl5/Catalyst/ScriptRunner.pm line 50

    Please do not tell me that ciderwebmail needs to use a /root/var
    directory :-).
    Not /root/var but root/var which would probably be
    /usr/share/ciderwebmail/root/var on your system.

    But according to the config you posted:
    <Model::DB>
    connect_info dbi:SQLite:/var/lib/ciderwebmail/user_settings.sql
    </Model::DB>
    the user setting database should be at /var/lib/ciderwebmail/

    It would seem like CiderWebmail cannot find your config file. I tried it
    locally and get the correct error message:
    DBI connect('/var/lib/ciderwebmail/user_settings.sql','',...) failed: unable
    to open database file



    So how do I tell it which config file to use?




    Thanks,
    Nikolaus
  • Stefan Seifert at Sep 5, 2013 at 6:39 pm

    On Wednesday 04 September 2013 15:58:06 Nikolaus Rath wrote:


    It would seem like CiderWebmail cannot find your config file. I tried it
    locally and get the correct error message:
    DBI connect('/var/lib/ciderwebmail/user_settings.sql','',...) failed:
    unable to open database file
    So how do I tell it which config file to use?

    Ok, I installed a chroot environment and did a make install of CiderWebmail
    there. Then I used strace -estat to see where it looks for configuration
    files.
    It looks like it's looking for files in
    /usr/lib/perl5/site_perl/5.16.2/CiderWebmail/
    on my installation, e.g.
    /usr/lib/perl5/site_perl/5.16.2/CiderWebmail/ciderwebmail.conf


    According to
    https://metacpan.org/module/Catalyst::Plugin::ConfigLoader#get_config_path
    one can specify an alternative configuration directory using the environment
    variable CIDERWEBMAIL_CONFIG


    And indeed, running
    CIDERWEBMAIL_CONFIG=/etc/ciderwebmail/ciderwebmail strace -estat
    ciderwebmail_server.pl 2>&1 | grep ciderwebmail
    gives me something useful:
    stat("/etc/ciderwebmail/ciderwebmail.conf", {st_mode=S_IFREG|0644,
    st_size15, ...}) = 0


    So the short answer is. Add
    export CIDERWEBMAIL_CONFIG=/etc/ciderwebmail/ciderwebmail
    to your startup script.


    Stefan
  • Nikolaus Rath at Sep 7, 2013 at 12:01 am

    On 09/05/2013 11:39 AM, Stefan Seifert wrote:
    On Wednesday 04 September 2013 15:58:06 Nikolaus Rath wrote:

    It would seem like CiderWebmail cannot find your config file. I tried it
    locally and get the correct error message:
    DBI connect('/var/lib/ciderwebmail/user_settings.sql','',...) failed:
    unable to open database file
    So how do I tell it which config file to use?
    Ok, I installed a chroot environment and did a make install of CiderWebmail
    there. Then I used strace -estat to see where it looks for configuration
    files.
    [...]


    Ok, now you got me really confused. I thought you are one of
    Ciderwebmail's authors - why do you need strace to figure out where it
    finds its configuration file?


    No offense meant, but it's making me a bit worried if not even the
    program's authors know how to configure it without resorting to
    reverse-engineering...




    Best,




        -Nikolaus


    --
      ?Time flies like an arrow, fruit flies like a Banana.?


       PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
  • Stefan Seifert at Sep 7, 2013 at 8:51 am

    On Friday 06 September 2013 17:01:32 Nikolaus Rath wrote:


    Ok, now you got me really confused. I thought you are one of
    Ciderwebmail's authors - why do you need strace to figure out where it
    finds its configuration file?

    CiderWebmail uses the Catalyst framework http://www.catalystframework.org
    Things like reading the configuration file and supporting different
    configuration formats is done by this framework and its plugins
    https://metacpan.org/module/Catalyst::Plugin::ConfigLoader to be precise.


    I've been using Catalyst in all our web applications in private and at work
    for 8 years now. But I actually never had the need to do a make install. We
    run all our applications directly from source repository checkouts. When doing
    that, the application looks for configuration files in the top level directory
    of the checkout.

    No offense meant, but it's making me a bit worried if not even the
    program's authors know how to configure it without resorting to
    reverse-engineering...

    I could have just as easily looked at the ConfigLoader source code. strace was
    just quicker and a good way to ensure that I was not missing something at half
    past 8 in the evening.


    Btw. thank you for bearing with us. You give us very valuable feedback that
    will allow us to make things much smoother for future users. Plenty of work to
    do but it will be worth it :)


    Stefan
  • Nikolaus Rath at Sep 10, 2013 at 2:14 am

    Stefan Seifert writes:
    Btw. thank you for bearing with us. You give us very valuable feedback that
    will allow us to make things much smoother for future users. Plenty of work to
    do but it will be worth it :)

    Hmm. Ok, you asked for it :-).


      - Why isn't there a "login/password incorrect" message when entering
        incorrect credentials? At the moment, the page just reloads, which
        makes it appear as if nothing happened at all.


      - How do I set a Reply-To or a Bcc address?


      - It seems that anything that I enter as "From" or "Save copy to"
        folder becomes the default for future messages. How do I prevent
        that?


      - How do I set a default From address? (preferably without having to log
        in manually as every user and sending a "test" mail..)


      - Why do I get a screenfull of obscure error messages when forgetting
        to specify a From? (ok, it starts with "no sender", but the rest will
        scare away any person who didn't just install the software himself)


      - How do I configure logging? At the moment it seems to dump log
        messages directly into apache's error.log, without indicating the
        date, time, or component generating the error (i.e., ciderwebmail)




    Thanks for your patience!




    Best,


        -Nikolaus


    --
      ?Time flies like an arrow, fruit flies like a Banana.?


       PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
  • Mathias Reitinger at Sep 10, 2013 at 4:18 pm
    Hi,

    On 09 Sep, Nikolaus Rath wrote:
    - Why isn't there a "login/password incorrect" message when entering
    incorrect credentials? At the moment, the page just reloads,
    which makes it appear as if nothing happened at all.

    - Why do I get a screenfull of obscure error messages when
    forgetting
    to specify a From? (ok, it starts with "no sender", but the
    rest will scare away any person who didn't just install the
    software himself)

    in the current (to-be-released-really-soon-now) version there are
    error/status messages for login/sending/... (including html5 upload
    progress).


    In the future you will be able to set the verbosity of status/error
    messages ('login failed', 'login failed: server said <foo>', 'login
    failed: full debug output').

    - How do I set a Reply-To or a Bcc address?

    - It seems that anything that I enter as "From" or "Save copy to"
    folder becomes the default for future messages. How do I
    prevent that?

    those will be fixed in the future - getting a decent
    preferences/settings system in place is on my todo list.



    - How do I set a default From address? (preferably without having
    to log
    in manually as every user and sending a "test" mail..)

    if your users login with user@domain.com as their username you can set


         username_default_address to true


    in your ciderwebmail configuration. this will use the username as
    default from: address.


    other than that - how would you like to set the from address? some
    external lookup? script to insert into the settings and/or pre-create
    users?


    I am planning a multiple-identities thing so you can setup various
    from/reply-to/name combinations and choose from them when composing
    mails. it should be simple enough to provide a way to lookup things
    like that in a database/ldap server/...



    - How do I configure logging? At the moment it seems to dump log
    messages directly into apache's error.log, without indicating the
    date, time, or component generating the error (i.e., ciderwebmail)

    currently we use Catalyst's default log handler - clearly this is not
    sufficient... replacing it with something more advanced should be
    trivial - I'm going to take a look at this later today.

    Thanks for your patience!

    Thanks for your feedback!


    --
    Mathias Reitinger <mathias.reitinger@loop0.org>
  • Nikolaus Rath at Sep 11, 2013 at 4:07 am

    On 09/10/2013 09:24 AM, Mathias Reitinger wrote:
    Hi,
    On 09 Sep, Nikolaus Rath wrote:
    - Why isn't there a "login/password incorrect" message when entering
    incorrect credentials? At the moment, the page just reloads,
    which makes it appear as if nothing happened at all.

    - Why do I get a screenfull of obscure error messages when
    forgetting
    to specify a From? (ok, it starts with "no sender", but the
    rest will scare away any person who didn't just install the
    software himself)
    in the current (to-be-released-really-soon-now) version there are
    error/status messages for login/sending/... (including html5 upload
    progress).

    In the future you will be able to set the verbosity of status/error
    messages ('login failed', 'login failed: server said <foo>', 'login
    failed: full debug output').

    Great, looking forward to the release :-).

    - How do I set a Reply-To or a Bcc address?

    - It seems that anything that I enter as "From" or "Save copy to"
    folder becomes the default for future messages. How do I
    prevent that?
    those will be fixed in the future - getting a decent
    preferences/settings system in place is on my todo list.

    For me this would be a high priority. I have some very non-computer savy
    users for which Ciderwebmail's clean, simple interface is almost ideal.
    However, the chance of them accidentally messing with the From or Fcc
    and the change becoming permanent is just too high.

    - How do I set a default From address? (preferably without having
    to log
    in manually as every user and sending a "test" mail..)
    if your users login with user@domain.com as their username you can set

    username_default_address to true

    in your ciderwebmail configuration. this will use the username as
    default from: address.

    other than that - how would you like to set the from address? some
    external lookup? script to insert into the settings and/or pre-create
    users?

    A scriptable API would of course be nice, but I was thinking more along
    the lines of defaulting to user@`cat /etc/mailname`, with the real name
    taking from /etc/passwd.


    (Unfortunately my users login without domain)

    I am planning a multiple-identities thing so you can setup various
    from/reply-to/name combinations and choose from them when composing
    mails. it should be simple enough to provide a way to lookup things
    like that in a database/ldap server/...

    - How do I configure logging? At the moment it seems to dump log
    messages directly into apache's error.log, without indicating the
    date, time, or component generating the error (i.e., ciderwebmail)
    currently we use Catalyst's default log handler - clearly this is not
    sufficient... replacing it with something more advanced should be
    trivial - I'm going to take a look at this later today.

    Cool, thanks!




    Best,


        -Nikolaus


    --
      ?Time flies like an arrow, fruit flies like a Banana.?


       PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcider-webmail @
postedSep 2, '13 at 6:28a
activeSep 11, '13 at 4:07a
posts13
users3
websiteciderwebmail.org

People

Translate

site design / logo © 2018 Grokbase