![]() Smtpd_sasl_path = /var/run/dovecot/auth-client Transport_maps = hash:/etc/postfix/transport Local_recipient_maps = $virtual_mailbox_maps Virtual_mailbox_maps = proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf Virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_mailbox_domains.cf Virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf Double check its value before running postfix! See Īlso follow Postfix#Secure SMTP (receiving) pointing to the files you created in #SSL certificate. You usually do not want Postfix to forward mail of strangers. If you leave more than one active, you will receive warnings during runtime. # ln -s /etc/letsencrypt/live/ yourdomain/fullchain.pem /etc/ssl/private/vmail.crtīefore you copy & paste the configuration below, check if relay_domains has already been set. # ln -s /etc/letsencrypt/live/ yourdomain/privkey.pem /etc/ssl/private/vmail.key Either change the configuration accordingly, or symlink the keys to /etc/ssl/private: The private key will be in /etc/letsencrypt/live/ yourdomain/privkey.pem, the certificate in /etc/letsencrypt/live/ yourdomain/fullchain.pem. # openssl req -new -x509 -nodes -newkey rsa:4096 -keyout vmail.key -out vmail.crt -days 1460 #days are optionalĪlternatively, create a free trusted certificate using Let's Encrypt. You will need a SSL certificate for all encrypted mail communications (SMTPS/IMAPS/POP3S). Now you can go to the PostfixAdmin's setup page, let PostfixAdmin create the needed tables and create the users in there. (Discuss in Talk:Virtual user mail system with Postfix, Dovecot and Roundcube) So far, the only way to follow this article is by installing PostfixAdmin with Apache, MySQL and PHP. Reason: Further manual database installation is missing. GRANT ALL ON postfix_db.* TO IDENTIFIED BY 'hunter2' $ mysql -u root -p CREATE DATABASE postfix_db You are expected to create the database and user yourself, and give the user permission to use the database, as shown in the following code. In this article, the user postfix_user will have read/write access to the database postfix_db using hunter2 as password. You will need to create an empty database and corresponding user. You could change the home directory to something like /var/mail/vmail but be careful to change this in any configuration below as well. All your mail will then be stored in /home/vmail. # useradd -u 5000 -g vmail -s /usr/bin/nologin -d /home/vmail -m vmailĪ gid and uid of 5000 is used in both cases so that we do not run into conflicts with regular users. Install the postfix-mysql, dovecot, and roundcubemail packages.įor security reasons, a new user should be created to store the mails: Additionally, configuration will be easy thanks to PostfixAdmin and users will be able to login using Roundcube.īefore you start, you must have both a working MySQL server as described in MySQL and a working Postfix server as described in Postfix. ![]() In the end, the provided solution will allow you to use the best currently available security mechanisms, you will be able to send mails using SMTP and SMTPS and receive mails using POP3, POP3S, IMAP and IMAPS. Roughly, the components used in this article are Postfix as the mail server, Dovecot as the IMAP server, Roundcube as the webmail interface and PostfixAdmin as the administration interface to manage it all. where the senders and recipients do not correspond to the Linux system users. This article describes how to set up a virtual user mail system, i.e. ![]() ![]() Notes: Article duplicates Postfix, Dovecot and Roundcube and mainly consists of config snippets intended to be copy'n'pasted. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |