JWebmail ======== SESSION STORAGE --------------- This is a quick guide on how to set up the session storage. Your options are Redis/Valkey, MySQL/MariaDB or SQLite. They must be reachable by localhost or writable by the current user. This is an example configuration: [JWEBMAIL.READ_MAILS] SESSION_TYPE = 'REDIS' SESSION_STORE_PASSWD = '$PASSWORD' Make sure the config file can only be read by user/group `jwebmail` when you specify a password. ### SQLite 1. Make sure the db is created at a location where the jwebmail user has read and write permissions. Use the SESSION_STORE_DB_NAME value to set the path. ### Redis 1. Create a user 'jwebmail' 2. Grant privileges for that user to 'jwm:user:*' for the commands setex and getex. ACL SETUSER jwebmail ~jwm:user:* -@all +setex +getex >$PASSWORD ### 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';