diff --git a/README.md b/README.md index d9c00b1..4e10395 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ You can run MailMan in two different modes: There are two types of users: the admin users and the mail users. #### Admin features - - TODO Create, edit and delete users (both admins and mail users) - - TODO Create invite tokens/links - - TODO Create mail aliases - - TODO Create blacklists for usernames - - TODO Create muptiple mail domains + - Create, edit and delete users (both admins and mail users) + - Create invite tokens/links + - Create mail aliases + - Create blacklists for usernames + - Create muptiple mail domains #### User features - - TODO Change own password + - Change own password - TODO See account details - TODO Configure aliases @@ -36,5 +36,47 @@ There are two types of users: the admin users and the mail users. - Postfix - Dovecot +## Installation +### General +1. Clone this repository. +2. Set up a webserver with PHP7.2 or above and all the Laravel dependancies. +3. Configure the document root of the webserver to point to the ` public ` directory of this repository. +4. Install the Composer software and run ` composer update ` while being in the root directory of this repository. +5. Copy or rename the ` .env.example ` file to ` .env ` and edit the file to contain your correct database credentials, timezone and so on. +6. Run ` php artisan migrate:fresh ` to create the database structure. +7. Run ` php artisan db:seed ` to create a default admin user. + +### Postfix +1. Copy the .cf files from the ` postfix ` directory from this repository into your local postfix configuration directory (e.g. `/etc/postfix/`) +2. Add the following lines to the `main.cf` file of your local Postfix config directory (assuming you are using MySQL or MariaDB): +``` +virtual_mailbox_domains = mysql:/etc/postfix/mailman-domains.cf +virtual_mailbox_maps = mysql:/etc/postfix/mailman-users.cf +virtual_alias_maps = mysql:/etc/postfix/mailman-aliases.cf +``` +3. Edit each of those three files so that they conatin the correct database credentials. +4. Restart or reload the Postfix service: e.g. ` postfix reload ` + +### Dovecot +Go to your Dovecot config directory on your system (e.g. ` /etc/dovecot/ `) and add the following lines to the ` dovecot-sql.conf.ext ` file: +``` +driver = mysql +connect = host=127.0.0.1 dbname=dbname user=dbusername password=dbpassword +default_pass_scheme = SHA512-CRYPT +password_query = SELECT * FROM (SELECT CONCAT(u.username, '@', d.name) as user, password FROM users u JOIN domains d ON (u.domain_id=d.id)) x WHERE user='%u'; +``` +Don't forget to replace the placeholders in the line starting with ` connect ` with your correct database credentials. + +## Default admin login credentials +Admin-login page: ` /admin ` + +Username: ` admin ` + +Password: ` admin ` + + +Make sure to change the administrator password IMMEDEATELY after installation! + + ## License This project is licensed under the GNU General Public License Version 3 - see the LICENSE file for details.