We have created the three tables successfully. CREATE TABLE `virtual_users` (įOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADEįinally we are going to create a virtual aliases table to specify all the emails that you are going to forward to the other email. It is necessary to associate each user with a domain. Here you will add the email address and passwords. ![]() We are going to create a table to introduce the users. We are going to create a table for the specific domains recognized as authorized domains. mysql > GRANT SELECT ON servermail.* TO IDENTIFIED BY 'mailpassword' Īfter that, we need to reload MySQL privileges to ensure it applies those permissions successfully: mysql > FLUSH PRIVILEGES įinally we need to use the database for creating tables and introduce our data: mysql> USE servermail Log in as MySQL root user mysql -u root -pĮnter your MySQL root's password if it's successful you will see: mysql >įirst we need to create a new user, specific for mail authentication, and we are going to give SELECT permission. We are going to name the database servermail, but you can use whatever name you want. Step 2: Create a MySQL Database, Virtual Domains, Users and AliasesĪfter the installation finishes, we are going to create a MySQL database to configure three different tables: one for domains, one for users and the last one for aliases. Postfix configuration will ask about System mail name – you could use your FDQN or main domain. When Postfix configuration is prompted choose Internet Site: Step 1: Install Packages apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql ![]() Once it's successful, you will see that $ symbol changes to #. Installing packages as the root user is useful because you have all privileges. Optional: SSL certificate ( setup free signed ssl certificate) *Configure and identify your FQDN ( setup FQDN) * User with root privileges ( setup new users- omit step 5) * MySQL installed and configured ( setup mysql) * Domain is forwarding to your server ( setup domain) Prerequisitesīefore setting up your mail server, it's necessary your VPS has the following: ![]() Moreover, your virtual server will be secure from spam hub. In this tutorial, we are going to configure a mail server using Postfix, Dovecot, MySQL and SpamAssassin on Ubuntu 12.04.įollowing this tutorial you'll be able to add virtual domains, users, and aliases.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |