summaryrefslogtreecommitdiff
path: root/README.md
blob: 1b31200fde6a7156d320af07d0cd2b14579a85c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
JWebmail
========

SESSION STORAGE
---------------

This is a quick guide on how to set up the session storage.
Your options are:

### Redis

1. Create a user 'jwebmail'

That's it.

### MySQL / MariaDB

1. Create a user 'jwebmail' with a password

    CREATE USER jwebmail@localhost IDENTIFIED BY '$PASSWORD';

2. Create a database 'jwebmaildb1'

    CREATE DATABASE jwebmaildb1;
    USE jwebmaildb1;

3. Create a table 'session' with the following schema

    CREATE TABLE session (user char(64) PRIMARY KEY, password varchar(255), timeout timestamp NOT NULL);
    CREATE INDEX timeout_idx ON session (timeout); -- Optional

4. Grant privileges to the user jwebmail for the above table for at least SELECT, INSERT, UPDATE and DELETE

    GRANT SELECT, INSERT, UPDATE, DELETE PRIVILEGES ON 'jwebmaildb1'.'session' TO 'jwebmail'@'localhost';