{"id":33806,"date":"2020-08-18T12:17:51","date_gmt":"2020-08-18T17:17:51","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=33806"},"modified":"2022-06-03T03:32:47","modified_gmt":"2022-06-03T08:32:47","slug":"how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/","title":{"rendered":"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-34083\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we&#8217;ll be covering the process of setting up a mail server with Postfix, Dovecot, Postfixadmin and MariaDB on an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 20.04 VPS<\/a>. But first, what is PostfixAdmin?<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-34087\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/configure-mail-server-postfix-dovecot-with-postfixadmin-web-interface-for-ubuntu-20-04-vps.jpg\" alt=\"\" width=\"125\" height=\"89\" \/>PostfixAdmin is an open-source web-based application written in PHP that&#8217;s used to create virtual domains and email accounts for a <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/\">Postfix mail server<\/a>. Using PostfixAdmin, we can manage mailboxes &amp; aliases, set quotas, configure vacation\/out-of-the-office messages, and more. Plus, the web-based interface gives you the user-friendliness of a browser window with a UI.<\/p>\n<p>PostfixAdmin allows us to use virtual email addresses and virtual mailboxes, so we do not need to create a new system user account for each email address. Considering all of these details, PostfixAdmin is a versatile tool and can be used for almost all of your mailing needs. This tutorial goes quite in-depth and may take some time to configure everything properly. Let\u2019s get started with the installation steps.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e73698abf18\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e73698abf18\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#HardwareSoftware-Requirements\" >Hardware\/Software Requirements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-1-Getting-Started\" >Step 1. Getting Started<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-2-Create-a-System-User-Account\" >Step 2. Create a System User Account<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-3-Install-PHP-Apache-and-Required-Extensions\" >Step 3. Install PHP, Apache and Required Extensions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-4-Install-MariaDB-Server\" >Step 4. Install MariaDB Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-5-Install-Postfix\" >Step 5. Install Postfix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-6-Install-Dovecot\" >Step 6. Install Dovecot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#Step-7-Install-PostfixAdmin\" >Step 7. Install PostfixAdmin<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"HardwareSoftware-Requirements\"><\/span>Hardware\/Software Requirements<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>An Ubuntu 20.04 server\u00a0or VPS with root access enabled, or a user with <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-users-and-manage-their-sudo-privileges-on-ubuntu\/\">sudo privileges<\/a>. We provide all of our users will full root access on their VPSes.<\/li>\n<li>Postfix mail transfer agent (MTA) and Dovecot IMAP\/POP3 Mail Delivery Agent need to be installed.<\/li>\n<li>A database server (MySQL\/MariaDB, PostgreSQL or SQLite) needs to be installed.<\/li>\n<li>Apache web server needs to be installed with the <code>mod_rewrite<\/code> module enabled.<\/li>\n<li>PHP 7.1 or greater must be installed with the\u00a0<code>imap<\/code>, <code>mbstring<\/code> and <code>mysql<\/code> extensions all enabled.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Getting-Started\"><\/span><span id=\"Step-1-Log-in-and-Update-Packages\" class=\"ez-toc-section\"><\/span>Step 1. Getting Started<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To begin, we\u2019re going to need to log into our server using SSH. You can do that by entering this command:<\/p>\n<pre>ssh root@<span style=\"color: #ff0000;\">IP_Address<\/span> -p <span style=\"color: #ff0000;\">Port_Number<\/span><\/pre>\n<p>Remember to replace \u201croot\u201d with your username if you are not using the root user. Change the values in <span style=\"color: #ff0000;\">red<\/span> according to your server\u2019s IP address and SSH port number (the default number is 22, so try that first unless your server uses a custom port number).<\/p>\n<p>Once you are logged in, you should update all of your packages to their latest available versions.<\/p>\n<pre>apt-get update -y\r\napt-get upgrade -y<\/pre>\n<p>Once all the packages are up-to-date, restart your server to apply the configuration changes and ensure that all software is running on their latest versions.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Create-a-System-User-Account\"><\/span>Step 2. Create a System User Account<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PostfixAdmin has the ability to create multiple virtual domains, users and aliases. This saves us the hassle of having to create new system users whenever we need a new email account added. For security reasons, we will create a new user named &#8216;vmail&#8217; with permissions to store the emails in the <code>\/var\/vmail<\/code> directory:<\/p>\n<pre>useradd -r -u 150 -g mail -d \/var\/vmail -s \/sbin\/nologin -c \"Virtual Mail User\" vmail\r\nmkdir -p \/var\/vmail\r\nchmod -R 770 \/var\/vmail\r\nchown -R vmail:mail \/var\/vmail<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Install-PHP-Apache-and-Required-Extensions\"><\/span>Step 3. Install PHP, Apache and Required Extensions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PHP 7.4 and Apache2 are included in the default Ubuntu repository for 20.04. We can install Apache 2, PHP 7.4 and the required PHP extensions using the following command. We also included the required PHP and Apache modules in the command:<\/p>\n<pre>apt-get install apache libapache2-mod-php php php-common php-mbstring php-imap php-mysql<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Install-MariaDB-Server\"><\/span>Step 4. Install MariaDB Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PostfixAdmin requires a database in order to be able to store the email account and domain information. For the purpose of this tutorial, we will use a MariaDB database system, an open-source version of MySQL that maintains feature parity. We can install the MariaDB server using the following command:<\/p>\n<pre>apt-get install mariadb-server mariadb-client mariadb-common<\/pre>\n<p>Start the MariaDB service and enable it to start on server boot using the following commands:<\/p>\n<pre>systemctl start mariadb \r\nsystemctl enable mariadb\r\n<\/pre>\n<p>In order to improve the security of your MariaDB installation, run the <code>mysql_secure_installation<\/code> script:<\/p>\n<pre>mysql_secure_installation<\/pre>\n<p>When prompted, you can set the MariaDB root password and\u00a0safely\u00a0answer &#8216;Y&#8217; to all questions.<\/p>\n<pre>Enter current password for root (enter for none): Just press the [Enter] key since there is no default password\r\nSet root password? [Y\/n]: Y\r\nNew password: Enter a strong password\r\nRe-enter new password: Repeat the same password from before\r\nRemove anonymous users? [Y\/n]: Y\r\nDisallow root login remotely? [Y\/n]: Y\r\nRemove test database and access to it? [Y\/n]: Y\r\nReload privilege tables now? [Y\/n]: Y\r\n<\/pre>\n<p>If you followed the above steps, then you will have a password set for the MariaDB root user.<\/p>\n<p>Run this command to access the MySQL console:<\/p>\n<pre>mysql -u root -p<\/pre>\n<p>And enter the root password you set previously using the <code>mysql_secure_installation<\/code> script. If you chose not to run that script, there is no password set, so you just need to press the [Enter] key once.<\/p>\n<p>Next, create a MariaDB user and database for PostfixAdmin:<\/p>\n<pre>MariaDB [(none)]&gt; CREATE USER 'postfixadmin'@'localhost' IDENTIFIED BY '<span style=\"color: #ff0000;\">Strong_Password<\/span>';\r\nMariaDB [(none)]&gt; CREATE DATABASE postfixadmin;\r\nMariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON postfixadmin.* TO 'postfixadmin'@'localhost';\r\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\r\nMariaDB [(none)]&gt; \\q<\/pre>\n<p>Do not forget to replace &#8216;<span style=\"color: #ff0000;\">Strong_Password<\/span>&#8216; with a good and unique password.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Install-Postfix\"><\/span>Step 5. Install Postfix<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install Postfix and <code>postfix-mysql<\/code> packages by running the command below:<\/p>\n<pre>apt-get install postfix postfix-mysql<\/pre>\n<p>During the Postfix installation, you will be asked for the type of mail configuration. Select &#8216;Internet Site&#8217; and click on OK to continue. Then, enter the server&#8217;s hostname in the &#8216;system mail name&#8217; field.<\/p>\n<p>Once the Postfix installation is complete, we have to create several Postfix configuration files. This will take a while as there are quite a few files that have to be made and configured.<\/p>\n<pre>mkdir -p \/etc\/postfix\/sql\/<\/pre>\n<p>Define the database connection settings for querying the virtual alias domain catchall maps by creating this file. We&#8217;re using <code>vi<\/code>, but you can use any text editor that you prefer:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_alias_domain_catchall_maps.cf<\/pre>\n<p>Once the file is created, insert these contents:<\/p>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'\r\n<\/pre>\n<p>Create this file so we can set the database connection settings for querying the virtual alias domain mailbox maps:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_alias_domain_mailbox_maps.cf<\/pre>\n<p>Then insert these contents:<\/p>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'\r\n<\/pre>\n<p>After that, define the database connection settings for querying the virtual alias domain maps by creating this file:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_alias_domain_maps.cf<\/pre>\n<p>Add the following:<\/p>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'\r\n<\/pre>\n<p>The next settings are for the database connection settings for querying the virtual alias maps. Create this file:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_alias_maps.cf<\/pre>\n<p>Add this text:<\/p>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT goto FROM alias WHERE address='%s' AND active = '1'\r\n<\/pre>\n<p>There are a few more to go. Now, create a file for the database connection settings for querying the virtual domain maps:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_domains_maps.cf<\/pre>\n<p>Make sure you set the passwords on all of these files that you have been adding. Add the contents:<\/p>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT domain FROM domain WHERE domain='%s' AND active = '1'\r\n<\/pre>\n<p>Onto the next file. Create it and add the database connection settings for querying the virtual mailbox limit maps:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_mailbox_limit_maps.cf<\/pre>\n<p>Insert this and change the password:<\/p>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'\r\n<\/pre>\n<p>Finally, create this file and add the database connection settings for querying the virtual mailbox maps:<\/p>\n<pre>vi \/etc\/postfix\/sql\/mysql_virtual_mailbox_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = <span style=\"color: #ff0000;\">Strong_Password<\/span>\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'\r\n<\/pre>\n<p><strong>NOTE<\/strong>:\u00a0Do not forget to replace &#8216;<span style=\"color: #ff0000;\">Strong_Password<\/span>&#8216; with your own password in all of the configuration files above.<\/p>\n<p>Modify the <code>main.cf<\/code> Postfix configuration file, which is the core of the Postfix configuration. Run these commands to edit each setting:<\/p>\n<pre>postconf -e \"myhostname = $(hostname -f)\"\r\npostconf -e \"virtual_mailbox_domains = proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_domains_maps.cf\"\r\npostconf -e \"virtual_alias_maps = proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_alias_maps.cf, proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_alias_domain_maps.cf, proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_alias_domain_catchall_maps.cf\"\r\npostconf -e \"virtual_mailbox_maps = proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_mailbox_maps.cf, proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_alias_domain_mailbox_maps.cf\"\r\npostconf -e \"smtpd_tls_cert_file = \/etc\/ssl\/certs\/ssl-cert-snakeoil.pem\"\r\npostconf -e \"smtpd_tls_key_file = \/etc\/ssl\/private\/ssl-cert-snakeoil.key\"\r\npostconf -e \"smtpd_use_tls = yes\"\r\npostconf -e \"smtpd_tls_auth_only = yes\"\r\npostconf -e \"smtpd_sasl_type = dovecot\"\r\npostconf -e \"smtpd_sasl_path = private\/auth\"\r\npostconf -e \"smtpd_sasl_auth_enable = yes\"\r\npostconf -e \"smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination\"\r\npostconf -e \"mydestination = localhost\"\r\npostconf -e \"mynetworks = 127.0.0.0\/8\"\r\npostconf -e \"inet_protocols = ipv4\"\r\npostconf -e \"inet_interfaces = all\"\r\npostconf -e \"virtual_transport = lmtp:unix:private\/dovecot-lmtp\"<\/pre>\n<p>We can also install Certbot, then <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-ssl-on-ubuntu-18-04-with-nginx\/\" target=\"_blank\" rel=\"noopener noreferrer\">install a new Let&#8217;s encrypt SSL certificate<\/a> for the server hostname and replace <code>\/etc\/ssl\/certs\/ssl-cert-snakeoil.pem<\/code> and <code>\/etc\/ssl\/private\/ssl-cert-snakeoil.key<\/code> with the newly created SSL certificate and public key files.<\/p>\n<p>Then, edit the the\u00a0<code>master.cf<\/code> Postfix configuration file, and modify it as follows:<\/p>\n<pre>vi \/etc\/postfix\/master.cf<\/pre>\n<p>Add or change the contents so that the file looks like this:<\/p>\n<pre>smtp inet n - y - - smtpd\r\n#smtp inet n - y - 1 postscreen\r\n#smtpd pass - - y - - smtpd\r\n#dnsblog unix - - y - 0 dnsblog\r\n#tlsproxy unix - - y - 0 tlsproxy\r\nsubmission inet n - y - - smtpd\r\n-o syslog_name=postfix\/submission\r\n-o smtpd_tls_security_level=encrypt\r\n-o smtpd_sasl_auth_enable=yes\r\n# -o smtpd_reject_unlisted_recipient=no\r\n# -o smtpd_client_restrictions=$mua_client_restrictions\r\n# -o smtpd_helo_restrictions=$mua_helo_restrictions\r\n# -o smtpd_sender_restrictions=$mua_sender_restrictions\r\n# -o smtpd_recipient_restrictions=\r\n# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\r\n-o smtpd_client_restrictions=permit_sasl_authenticated,reject\r\n-o milter_macro_daemon_name=ORIGINATING\r\nsmtps inet n - y - - smtpd\r\n-o syslog_name=postfix\/smtps\r\n# -o smtpd_tls_wrappermode=yes\r\n-o smtpd_sasl_auth_enable=yes\r\n# -o smtpd_reject_unlisted_recipient=no\r\n-o smtpd_client_restrictions=permit_sasl_authenticated,reject\r\n# -o smtpd_client_restrictions=$mua_client_restrictions\r\n# -o smtpd_helo_restrictions=$mua_helo_restrictions\r\n# -o smtpd_sender_restrictions=$mua_sender_restrictions\r\n# -o smtpd_recipient_restrictions=\r\n# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\r\n-o milter_macro_daemon_name=ORIGINATING<\/pre>\n<p>Enable the Postfix service to start on server boot and restart the Postfix service:<\/p>\n<pre>systemctl enable postfix\r\nsystemctl restart postfix<\/pre>\n<p>Postfix is finally installed and configured.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-6-Install-Dovecot\"><\/span>Step 6. Install Dovecot<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Dovecot is a Mail Delivery Agent which allows a user to receive emails in complete security through IMAP and\/or POP3 protocols. We can install Dovecot and the <code>dovecot-mysql<\/code> package using the command below:<\/p>\n<pre>apt-get install dovecot-core dovecot-lmtpd dovecot-imapd dovecot-pop3d dovecot-mysql<\/pre>\n<p>Edit the <code>\/etc\/dovecot\/conf.d\/10-mail.conf<\/code> file:<\/p>\n<pre>vi \/etc\/dovecot\/conf.d\/10-mail.conf<\/pre>\n<p>Insert this as the content:<\/p>\n<pre>mail_location = maildir:\/var\/vmail\/%d\/%n\r\nmail_privileged_group = mail\r\nmail_uid = vmail\r\nmail_gid = mail\r\nfirst_valid_uid = 150\r\nlast_valid_uid = 150\r\n<\/pre>\n<p>Open the <code>\/etc\/dovecot\/conf.d\/10-auth.conf<\/code> file:<\/p>\n<pre>vi \/etc\/dovecot\/conf.d\/10-auth.conf<\/pre>\n<p>Edit it so that the file looks like this:<\/p>\n<pre>auth_mechanisms = plain login\r\n#!include auth-system.conf.ext\r\n!include auth-sql.conf.ext\r\n<\/pre>\n<p>Then edit the\u00a0<code>dovecot-sql.conf.ext<\/code> file, and add these lines:<\/p>\n<pre>vi \/etc\/dovecot\/dovecot-sql.conf.ext<\/pre>\n<pre>driver = mysql\r\nconnect = host=localhost dbname=postfixadmin user=postfixadmin password=<span style=\"color: #ff0000;\">Strong_Password<\/span>\r\ndefault_pass_scheme = MD5-CRYPT\r\npassword_query = SELECT username as user, password, '\/var\/vmail\/%d\/%n' as userdb_home, 'maildir:\/var\/vmail\/%d\/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'\r\nuser_query = SELECT '\/var\/vmail\/%d\/%u' as home, 'maildir:\/var\/vmail\/%d\/%u' as mail, 150 AS uid, 8 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'<\/pre>\n<p>Do not forget to replace <span style=\"color: #ff0000;\">Strong_Password<\/span> with the actual password that you set previously in Step 4 when creating the MariaDB user.<\/p>\n<p>Edit the <code>\/etc\/dovecot\/conf.d\/10-ssl.conf<\/code> file, and enable SSL support:<\/p>\n<pre>vi \/etc\/dovecot\/conf.d\/10-ssl.conf<\/pre>\n<pre>ssl = yes<\/pre>\n<p>Save and close that file, then edit the <code>\/etc\/dovecot\/conf.d\/15-lda.conf<\/code> file and set the <code>postmaster_address<\/code>\u00a0email address.<\/p>\n<pre>vi \/etc\/dovecot\/conf.d\/15-lda.conf<\/pre>\n<pre>postmaster_address = postmaster@<span style=\"color: #ff0000;\">yourdomain.com<\/span><\/pre>\n<p>Make sure that you change <span style=\"color: #ff0000;\">yourdomain.com<\/span> to the actual domain name that points to your server.<\/p>\n<p>Edit the <code>\/etc\/dovecot\/conf.d\/10-master.conf<\/code> file, find the <code>service lmtp<\/code> section and replace it with the following lines:<\/p>\n<pre>vi \/etc\/dovecot\/conf.d\/10-master.conf<\/pre>\n<pre>service lmtp {\r\n     unix_listener \/var\/spool\/postfix\/private\/dovecot-lmtp {\r\n     mode = 0600\r\n     user = postfix\r\n     group = postfix\r\n     }\r\n}\r\n<\/pre>\n<p>Once that part is edited, find the <code>service auth<\/code> section and replace it with the following snippet:<\/p>\n<pre>service auth {\r\n     unix_listener \/var\/spool\/postfix\/private\/auth {\r\n     mode = 0666\r\n     user = postfix\r\n     group = postfix\r\n}\r\n\r\nunix_listener auth-userdb {\r\n     mode = 0600\r\n     user = vmail\r\n\r\n}\r\nuser = dovecot\r\n}\r\n\r\n<\/pre>\n<p>Then change the <code>service auth-worker<\/code> section to the following:<\/p>\n<pre>service auth-worker {\r\nuser = vmail\r\n}<\/pre>\n<p>Save and close the file.<\/p>\n<p>Set the correct permissions of the Dovecot configuration files:<\/p>\n<pre>chown -R vmail:dovecot \/etc\/dovecot \r\nchmod -R o-rwx \/etc\/dovecot<\/pre>\n<p>Enable the Dovecot service to start on server boot, and restart Dovecot so that all of these new configuration files are in effect:<\/p>\n<pre>systemctl enable dovecot\r\nsystemctl restart dovecot<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-7-Install-PostfixAdmin\"><\/span>Step 7. Install PostfixAdmin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now that all of our required software is installed and configured, let&#8217;s install and configure PostfixAdmin and finish this tutorial.<\/p>\n<p>Download the latest available version of PostfixAdmin from Github and extract it in the <code>\/var\/www\/html\/postfixadmin<\/code>\u00a0directory.<\/p>\n<pre>apt-get install git\r\ncd  \/var\/www\/html\/\r\ngit clone https:\/\/github.com\/postfixadmin\/postfixadmin.git\r\n<\/pre>\n<p>Edit the <code>\/var\/www\/html\/postfixadmin\/config.local.php<\/code> file and add these lines:<\/p>\n<pre>vi \/var\/www\/html\/postfixadmin\/config.local.php<\/pre>\n<pre>&lt;?php\r\n$CONF['database_type'] = 'mysqli';\r\n$CONF['database_host'] = 'localhost';\r\n$CONF['database_user'] = 'postfixadmin';\r\n$CONF['database_password'] = '<span style=\"color: #ff0000;\">Strong_Password<\/span>';\r\n$CONF['database_name'] = 'postfixadmin';\r\n$CONF['configured'] = true;\r\n$CONF['encrypt'] = 'md5crypt';\r\n?&gt;\r\n<\/pre>\n<p>Replace <span style=\"color: #ff0000;\">Strong_Password<\/span> with the MariaDB user password.<\/p>\n<pre>mkdir \/var\/www\/html\/postfixadmin\/templates_c\r\n\r\nchown -R www-data: \/var\/www\/html\/postfixadmin<\/pre>\n<p>Open <code>http:\/\/your_server_IP\/postfixadmin\/public\/setup.php<\/code> . Check if everything is okay and make sure that there are no errors:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-33816\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-1-296x300.png\" alt=\"\" width=\"296\" height=\"300\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-1-296x300.png 296w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-1-148x150.png 148w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-1.png 435w\" sizes=\"(max-width: 296px) 100vw, 296px\" \/><\/p>\n<p>Scroll down and enter your new setup password twice. Make sure to choose a strong one:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-33817\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-2-300x150.png\" alt=\"\" width=\"300\" height=\"150\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-2-300x150.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-2-150x75.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-2.png 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Then click on the &#8216;Generate password hash&#8217; button.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-33818\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-3-300x83.png\" alt=\"\" width=\"300\" height=\"83\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-3-300x83.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-3-150x42.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-3.png 726w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Edit the <code>config.local.php<\/code> file and add the generated hash to it:<\/p>\n<pre>$CONF['setup_password'] = '0584cbe2b03cad2e29c8be0127361e37:d41ceb2689b747cf143d1809aec7b8e6bdde983e';<\/pre>\n<p>Replace the hash shown in the example with the one generated for your instance.<\/p>\n<p>Save the <code>config.local.php<\/code> file, open the setup page once again and create a PostfixAdmin admin user account. The setup password in that page is the same password you used in the previous step, so fill the other required fields such as the admin email address and password, then click on the &#8216;Add admin&#8217; button.<\/p>\n<p>That\u2019s it! The PostfixAdmin installation is complete.<\/p>\n<p>Open <code>http:\/\/your_server_IP\/postfixadmin\/login.php<\/code> in your preferred web browser. You&#8217;ll see the login page:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-33819\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-4-300x119.png\" alt=\"\" width=\"300\" height=\"119\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-4-300x119.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-4-150x60.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-4-768x306.png 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-4.png 1013w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Log in as the admin user and add the domains hosted on the server:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-33820\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-5-300x169.png\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-5-300x169.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-5-150x85.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-5.png 577w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Once you do that, then you can create email addresses, set a mail quota, and so on:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-medium wp-image-33821\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-6-300x178.png\" alt=\"\" width=\"300\" height=\"178\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-6-300x178.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-6-150x89.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/postfixadmin-6.png 560w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>That is everything you&#8217;ll need to install, configure, and start using your PostfixAdmin install on your Ubuntu 20.04 VPS.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-34088\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/best-managed-mail-server-support-postfix-dovecot-postfixadmin-maintenance-by-expert-team.jpg\" alt=\"\" width=\"125\" height=\"89\" \/>This install process is very involved and is quite easy to mess up and end up with a botched install of Postfix, Dovecot, or both. However, if you have a <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Managed Ubuntu VPS hosting<\/a> with us, you won&#8217;t need to do anything more than ask us to install it for you, Our team of support experts will completely install and configure all aspects of your server so that Postfix, Dovecot, and PostfixAdmin all work flawlessly. They can also help set up routine maintenance and optimize your server to maximize its speed.<\/p>\n<p>We would appreciate you sharing this on social media if you found this tutorial useful. Or, you can write a comment letting us know how the install went, and if PostfixAdmin helped you manage your mail server more easily. Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we&#8217;ll be covering the process of setting up a mail server with Postfix, Dovecot, Postfixadmin and MariaDB &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#more-33806\" aria-label=\"Read more about How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":34083,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1706,13,1698],"tags":[15,384,220,1471,59],"class_list":["post-33806","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-email-servers","category-tutorials","category-ubuntu","tag-mail","tag-mail-server","tag-postfix","tag-postfixadmin","tag-ubuntu","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install a Mail Server With PostflixAdmin on Ubuntu 20.04<\/title>\n<meta name=\"description\" content=\"In this tutorial, explained in details is how to install a mail server with Postflixadmin on Ubuntu 20.04.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04\" \/>\n<meta property=\"og:description\" content=\"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-18T17:17:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:32:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04\",\"datePublished\":\"2020-08-18T17:17:51+00:00\",\"dateModified\":\"2022-06-03T08:32:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/\"},\"wordCount\":1589,\"commentCount\":38,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg\",\"keywords\":[\"mail\",\"mail-server\",\"postfix\",\"PostfixAdmin\",\"ubuntu\"],\"articleSection\":[\"Email Servers\",\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/\",\"name\":\"How to Install a Mail Server With PostflixAdmin on Ubuntu 20.04\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg\",\"datePublished\":\"2020-08-18T17:17:51+00:00\",\"dateModified\":\"2022-06-03T08:32:47+00:00\",\"description\":\"In this tutorial, explained in details is how to install a mail server with Postflixadmin on Ubuntu 20.04.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install a Mail Server With PostflixAdmin on Ubuntu 20.04","description":"In this tutorial, explained in details is how to install a mail server with Postflixadmin on Ubuntu 20.04.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04","og_description":"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2020-08-18T17:17:51+00:00","article_modified_time":"2022-06-03T08:32:47+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04","datePublished":"2020-08-18T17:17:51+00:00","dateModified":"2022-06-03T08:32:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/"},"wordCount":1589,"commentCount":38,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg","keywords":["mail","mail-server","postfix","PostfixAdmin","ubuntu"],"articleSection":["Email Servers","Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/","name":"How to Install a Mail Server With PostflixAdmin on Ubuntu 20.04","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg","datePublished":"2020-08-18T17:17:51+00:00","dateModified":"2022-06-03T08:32:47+00:00","description":"In this tutorial, explained in details is how to install a mail server with Postflixadmin on Ubuntu 20.04.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/08\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-a-mail-server-with-postfixadmin-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install a Mail Server with PostfixAdmin on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=33806"}],"version-history":[{"count":19,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33806\/revisions"}],"predecessor-version":[{"id":40996,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33806\/revisions\/40996"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/34083"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=33806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=33806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=33806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}