{"id":22217,"date":"2017-05-11T08:31:14","date_gmt":"2017-05-11T13:31:14","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=22217"},"modified":"2022-06-03T03:42:10","modified_gmt":"2022-06-03T08:42:10","slug":"set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/","title":{"rendered":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-22223\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg\" alt=\"mail server with postfixadmin and mariadb on centos\" width=\"1200\" height=\"600\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg 1200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-768x384.jpg 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-1024x512.jpg 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-860x430.jpg 860w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-680x340.jpg 680w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-500x250.jpg 500w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-400x200.jpg 400w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-200x100.jpg 200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7-50x25.jpg 50w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>In this guide, we will explain how to setup and configure a mail server with PostfixAdmin, Postfix, Dovecot, MariaDB and SpamAssasin on a <a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\">CentOS VPS<\/a>. PostfixAdmin is a PHP-based web front-end that allows you to manage virtual domains and users for a Postfix mail transport agent. This guide should work on other Linux VPS systems as well but was tested and written for a CentOS 7 VPS.<\/p>\n<p><!--more--><\/p>\n<p>If you use an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Ubuntu VPS<\/a>, follow our tutorial to set up a mail server with <a href=\"https:\/\/www.rosehosting.com\/blog\/setup-and-configure-a-mail-server-with-postfixadmin\/\" target=\"_blank\" rel=\"noopener noreferrer\">Postfix, Dovecot, Spamassassin, SQLite and PostfixAdmin on an Ubuntu 16.04 VPS<\/a><\/p>\n<p>If you want to use SQLite instead of MariaDB, follow our tutorial to set up a mail server with <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-centos-7\/\" target=\"_blank\" rel=\"noopener noreferrer\">Postfix, Dovecot, Spamassassin, SQLite and PostfixAdmin on a CentoOS 7 VPS<\/a><\/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-69dcbada7b5a5\" 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-69dcbada7b5a5\"  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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#1-Update-the-system-and-install-necessary-packages\" >1. Update the system and install necessary packages<\/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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#2-Create-system-user\" >2. Create system user<\/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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#3-Install-MariaDB\" >3. Install MariaDB<\/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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#4-Install-PHP-and-all-necessary-PHP-modules\" >4. Install PHP and all necessary PHP modules<\/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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#5-Install-PostfixAdmin\" >5. Install PostfixAdmin<\/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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#6-Install-and-configure-postfix\" >6. Install and configure 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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#7-Install-and-Configure-Dovecot\" >7. Install and Configure 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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#8-Install-and-configure-Spamassassin\" >8. Install and configure Spamassassin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#9-Configure-Postfix-to-use-SpamAssassin\" >9. Configure Postfix to use SpamAssassin<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1-Update-the-system-and-install-necessary-packages\"><\/span>1. Update the system and install necessary packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>yum update &amp;&amp; yum install wget nano<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"2-Create-system-user\"><\/span>2. Create system user<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For security reasons, we will create a new system user who will be the owner of all mailboxes.<\/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\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"3-Install-MariaDB\"><\/span>3. Install MariaDB<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>MariaDB 5.5 is shipped in the default CentOS 7 repository, to install it just run:<\/p>\n<pre>yum install mariadb-server<\/pre>\n<p>To start the MariaDB service and enable it to start on boot, execute the following commands:<\/p>\n<pre>systemctl start mariadb.service\r\nsystemctl enable mariadb.service\r\n<\/pre>\n<p>Run the following command to secure your MariaDB installation:<\/p>\n<pre>mysql_secure_installation<\/pre>\n<p>Next, we need to create a database for our postfixadminHQ instance.<\/p>\n<pre>mysql -uroot -p\r\nMariaDB [(none)]&gt; CREATE DATABASE postfixadmin;\r\nMariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON postfixadmin.* TO 'postfixadmin'@'localhost' IDENTIFIED BY 'strong_password';\r\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\r\nMariaDB [(none)]&gt; \\q<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4-Install-PHP-and-all-necessary-PHP-modules\"><\/span>4. Install PHP and all necessary PHP modules<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>CentOS 7 ships with PHP version 5.4, to install PHP and necessary modules, run:<\/p>\n<pre>yum install php php-mysql php-imap php-mbstring php-common<\/pre>\n<p>If you don&#8217;t have Apache installed, install it with:<\/p>\n<pre>yum install httpd<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"5-Install-PostfixAdmin\"><\/span>5. Install PostfixAdmin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The latest version of PostfixAdmin, version 3, supports <a href=\"https:\/\/www.rosehosting.com\/mysql-hosting.html\">MySQL\/MariaDB<\/a>, <a href=\"https:\/\/www.rosehosting.com\/postgresql-hosting.html\">PostgreSQL<\/a>, and SQLite databases. In this guide, we will use MariaDB.<br \/>\nDownload the PostfixAdmin archive from SourceForge and extract it in the \/var\/www\/html\/ directory:<\/p>\n<pre>wget -q -O - \"https:\/\/downloads.sourceforge.net\/project\/postfixadmin\/postfixadmin\/postfixadmin-3.0.2\/postfixadmin-3.0.2.tar.gz\" | tar -xzf - -C \/var\/www\/html<\/pre>\n<p>Open the mail configuration file and edit the following values:<\/p>\n<pre>nano \/var\/www\/html\/postfixadmin-3.0.2\/config.inc.php<\/pre>\n<pre>$CONF['configured'] = true;\r\n$CONF['database_type'] = 'mysqli';\r\n$CONF['database_host'] = 'localhost';\r\n$CONF['database_user'] = 'postfixadmin';\r\n$CONF['database_password'] = 'strong_password';\r\n$CONF['database_name'] = 'postfixadmin';\r\n\r\n$CONF['domain_path'] = 'NO';\r\n$CONF['domain_in_mailbox'] = 'YES';\r\n<\/pre>\n<pre>chown -R apache: \/var\/www\/html\/postfixadmin-3.0.2<\/pre>\n<p>To populate the database go to <code>https:\/\/Your_IP_Address\/postfixadmin-3.0.2\/setup.php<\/code> and you should see something like below:<br \/>\n<code>Testing database connection - OK - mysqli:\/\/postfixadmin:xxxxx@localhost\/postfixadmin<br \/>\nEverything seems fine... attempting to create\/update database structure<\/code><\/p>\n<p>Create a new admin user:<\/p>\n<pre>bash \/var\/www\/html\/postfixadmin-3.0.2\/scripts\/postfixadmin-cli admin add admin@your_domain_name.com --password strong_password22 --password2 strong_password22 --superadmin 1 --active 1\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"6-Install-and-configure-postfix\"><\/span>6. Install and configure postfix<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To install postfix run the command bellow:<\/p>\n<pre>yum install postfix<\/pre>\n<p>Once the installation is completed, we need to create configuration files:<\/p>\n<pre>mkdir -p \/etc\/postfix\/sql\/<\/pre>\n<pre>nano \/etc\/postfix\/sql\/mysql_virtual_alias_domain_catchall_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\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<pre>nano \/etc\/postfix\/sql\/mysql_virtual_alias_domain_mailbox_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\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'<\/pre>\n<pre>nano \/etc\/postfix\/sql\/mysql_virtual_alias_domain_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\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'<\/pre>\n<pre>nano \/etc\/postfix\/sql\/mysql_virtual_alias_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT goto FROM alias WHERE address='%s' AND active = '1'\r\n#expansion_limit = 100<\/pre>\n<pre>nano \/etc\/postfix\/sql\/mysql_virtual_domains_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery          = SELECT domain FROM domain WHERE domain='%s' AND active = '1'\r\n#query          = SELECT domain FROM domain WHERE domain='%s'\r\n#optional query to use when relaying for backup MX\r\n#query           = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'\r\n#expansion_limit = 100<\/pre>\n<pre>nano \/etc\/postfix\/sql\/mysql_virtual_mailbox_limit_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'<\/pre>\n<pre>nano \/etc\/postfix\/sql\/mysql_virtual_mailbox_maps.cf<\/pre>\n<pre>user = postfixadmin\r\npassword = strong_password\r\nhosts = localhost\r\ndbname = postfixadmin\r\nquery           = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'\r\n#expansion_limit = 100<\/pre>\n<p>[ecko_alert color=&#8221;blue&#8221;]Stuck somewhere? <a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\">Get a VPS<\/a> from us and we&#8217;ll do all of this for you, free of charge! We&#8217;ll completely set up and configure a mail server for you. [\/ecko_alert]<\/p>\n<p>Edit the <code>main.cf<\/code> file:<\/p>\n<pre>postconf -e \"myhostname = $(hostname -f)\"\r\n \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\n \r\npostconf -e \"smtpd_tls_cert_file = \/etc\/pki\/tls\/certs\/localhost.crt\"\r\npostconf -e \"smtpd_tls_key_file = \/etc\/pki\/tls\/private\/localhost.key\"\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\npostconf -e \"inet_interfaces = all\"\r\n\r\npostconf -e \"virtual_transport = lmtp:unix:private\/dovecot-lmtp\"\r\n<\/pre>\n<p>Open the <code> master.cf<\/code> file, find <code>submission inet n<\/code> and <code>smtps inet n<\/code> sections and edit as follows:<\/p>\n<pre>nano \/etc\/postfix\/master.cf<\/pre>\n<pre>submission inet n       -       n       -       -       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 milter_macro_daemon_name=ORIGINATING\r\nsmtps     inet  n       -       n       -       -       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=$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\r\n\r\n<\/pre>\n<p>Enable the postfix service<\/p>\n<pre>systemctl enable postfix\r\nsystemctl restart postfix\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"7-Install-and-Configure-Dovecot\"><\/span>7. Install and Configure Dovecot<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install dovecot with MySQL support using the command bellow:<\/p>\n<pre>yum install dovecot dovecot-mysql<\/pre>\n<p>Open the <code>\/etc\/dovecot\/conf.d\/10-mail.conf<\/code> file and change the following values:<\/p>\n<pre><code>nano \/etc\/dovecot\/conf.d\/10-mail.conf<\/code><\/pre>\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 and change the following values:<\/p>\n<pre><code>nano \/etc\/dovecot\/conf.d\/10-auth.conf<\/code><\/pre>\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>Create a new <code>dovecot-sql.conf.ext<\/code> file:<\/p>\n<pre>nano \/etc\/dovecot\/dovecot-sql.conf.ext<\/pre>\n<pre>driver = mysql\r\nconnect = host=localhost dbname=postfixadmin user=postfixadmin password=strong_password\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'\r\n<\/pre>\n<p>In the <code>\/etc\/dovecot\/conf.d\/10-ssl.conf<\/code> file enable SSL support:<\/p>\n<pre>ssl = yes<\/pre>\n<p>Open the <code>\/etc\/dovecot\/conf.d\/15-lda.conf<\/code> file and set the <code>postmaster_address<\/code> email address.<\/p>\n<pre>postmaster_address = postmaster@your_domain_name.com<\/pre>\n<p>Open the <code>\/etc\/dovecot\/conf.d\/10-master.conf<\/code> file, find the service lmtp section and change it to:<\/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>find the service auth section and change it to:<\/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>Change the service auth-worker section to the following:<\/p>\n<pre>service auth-worker {\r\n  user = vmail\r\n}<\/pre>\n<p>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 \r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"8-Install-and-configure-Spamassassin\"><\/span>8. Install and configure Spamassassin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install spamassassin using the command bellow:<\/p>\n<pre>yum install spamassassin<\/pre>\n<p>Create a spamassassin system user:<\/p>\n<pre>groupadd spamd\r\nuseradd -g spamd -s \/bin\/false -d \/var\/log\/spamassassin spamd\r\nchown spamd:spamd \/var\/log\/spamassassin\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"9-Configure-Postfix-to-use-SpamAssassin\"><\/span>9. Configure Postfix to use SpamAssassin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Open the <code>master.cf<\/code> file and edit as follows:<\/p>\n<pre>nano \/etc\/postfix\/master.cf<\/pre>\n<p>change<\/p>\n<pre>smtp      inet  n       -       n       -       -       smtpd<\/pre>\n<p>with<\/p>\n<pre>smtp      inet  n       -       n       -       -       smtpd -o content_filter=spamassassin<\/pre>\n<p>add the following line at the end of the file:<\/p>\n<pre>spamassassin unix - n n - - pipe flags=R user=spamd argv=\/usr\/bin\/spamc -e \/usr\/sbin\/sendmail -oi -f ${sender} ${recipient}<\/pre>\n<p>Enable and restart the spamassassin service<\/p>\n<pre>systemctl enable spamassassin \r\nsystemctl restart spamassassin \r\n<\/pre>\n<p>Restart the postfix service<\/p>\n<pre>systemctl restart postfix<\/pre>\n<hr \/>\n<p>If everything is set up correctly now you should be able to log in to your PostfixAdmin backend by going to <code>http:\/\/Your_IP_Address\/postfixadmin-3.0.2.2<\/code> and create your first virtual domain and mailbox.<\/p>\n<hr \/>\n<p>Of course, you don\u2019t have to Set up a mail server with PostfixAdmin and MariaDB on CentOS 7,\u00a0 if you use one of our <a title=\"linux vps hosting\" href=\"https:\/\/www.rosehosting.com\/email-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Mail Server Hosting<\/a> services, in which case you can simply ask our expert Linux admins to set up a mail server for you. They are available 24&#215;7 and will take care of your request immediately.<\/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 and MariaDB on CentOS 7,\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>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will explain how to setup and configure a mail server with PostfixAdmin, Postfix, Dovecot, MariaDB and &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#more-22217\" aria-label=\"Read more about Set up a mail server with PostfixAdmin and MariaDB on CentOS 7\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":22223,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1702,1706],"tags":[71,296,50,1471,196],"class_list":["post-22217","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-databases","category-email-servers","tag-dovecot","tag-mariadb","tag-php","tag-postfixadmin","tag-spamassassin","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.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting\" \/>\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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/\" \/>\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 and MariaDB on CentOS 7\" \/>\n<meta property=\"og:description\" content=\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/\" \/>\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=\"2017-05-11T13:31:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:42:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\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=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7\",\"datePublished\":\"2017-05-11T13:31:14+00:00\",\"dateModified\":\"2022-06-03T08:42:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/\"},\"wordCount\":648,\"commentCount\":101,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg\",\"keywords\":[\"Dovecot\",\"mariadb\",\"php\",\"PostfixAdmin\",\"spamassassin\"],\"articleSection\":[\"CentOS\",\"Databases\",\"Email Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/\",\"name\":\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg\",\"datePublished\":\"2017-05-11T13:31:14+00:00\",\"dateModified\":\"2022-06-03T08:42:10+00:00\",\"description\":\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/05\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7\"}]},{\"@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":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting","description":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting","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\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7","og_description":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2017-05-11T13:31:14+00:00","article_modified_time":"2022-06-03T08:42:10+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.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":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7","datePublished":"2017-05-11T13:31:14+00:00","dateModified":"2022-06-03T08:42:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/"},"wordCount":648,"commentCount":101,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg","keywords":["Dovecot","mariadb","php","PostfixAdmin","spamassassin"],"articleSection":["CentOS","Databases","Email Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/","url":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/","name":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg","datePublished":"2017-05-11T13:31:14+00:00","dateModified":"2022-06-03T08:42:10+00:00","description":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/05\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7.jpg","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/set-up-a-mail-server-with-postfixadmin-and-mariadb-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Set up a mail server with PostfixAdmin and MariaDB on CentOS 7"}]},{"@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\/22217","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=22217"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/22217\/revisions"}],"predecessor-version":[{"id":41880,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/22217\/revisions\/41880"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/22223"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=22217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=22217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=22217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}