This tutorial will guide you on how to install and configure a complete mail server with Postfix in Debian 9 release. It will also cover how to configure accounts mailboxes using Dovecot in order to retrieve and compose mails via IMAP protocol. The users will use Rainloop Webmail interface as the mail user agent to handle mail. In the first step, login to your machine with an account with root privileges or directly with the root user and make sure your Debian system is up to date with the latest security patches and software and packages releases, by issuing the following command. On the next step install the following software packages that will be used for system administration, by issuing the following command.
|Country:||United Arab Emirates|
|Published (Last):||24 September 2006|
|PDF File Size:||8.9 Mb|
|ePub File Size:||10.9 Mb|
|Price:||Free* [*Free Regsitration Required]|
For a different Linux distribution or different mail server, review our email tutorials. Verify that the iptables firewall is not blocking any of the standard mail ports 25 , , , , , , and If using a different form of firewall, confirm that it is not blocking any of the needed ports.
Review the concepts in the Running a Mail Server guide. Make sure that the MX record is changed for all domains and subdomains that might receive email. If setting up a brand new domain, these steps can be performed prior to configuring the mail server. In the example below, You will need to install a SSL certificate on your mail server prior to completing the Dovecot configuration steps. Certbot will ask for information about the site. The responses will be saved as part of the certificate:.
It is recommended that you select this option. If you have a firewall configured on your Linode, you can add a firewall rule to allow incoming and outgoing connections to the HTTPS service. On CentOS, firewalld is the default tool for managing firewall rules. Make a note of the certificate and key locations on the Linode. You will need the path to each during the Dovecot configuration steps. In this section you will set up a MariaDB database to store virtual domains, users and passwords.
Dovecot and Postfix require this data. This tool will ask if you want to set a new password for the MySQL root user, but you can skip that step:. Create the MySQL user and grant the new user permissions over the database. Replace mailuserpass with a secure password:. Replace the values for example. Replace the email address values with the addresses that you wish to configure on the mailserver.
Replace the password values with strong passwords. An email alias will forward all email from one email address to another. In the previous section, data was added to the MySQL mailserver database. The steps below will test that the data has been stored and can be retrieved. Your hashed passwords will appear longer than they are displayed below:. It is highly configurable, allowing for great flexibility. Make a copy of the default Postfix configuration file in case you need to revert to the default configuration:.
Replace occurrences of example. The main. Postfix will use this data to identify all domains, corresponding mailboxes, and valid users. This password was created in the Creating the Database and Tables section.
If you used a different name for your database user and dbname replace those with your own values:. Replace example. The command should return 1 if it is successful:. You should receive 1 as the output:. The command should return the destination value for the row:. The configuration file master. The rest of the file can remain unchanged:.
In this section, configure Dovecot to force users to use SSL when they connect so that their passwords are never sent to the server in plain text. Create the vmail group with ID Add a new user vmail to the vmail group. This system user will read mail from the server. Ensure your file contains the following lines and that they are uncommented:. Add the following variables and replace the values with the excerpt example. Replace dbname , user and password with your own MySQL database values:.
Uncomment the port and ssl variables:. In the service auth-worker section, uncomment the user line and set it to vmail :. Now you can test to see what the users of your email server would see with their email clients. Test the mailbox by using a simple mail client.
For this test, using mutt is recommended. If it is not installed by default, install it with yum install mutt , then run:. To quit mutt press q. You can set up an email client to connect to your mail server. Many clients detect server settings automatically. Manual configuration requires the following parameters:. See Install SquirrelMail on Ubuntu To add new domains, email addresses, and aliases to the mailserver you will need to update the corresponding MySQL tables created in the MySQL section of this guide.
To add a new domain, connect to your Linode via SSH. View the contents of the table before adding new entries. Add a new email address to the existing table. Verify that the new email address has been added. The new email address should be displayed in the output:. Add a new alias. Replace newdomain.
This value is the source of the alias. You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials. Find answers, ask questions, and help others. Your feedback is important to us. Let us know if this guide helped you find the answer you were looking for. Sign Up Here!
This guide may involve or result in sending email. In an effort to fight spam, Linode restricts outbound connections on ports 25, , and on all Linodes for new accounts created after November 5th, For more information, please see Sending Email on Linode.
Certbot recommends pointing your web server configuration to the default certificates directory or creating symlinks. Keys and certificates should not be moved to a different directory. Note which id corresponds to which domain, the id value is necessary for the next two steps.
Do not forget to execute "postfix reload" after editing this file. Protocols we want to be serving. When editing the file, be careful not to remove any opening or closing curly braces.
Given the possibility of hosting a large number of virtual domains on a single mail system, the username portion of an email address i.
When email users authenticate to the server, they must supply their email clients with the entire email address created above as their username.
In the example, we are creating an email address for newdomain. Search guides and tutorials. RSS feed. Was This Guide Helpful? Take the Survey. Image Detail. Postfix master process configuration file. Dovecot configuration file
Construction pas à pas d’un serveur d’e-mail entrant basé sur Debian, Postfix et Spamassassin.
This is the current edition for Ubuntu Ubuntu serverguides for previous LTS versions: There you can share your comments or let us know about bugs with each page. Download this guide as a PDF. There are a couple of different ways that Ubuntu Server Edition is supported: commercial support and community support.
Email with Postfix, Dovecot and MariaDB on CentOS 7
The server will process mails for only one domain, and every existing user on the server will have a mail box inside his home directory. What we don't want is an open mail relay. We only want trusted users to send emails, to prevent anonymous clients from sending spam. Postfix authentication for clients can be handled by SASL. SASL is a standard protocol to provide an authentication layer.
Install a Complete Mail Server with Postfix and Webmail in Debian 9
On choisit un serveur. Mettre toutes les lignes actives en commentaire et ajouter ceci:. Ajouter la ligne suivante en haut du fichier:. Taper q pour quitter. On va mettre des aliases. On va maintenant configurer Postfix. Les deux fichiers principaux sont master.
Get the latest tutorials on SysAdmin and open source topics. Write for DigitalOcean You get paid, we donate to tech non-profits. DigitalOcean Meetups Find and meet other developers in your city. By finid and Kathleen Juell.