{"id":1274,"date":"2020-09-23T16:09:08","date_gmt":"2020-09-23T21:09:08","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=1274"},"modified":"2020-09-23T16:09:08","modified_gmt":"2020-09-23T21:09:08","slug":"set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/","title":{"rendered":"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04"},"content":{"rendered":"<div id=\"linux-2862384396\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04.<\/p>\n<ul>\n<li><img decoding=\"async\" class=\"alignright size-full wp-image-1277\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/configure-mail-server-for-ubuntu-18-server-vps-easily-quickly.jpg\" alt=\"\" width=\"120\" height=\"85\" \/>PostfixAdmin is a free web-based interface. With PostfixAdmin, we can configure and manage a Postfix-based email server for many users.<\/li>\n<li>Postfix\u00a0is a Mail Transfer Agent (MTA) that relays mail between different mail servers across the Internet.<\/li>\n<li>Dovecot is a\u00a0popular Local Delivery\u00a0Agent (LDA) that deliver mail received from postfix into their final destinations (mailboxes, programs, etc..)<\/li>\n<\/ul>\n<p>With these three packages combined, your server will be ready to send and receive emails, along with a web-based interface for managing your email server. Let&#8217;s begin.<\/p>\n<p><!--more--><\/p>\n<h2><strong>Requirements:<\/strong><\/h2>\n<ul>\n<li>For the purposes of this tutorial, we will use an Ubuntu 18.04 VPS.<\/li>\n<li>Full SSH root access or a user with sudo privileges is also required.<\/li>\n<\/ul>\n<h2>Step 1 \u2013\u00a0Getting Started<\/h2>\n<p>Connect to your server via SSH as the root user using the following command:<\/p>\n<pre>ssh root@IP_ADDRESS -p PORT_NUMBER<\/pre>\n<p>and replace <span style=\"color: #ff0000;\">IP_ADDRESS<\/span> and <span style=\"color: #ff0000;\">PORT_NUMBER<\/span> with your actual server IP address and SSH port number.<\/p>\n<p>Before starting with the installation you will need to update your system packages to their latest version.<\/p>\n<p>You can do this by running the following command:<\/p>\n<pre>apt-get update \r\napt-get upgrade<\/pre>\n<h2>Step 2 \u2013 Create a System User<\/h2>\n<p>Before we create a system user, we need to install some necessary packages.<\/p>\n<pre>sudo apt-get -y install wget nano dbconfig-common sqlite3<\/pre>\n<p>Now we will create a new system user with the following commands. This user will be the owner of all mailboxes.<\/p>\n<pre>sudo useradd -r -u 150 -g mail -d \/var\/vmail -s \/sbin\/nologin -c \"Virtual Mail User\" vmail\r\nsudo mkdir -p \/var\/vmail\r\nsudo chmod -R 770 \/var\/vmail\r\nsudo chown -R vmail:mail \/var\/vmail<\/pre>\n<h2>Step 3 \u2013 Install PHP 7.3 and All Required PHP Modules<\/h2>\n<p>We will install the latest stable version of PHP 7.3 and all required PHP modules with the following commands:<\/p>\n<pre>apt install software-properties-common python-software-properties\r\nadd-apt-repository ppa:ondrej\/php\r\napt update\r\nsudo apt-get install php7.3 php7.3-cli php7.3-common php-fpm php-cli php7.3-mbstring php7.3-imap php7.3-sqlite3<\/pre>\n<p>Once these are installed, we can then install Nginx, which will serve as our web server for PostfixAdmin.<\/p>\n<h2>Step\u00a04 \u2013 Install and configure Nginx<\/h2>\n<p>To install Nginx from the official Ubuntu repositories, we will run the following command:<\/p>\n<pre>sudo apt-get install nginx<\/pre>\n<p>Now we need to create a new Nginx server block with the following content. First, open the file:<\/p>\n<pre>sudo nano \/etc\/nginx\/sites-available\/<span class=\"skimlinks-unlinked\">postfixadmin.your_domain.com<\/span><\/pre>\n<p>Then add the following:<\/p>\n<pre>server {\r\nlisten 80;\r\nserver_name <span class=\"skimlinks-unlinked\">postfixadmin.your_domain.com<\/span>;\r\nroot \/var\/www\/postfixadmin-3.0;\r\nindex <span class=\"skimlinks-unlinked\">index.php<\/span>;\r\ncharset utf-8;\r\n\r\n\r\nlocation \/ {\r\ntry_files $uri $uri\/ <span class=\"skimlinks-unlinked\">index.php<\/span>;\r\n}\r\n\r\nlocation ~* \\.php$ {\r\nfastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\ninclude fastcgi_params;\r\nfastcgi_pass unix:\/run\/php\/php7.3<span class=\"skimlinks-unlinked\">-fpm.sock<\/span>;\r\nfastcgi_index <span class=\"skimlinks-unlinked\">index.php<\/span>;\r\ninclude fastcgi_params;\r\nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\nfastcgi_buffer_size 16k;\r\nfastcgi_buffers 4 16k;\r\n}\r\n}<\/pre>\n<p>Make sure you replace <span style=\"color: #ff0000;\">your_domain.com<\/span> with your actual registered domain name.<\/p>\n<p>To activate the server block, we will create a symbolic link:<\/p>\n<pre>sudo ln -s \/etc\/nginx\/sites-available\/<span class=\"skimlinks-unlinked\">postfixadmin.your_domain.com<\/span> \/etc\/nginx\/sites-enabled\/<span class=\"skimlinks-unlinked\">postfixadmin.your_domain.com<\/span><\/pre>\n<p>To make Nginx aware of this, we&#8217;ll need to restart it.<\/p>\n<pre>sudo service nginx restart<\/pre>\n<h2>Step 5 \u2013 Install and Configure PostfixAdmin<\/h2>\n<p>PostfixAdmin supports MySQL, PostgreSQL and SQLite databases. In this tutorial, we will use SQLite as our database system.<\/p>\n<p>Now we will download PostfixAdmin and extract it to the <code>\/var\/www\/<\/code> directory:<\/p>\n<pre>wget -q -O - \"<span class=\"skimlinks-unlinked\">http:\/\/downloads.sourceforge.net\/project\/postfixadmin\/postfixadmin\/postfixadmin-3.0\/postfixadmin-3.0.tar.gz<\/span>\" | sudo tar -xzf - -C \/var\/www<\/pre>\n<p>Open the mail configuration file and edit the following values:<\/p>\n<pre>sudo nano \/var\/www\/postfixadmin-3.0\/<span class=\"skimlinks-unlinked\">config.inc.php<\/span><\/pre>\n<pre>$CONF['configured'] = true;\r\n$CONF['database_type'] = 'sqlite';\r\n$CONF['database_name'] = '\/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>';\r\n\/\/ $CONF['database_host'] = 'localhost';\r\n\/\/ $CONF['database_user'] = 'postfix';\r\n\/\/ $CONF['database_password'] = 'postfixadmin';\r\n\/\/ $CONF['database_name'] = 'postfix';\r\n\r\n$CONF['domain_path'] = 'NO';\r\n$CONF['domain_in_mailbox'] = 'YES';<\/pre>\n<p>Now, change the owner for the folder so that it belongs to the web server:<\/p>\n<pre>sudo chown -R www-data: \/var\/www\/postfixadmin-3.0<\/pre>\n<p>We will then create the SQLite database:<\/p>\n<pre>sudo touch \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nsudo chown vmail:mail \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nsudo usermod -a -G mail www-data<\/pre>\n<p>If everything is set up correctly, you should open your browser and go to:<br \/>\n<code>https:\/\/postfixadmin.your_domain.com\/setup.php<\/code><br \/>\nYou should see something like below:<\/p>\n<ul>\n<li>Depends on: SQLite \u2013 OK<\/li>\n<li>Testing database connection \u2013 OK \u2013 sqlite:\/\/:xxxxx@\/\/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span><\/li>\n<\/ul>\n<p>To create a new admin user, run the following command:<\/p>\n<pre>bash \/var\/www\/postfixadmin-3.0\/scripts\/postfixadmin-cli admin add admin@<span class=\"skimlinks-unlinked\">your_domain.com<\/span> --password strong_password --password2 strong_password --superadmin 1 --active 1<\/pre>\n<p>Make sure to replace <span style=\"color: #ff0000;\">strong_password<\/span> with an actual strong password.<\/p>\n<p>If you don&#8217;t want to do this using the command line, you can also create a new admin user from the PostfixAdmin Web Interface.<\/p>\n<h2>Step 6 \u2013 Install and Configure Postfix<\/h2>\n<p>We can install Postfix with the following command:<\/p>\n<pre>sudo apt-get install postfix<\/pre>\n<p>We need to create the following files:<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_maps.cf<\/span><\/pre>\n<p>Add the following to the file:<\/p>\n<pre>dbpath = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nquery = SELECT goto FROM alias WHERE address='%s' AND active = '1'<\/pre>\n<p>Now the next file:<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_domain_maps.cf<\/span><\/pre>\n<p>Add this to it:<\/p>\n<pre>dbpath = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nquery = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = printf('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'<\/pre>\n<p>Save that file, then add the next one:<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_domain_catchall_maps.cf<\/span><\/pre>\n<p>Insert this content into it:<\/p>\n<pre>dbpath = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nquery  = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = printf('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'<\/pre>\n<p>Save and close the file. Let&#8217;s create the next one:<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_domains_maps.cf<\/span><\/pre>\n<p>Add this to the file:<\/p>\n<pre>dbpath = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nquery = SELECT domain FROM domain WHERE domain='%s' AND active = '1'<\/pre>\n<p>Save and close again. Once again, let&#8217;s create the next file that we need.<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_mailbox_maps.cf<\/span><\/pre>\n<p>This is what should be added as the content:<\/p>\n<pre>dbpath = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nquery = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'<\/pre>\n<p>Onto the last file. Create it with this command:<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_domain_mailbox_maps.cf<\/span><\/pre>\n<p>Then add this to it:<\/p>\n<pre>dbpath = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\nquery = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = printf('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'<\/pre>\n<p>Finally, save and close the file.<\/p>\n<p>Now we will edit the\u00a0<em><span class=\"skimlinks-unlinked\">main.cf<\/span>\u00a0<\/em>configuration file by executing the following command:<\/p>\n<pre>postconf -e \"myhostname = $(hostname -A)\"<\/pre>\n<p>We need to edit the file so that it looks like this. We&#8217;re adding all of the files that we just created:<\/p>\n<p>&nbsp;<\/p>\n<pre>postconf -e \"virtual_mailbox_domains = sqlite:\/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_domains_maps.cf<\/span>\"\r\npostconf -e \"virtual_alias_maps =  sqlite:\/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_maps.cf<\/span>, sqlite:\/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_domain_maps.cf<\/span>, sqlite:\/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_domain_catchall_maps.cf<\/span>\"\r\npostconf -e \"virtual_mailbox_maps = sqlite:\/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_mailbox_maps.cf<\/span>, sqlite:\/etc\/postfix\/<span class=\"skimlinks-unlinked\">sqlite_virtual_alias_domain_mailbox_maps.cf<\/span>\"\r\n \r\npostconf -e \"smtpd_tls_cert_file = \/etc\/ssl\/certs\/<span class=\"skimlinks-unlinked\">ssl-cert-snakeoil.pem<\/span>\"\r\npostconf -e \"smtpd_tls_key_file = \/etc\/ssl\/private\/<span class=\"skimlinks-unlinked\">ssl-cert-snakeoil.key<\/span>\"\r\npostconf -e \"smtpd_use_tls = yes\"\r\npostconf -e \"smtpd_tls_auth_only = yes\"\r\n \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\n \r\npostconf -e \"mydestination = localhost\"\r\npostconf -e \"mynetworks = 127.0.0.0\/8\"\r\npostconf -e \"inet_protocols = ipv4\"\r\n \r\npostconf -e \"virtual_transport = lmtp:unix:private\/dovecot-lmtp\"<\/pre>\n<p>Save and close the file once you are done.<\/p>\n<p>Also, we need to edit the <em>master.cf<\/em> file. Open the file like so:<\/p>\n<pre>sudo nano \/etc\/postfix\/<span class=\"skimlinks-unlinked\">master.cf\r\n<\/span><\/pre>\n<p>Find the\u00a0<code><em>submission\u00a0<\/em>inet<em>\u00a0n<\/em><\/code> and <code>smtps<em>\u00a0<\/em>inet<em>\u00a0n<\/em><\/code> sections, and make sure 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=permit_sasl_authenticated,reject\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\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_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>Save and close the file. Now restart the Postfix service and enable it.<\/p>\n<pre>systemctl enable postfix\r\nsystemctl restart postfix<\/pre>\n<h2>Step 7 \u2013 Install and Configure Dovecot<\/h2>\n<p>Now that everything else is set up, we need to install Dovecot with SQLite support:<\/p>\n<pre>sudo apt-get install dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-sqlite<\/pre>\n<p>We need to open the\u00a0<code>\/etc\/dovecot\/conf.d\/10-mail.conf<\/code>\u00a0file and change the following values:<\/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<\/pre>\n<p>We then need to open the\u00a0<code>\/etc\/dovecot\/conf.d\/10-auth.conf<\/code>\u00a0file and change the following values so that it looks like this:<\/p>\n<pre>auth_mechanisms = plain login\r\n#!include <span class=\"skimlinks-unlinked\">auth-system.conf.ext<\/span>\r\n!include <span class=\"skimlinks-unlinked\">auth-sql.conf.ext<\/span><\/pre>\n<p>We will create a new\u00a0<code>dovecot-sql.conf.ext<\/code>\u00a0file:<\/p>\n<pre>sudo nano \/etc\/dovecot\/<span class=\"skimlinks-unlinked\">dovecot-sql.conf.ext<\/span><\/pre>\n<p>Add this as the content:<\/p>\n<pre>driver = sqlite\r\nconnect = \/var\/vmail\/<span class=\"skimlinks-unlinked\">postfixadmin.db<\/span>\r\ndefault_pass_scheme = MD5-CRYPT\r\npassword_query = \\\r\n  SELECT username as user, password, '\/var\/vmail\/%d\/%n' as userdb_home, \\\r\n  'maildir:\/var\/vmail\/%d\/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid \\\r\n  FROM mailbox WHERE username = '%u' AND active = '1'\r\nuser_query = \\\r\n  SELECT '\/var\/vmail\/%d\/%n' as home, 'maildir:\/var\/vmail\/%d\/%n' as mail, \\\r\n  150 AS uid, 8 AS gid, printf('dirsize:storage=', quota) AS quota \\\r\n  FROM mailbox WHERE username = '%u' AND active = '1'<\/pre>\n<p>In the\u00a0<code>\/etc\/dovecot\/conf.d\/10-ssl.conf<\/code>\u00a0file, enable SSL support:<\/p>\n<pre>ssl = yes<\/pre>\n<p>We will open the\u00a0<code>\/etc\/dovecot\/conf.d\/15-lda.conf<\/code>\u00a0file and set the\u00a0<code>postmaster_address<\/code>\u00a0email address.<\/p>\n<pre>postmaster_address = postmaster@<span class=\"skimlinks-unlinked\">vps.your_domain.com<\/span><\/pre>\n<p>Make sure you replace <span style=\"color: #ff0000;\">your_domain.com<\/span> with your domain name.<\/p>\n<p>Also, we need to open the\u00a0<code>\/etc\/dovecot\/conf.d\/10-master.conf<\/code>\u00a0file, find the <code>service lmtp<\/code> section and change it so that it looks like this:<\/p>\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>Then find the <code>service auth<\/code> section and change it to this:<\/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  unix_listener auth-userdb {\r\n    mode = 0600\r\n    user = vmail\r\n    #group = vmail\r\n  }\r\n  user = dovecot\r\n}\r\n<\/pre>\n<p>We will also change the <code>service auth-worker<\/code> section to the following:<\/p>\n<pre>service auth-worker {\r\n  user = vmail\r\n}<\/pre>\n<p>Close the file, and set the permissions:<\/p>\n<pre>chown -R vmail:dovecot \/etc\/dovecot\r\nchmod -R o-rwx \/etc\/dovecot<\/pre>\n<p>Enable and restart the dovecot service:<\/p>\n<pre>systemctl enable dovecot \r\nsystemctl restart dovecot<\/pre>\n<p>If everything is set up correctly, you should be able to log in to your PostfixAdmin Web interface and create your first virtual domain and mailbox.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-1278\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/best-managed-mail-server-support-by-experts-for-linux-server-vps.jpg\" alt=\"\" width=\"120\" height=\"85\" \/>Of course, you don\u2019t have to set up and configure a mail server with PostfixAdmin on your\u00a0Ubuntu 18.04 server\u00a0if you use one of our\u00a0<a title=\"linux vps hosting\" href=\"https:\/\/linuxhostsupport.com\/monthly-server-management.html\" target=\"_blank\" rel=\"noopener noreferrer\">Managed Server Support<\/a>\u00a0services, in which case you can simply ask our expert Linux admins to set up and configure a mail server with PostfixAdmin for you. They are available 24\u00d77 and will take care of your request immediately. This can be especially helpful since setting up a mail server is not the simplest thing.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post, on how to\u00a0Set up a mail server with PostfixAdmin on Ubuntu 18.04,\u00a0 please share it with your friends on the social networks using the buttons below or simply leave a comment in the Comments Section below. Thanks.<\/p><div id=\"linux-1449780651\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04. PostfixAdmin is a free web-based interface. With PostfixAdmin, we can configure and manage a Postfix-based email server for many users. Postfix\u00a0is a Mail Transfer Agent (MTA) that relays mail between different mail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1276,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[168,167,169,20],"class_list":["post-1274","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-dovecot","tag-postfix","tag-postfixadmin","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.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:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 | LinuxHostSupport\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-23T21:09:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04\",\"datePublished\":\"2020-09-23T21:09:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\"},\"wordCount\":988,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg\",\"keywords\":[\"dovecot\",\"Postfix\",\"postfixadmin\",\"ubuntu\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\",\"name\":\"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg\",\"datePublished\":\"2020-09-23T21:09:08+00:00\",\"author\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04.\",\"breadcrumb\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg\",\"contentUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg\",\"width\":750,\"height\":410},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/linuxhostsupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 | LinuxHostSupport","description":"In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.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:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 | LinuxHostSupport","og_description":"In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04.","og_url":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2020-09-23T21:09:08+00:00","og_image":[{"width":750,"height":410,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04","datePublished":"2020-09-23T21:09:08+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/"},"wordCount":988,"commentCount":0,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg","keywords":["dovecot","Postfix","postfixadmin","ubuntu"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/","url":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/","name":"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04 | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg","datePublished":"2020-09-23T21:09:08+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"In this tutorial, we will cover the steps needed for installing a mail server using Postfix, Dovecot, SQLite, and PostfixAdmin on Ubuntu 18.04.","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/09\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04.jpg","width":750,"height":410},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/set-up-a-mail-server-with-postfixadmin-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Set up a Mail Server With PostfixAdmin on Ubuntu 18.04"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=1274"}],"version-history":[{"count":3,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1274\/revisions"}],"predecessor-version":[{"id":1289,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1274\/revisions\/1289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/1276"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=1274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=1274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=1274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}