{"id":5348,"date":"2024-01-10T12:43:00","date_gmt":"2024-01-10T12:43:00","guid":{"rendered":"http:\/\/cloudminister.com\/?p=5348"},"modified":"2025-11-15T10:32:23","modified_gmt":"2025-11-15T10:32:23","slug":"how-to-configure-postfix-and-dovecot-vpspart-2","status":"publish","type":"post","link":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/","title":{"rendered":"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53-1024x536.png\" alt=\"\" class=\"wp-image-36526\" srcset=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53-1024x536.png 1024w, https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53-300x157.png 300w, https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53-768x402.png 768w, https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n<h3><strong>Introduction<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\">This is the second part of our guide on building a complete email server. In\u00a0<a target=\"_blank\" rel=\"noreferrer\">Part 1<\/a>, we configured Postfix (SMTP) and Dovecot (IMAP\/POP3), allowing you to send and receive emails via the command line.<\/p>\n<p class=\"ds-markdown-paragraph\">Now, we will install\u00a0<a href=\"https:\/\/roundcube.net\/download\/\"><strong>Roundcube<\/strong><\/a>, a modern, browser-based webmail client that provides a user-friendly interface similar to Gmail or Outlook. This involves setting up a LAMP stack (Linux, Apache, MariaDB, PHP) to run Roundcube.<\/p>\n<hr \/>\n<h3><strong>Step 1: Install the LAMP Stack<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\">Roundcube requires a web server, a database, and PHP. We will install and configure these components.<\/p>\n<p class=\"ds-markdown-paragraph\"><strong>1.1 Install Apache, PHP, and MariaDB:<\/strong><br \/>Install all required packages with a single command:<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> httpd php php-fpm php-mcrypt php-cli php-gd php-curl php-xml php-mysql php-mbstring php-pspell php-imagick mariadb-server<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\"><strong>1.2 Start and Enable Services:<\/strong><\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> systemctl start httpd mariadb\n<span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> httpd mariadb<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\"><strong>1.3 Configure PHP Settings:<\/strong><br \/>Edit the main PHP configuration file to set your timezone.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> <span class=\"token function\">vi<\/span> \/etc\/php.ini<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\">Find the line\u00a0<code>;date.timezone =<\/code>\u00a0and modify it to your region. Remove the semicolon (<code>;<\/code>) to uncomment it.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">ini<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token key attr-name\">date.timezone<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token value attr-value\">\"<span class=\"token inner-value\">Asia\/Kolkata<\/span>\"<\/span><\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\">Save the file and restart Apache to apply the changes.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> systemctl restart httpd<\/pre>\n<\/div>\n<blockquote>\n<p class=\"ds-markdown-paragraph\"><strong>Pro Tip:\u00a0You can find a list of supported timezones\u00a0<a href=\"https:\/\/www.php.net\/manual\/en\/timezones.php\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. Using the correct timezone is crucial for accurate email timestamps.<\/strong><\/p>\n<\/blockquote>\n<hr \/>\n<h3><strong>Step 2: Configure MariaDB Database<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\"><strong>2.1 Secure MariaDB Installation:<\/strong><br \/>Run the security script to set a root password and remove insecure defaults:<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> mysql_secure_installation<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\">Follow the prompts to set a root password, remove anonymous users, disallow remote root login, and remove the test database.<\/p>\n<p class=\"ds-markdown-paragraph\"><strong>2.2 Create a Database for Roundcube:<\/strong><br \/>Log into MariaDB and create a dedicated database and user for Roundcube for better security.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre>mysql <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span><\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\">Enter your root password when prompted, then run the following SQL commands inside the MariaDB shell:<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">sql<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">DATABASE<\/span> roundcubemail<span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">USER<\/span> <span class=\"token string\">'roundcube'<\/span><span class=\"token variable\">@'localhost'<\/span> IDENTIFIED <span class=\"token keyword\">BY<\/span> <span class=\"token string\">'=213@!#webL'<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">GRANT<\/span> <span class=\"token keyword\">ALL<\/span> <span class=\"token keyword\">PRIVILEGES<\/span> <span class=\"token keyword\">ON<\/span> roundcubemail<span class=\"token punctuation\">.<\/span><span class=\"token operator\">*<\/span> <span class=\"token keyword\">TO<\/span> <span class=\"token string\">'roundcube'<\/span><span class=\"token variable\">@'localhost'<\/span><span class=\"token punctuation\">;<\/span>\nFLUSH <span class=\"token keyword\">PRIVILEGES<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">EXIT<\/span><span class=\"token punctuation\">;<\/span><\/pre>\n<\/div>\n<p><a style=\"color: #1062fe;\" href=\"http:\/\/mail.you_domain.com\/roundcube\/installer\"><span style=\"color: #1155cc; font-weight: 400;\">http:\/\/mail.you_domain.com\/roundcube\/installer<\/span><\/a><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/img_5f60b6f422f36.png\" \/><\/p>\n<h3><strong>Step 3: Install and Configure Roundcube<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\"><strong>3.1 Download Roundcube:<\/strong><br \/>Navigate to the web root directory and download the latest stable version of Roundcube.\u00a0<em>(Note: Check the\u00a0<a href=\"https:\/\/github.com\/roundcube\/roundcubemail\/releases\" target=\"_blank\" rel=\"noopener noreferrer\">Roundcube download page<\/a>\u00a0for the most recent version.)<\/em><\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token builtin class-name\">cd<\/span> \/tmp\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">wget<\/span> <span class=\"token parameter variable\">-c<\/span> https:\/\/github.com\/roundcube\/roundcubemail\/releases\/download\/1.3.7\/roundcubemail-1.3.7-complete.tar.gz<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\"><strong>3.2 Extract and Move Files:<\/strong><br \/>Extract the downloaded archive and move it to your web directory.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> <span class=\"token function\">tar<\/span> xzf roundcubemail-1.3.7-complete.tar.gz\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mv<\/span> roundcubemail-1.3.7 \/var\/www\/html\/roundcubemail<\/pre>\n<\/div>\n<p style=\"font-weight: 400; color: #7c8088;\"><img decoding=\"async\" style=\"font-size: revert; color: initial;\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/img_5f60b6f494e41-1.png\" alt=\"Roundcube Database Settings\" \/><\/p>\n<ol start=\"18\">\n<li style=\"font-weight: 400; color: #7c8088;\">\n<p class=\"ds-markdown-paragraph\"><strong>3.3 Import the Database Schema:<\/strong><br \/>Import the initial database structure into your\u00a0<code>roundcubemail<\/code>\u00a0database.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token builtin class-name\">cd<\/span> \/var\/www\/html\/roundcubemail\n<span class=\"token function\">sudo<\/span> mysql <span class=\"token parameter variable\">-u<\/span> root <span class=\"token parameter variable\">-p<\/span> roundcubemail <span class=\"token operator\">&lt;<\/span> SQL\/mysql.initial.sql<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\"><strong>3.4 Set Correct Permissions:<\/strong><br \/>Apache needs to own the files to read and write to them.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> <span class=\"token function\">chown<\/span> <span class=\"token parameter variable\">-R<\/span> apache:apache \/var\/www\/html\/roundcubemail<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\"><strong>3.5 Restart Services:<\/strong><\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> systemctl restart httpd mariadb<\/pre>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/img_5f60b6f4cb7b1-1.png\" alt=\"Roundcube Configuration File Created\" \/><\/p>\n<\/li>\n<\/ol>\n<p style=\"font-weight: 400; color: #7c8088;\"><span style=\"color: #000000;\">Roundcube Configuration File Created<\/span><\/p>\n<p style=\"font-weight: 400; color: #7c8088;\"><span style=\"color: #000000;\">You can review your configuration from the <\/span><span style=\"color: #000000;\">Test config page<\/span><span style=\"color: #000000;\"> as shown in the following screenshot.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/img_5f60b6f528424-1.png\" alt=\"Test Roundcube Configuration\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/img_5f60b6f5b7e8a.png\" alt=\"Roundcube Webmail Login\" \/><\/p>\n<h3><strong>Step 4: Complete Setup via Web Browser<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\">The final configuration is done through a web-based installer.<\/p>\n<ol start=\"1\">\n<li>\n<p class=\"ds-markdown-paragraph\">Open your browser and navigate to your Roundcube installer:<br \/><code>http:\/\/mail.your_domain.com\/roundcubemail\/installer<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>General Configuration:<\/strong><\/p>\n<ul>\n<li>\n<p class=\"ds-markdown-paragraph\">Set a\u00a0<code>product_name<\/code>\u00a0(e.g., &#8220;YourDomain Webmail&#8221;).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Database Setup:<\/strong><\/p>\n<ul>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Database type:<\/strong>\u00a0<code>MySQL<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Database server:<\/strong>\u00a0<code>localhost<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Database name:<\/strong>\u00a0<code>roundcubemail<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Username:<\/strong>\u00a0<code>roundcube<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Password:<\/strong>\u00a0<code>=213@!#webL<\/code>\u00a0(the password you set earlier)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>IMAP &amp; SMTP Settings:<\/strong><\/p>\n<ul>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>IMAP server:<\/strong>\u00a0<code>localhost<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>SMTP server:<\/strong>\u00a0<code>localhost<\/code><\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\">Ensure both are set to use\u00a0<code>TLS<\/code>\u00a0or\u00a0<code>SSL<\/code>\u00a0on their standard ports (993 for IMAPS, 465 for SMTPS).\u00a0<em>For this test setup, you may need to use\u00a0<code>tls\/starttls<\/code>\u00a0on ports 143 and 587 if SSL is not yet configured.<\/em><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Create Config:<\/strong>\u00a0Click\u00a0<strong>Create Config<\/strong>\u00a0and then\u00a0<strong>Continue<\/strong>\u00a0on the success message.<\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Test Configuration:<\/strong>\u00a0Use the\u00a0<strong>Test Config<\/strong>\u00a0page to verify all settings are correct.<\/p>\n<\/li>\n<\/ol>\n<h3><strong>Step 5: Secure the Installation<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\"><strong>5.1 Remove the Installer Directory:<\/strong><br \/>This is a critical security step. The installer directory contains sensitive data and must be deleted to prevent unauthorized access.<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-rf<\/span> \/var\/www\/html\/roundcubemail\/installer<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\"><strong>5.2 (Recommended) Disable the Installer in Config:<\/strong><br \/>As an alternative, you can disable the installer in the config file instead of deleting it. Edit the config file:<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">bash<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token function\">sudo<\/span> <span class=\"token function\">vi<\/span> \/var\/www\/html\/roundcubemail\/config\/config.inc.php<\/pre>\n<\/div>\n<p class=\"ds-markdown-paragraph\">Find and ensure the following line is set:<\/p>\n<div class=\"md-code-block md-code-block-light\">\n<div class=\"md-code-block-banner-wrap\">\n<div class=\"md-code-block-banner md-code-block-banner-lite\">\n<div class=\"_121d384\">\n<div class=\"d2a24f03\"><span class=\"d813de27\">php<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre><span class=\"token variable\">$config<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string single-quoted-string\">'enable_installer'<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">=<\/span> <span class=\"token constant boolean\">false<\/span><span class=\"token punctuation\">;<\/span><\/pre>\n<\/div>\n<hr \/>\n<h3><strong>Step 6: Log In to Roundcube<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\">Your webmail is now ready! Open your browser and navigate to:<br \/><code>http:\/\/mail.your_domain.com\/roundcubemail\/<\/code><\/p>\n<p class=\"ds-markdown-paragraph\">Log in using the email user credentials you created in Part 1 (e.g.,\u00a0<code>admin@your_domain.com<\/code>\u00a0and its password). You should see the inbox with the test email you sent earlier.<\/p>\n<hr \/>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\">Congratulations! You have successfully configured a complete email server stack on CentOS 7:<\/p>\n<ul>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Postfix<\/strong>\u00a0as the SMTP server for sending mail.<\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Dovecot<\/strong>\u00a0as the IMAP server for retrieving mail.<\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Roundcube<\/strong>\u00a0as the web-based client to access your emails.<\/p>\n<\/li>\n<\/ul>\n<p class=\"ds-markdown-paragraph\">You can now send and receive emails through a modern, intuitive web interface.<\/p>\n<h3><strong>Important Security Note &amp; Next Steps<\/strong><\/h3>\n<p class=\"ds-markdown-paragraph\">This guide sets up a functional server, but a production email server requires further hardening:<\/p>\n<ol start=\"1\">\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>SSL\/TLS Certificates:<\/strong>\u00a0It is essential to encrypt communication between the client and server using SSL certificates from\u00a0<a href=\"https:\/\/letsencrypt.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Let&#8217;s Encrypt<\/a>. Currently, your login credentials and emails are transmitted in plain text, which is highly insecure.<\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Firewall Rules:<\/strong>\u00a0Ensure only necessary ports are open.<\/p>\n<\/li>\n<li>\n<p class=\"ds-markdown-paragraph\"><strong>Spam Filtering:<\/strong>\u00a0Implement tools like SpamAssassin and ClamAV to filter spam and viruses.<\/p>\n<div class=\"pro-tip-box\"><strong>Pro Tip<\/strong>\n<p>Managing a secure email server requires constant vigilance against security threats and spam. For a reliable, hassle-free solution, consider a professional managed email hosting service<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"font-weight: 400; color: #2a2e36;\"><span style=\"color: #ff0000;\"><strong><a style=\"color: #1062fe;\" href=\"https:\/\/manage.cloudminister.com\/index.php?rp=\/knowledgebase\/100\/How-to-configure-postfix-and-dovecot-with-roundcube-in-centos-7-VPSPart-1.html\">PREVIOUS<\/a><\/strong><\/span><\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This is the second part of our guide on building a complete email server. In\u00a0Part 1, we configured Postfix (SMTP) and Dovecot (IMAP\/POP3), allowing you to send and receive emails via the command line. Now, we will install\u00a0Roundcube, a modern, browser-based webmail client that provides a user-friendly interface similar to Gmail or Outlook. This&#8230;<\/p>\n","protected":false},"author":2,"featured_media":36526,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[235,840,275,622],"tags":[261,265,317,203,68,367,69,99],"class_list":["post-5348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-centos-web-panel","category-vps","category-vps-hosting","tag-command","tag-configure","tag-dovecot","tag-mysql","tag-server","tag-smtp","tag-vps","tag-vps-hosting"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Deepak Udai\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"CloudMinister -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)\" \/>\n\t\t<meta property=\"og:description\" content=\"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-01-10T12:43:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-11-15T10:32:23+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#blogposting\",\"name\":\"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)\",\"headline\":\"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)\",\"author\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/deepak-udai\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/Feature-images-53.png\",\"width\":1200,\"height\":628},\"datePublished\":\"2024-01-10T12:43:00+00:00\",\"dateModified\":\"2025-11-15T10:32:23+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#webpage\"},\"articleSection\":\"Centos, CentOS Web Panel, VPS, VPS Hosting, Command, Configure, DOVECOT, Mysql, server, SMTP, vps, vps hosting\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/centos\\\/#listItem\",\"name\":\"Centos\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/centos\\\/#listItem\",\"position\":2,\"name\":\"Centos\",\"item\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/centos\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#listItem\",\"name\":\"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#listItem\",\"position\":3,\"name\":\"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/category\\\/centos\\\/#listItem\",\"name\":\"Centos\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\",\"name\":\"CloudMinister\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/deepak-udai\\\/#author\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/deepak-udai\\\/\",\"name\":\"Deepak Udai\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc3c86969ed767b5b8972b9f2f5c5e41ed6e41790755f045c2d973b880af4a77?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Deepak Udai\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#webpage\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/\",\"name\":\"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)\",\"description\":\"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/deepak-udai\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/author\\\/deepak-udai\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/Feature-images-53.png\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#mainImage\",\"width\":1200,\"height\":628},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/how-to-configure-postfix-and-dovecot-vpspart-2\\\/#mainImage\"},\"datePublished\":\"2024-01-10T12:43:00+00:00\",\"dateModified\":\"2025-11-15T10:32:23+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/\",\"name\":\"CloudMinister\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudminister.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)","description":"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface","canonical_url":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#blogposting","name":"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)","headline":"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)","author":{"@id":"https:\/\/cloudminister.com\/blog\/author\/deepak-udai\/#author"},"publisher":{"@id":"https:\/\/cloudminister.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53.png","width":1200,"height":628},"datePublished":"2024-01-10T12:43:00+00:00","dateModified":"2025-11-15T10:32:23+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#webpage"},"isPartOf":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#webpage"},"articleSection":"Centos, CentOS Web Panel, VPS, VPS Hosting, Command, Configure, DOVECOT, Mysql, server, SMTP, vps, vps hosting"},{"@type":"BreadcrumbList","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/cloudminister.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/centos\/#listItem","name":"Centos"}},{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/centos\/#listItem","position":2,"name":"Centos","item":"https:\/\/cloudminister.com\/blog\/category\/centos\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#listItem","name":"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#listItem","position":3,"name":"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)","previousItem":{"@type":"ListItem","@id":"https:\/\/cloudminister.com\/blog\/category\/centos\/#listItem","name":"Centos"}}]},{"@type":"Organization","@id":"https:\/\/cloudminister.com\/blog\/#organization","name":"CloudMinister","url":"https:\/\/cloudminister.com\/blog\/"},{"@type":"Person","@id":"https:\/\/cloudminister.com\/blog\/author\/deepak-udai\/#author","url":"https:\/\/cloudminister.com\/blog\/author\/deepak-udai\/","name":"Deepak Udai","image":{"@type":"ImageObject","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/dc3c86969ed767b5b8972b9f2f5c5e41ed6e41790755f045c2d973b880af4a77?s=96&d=mm&r=g","width":96,"height":96,"caption":"Deepak Udai"}},{"@type":"WebPage","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#webpage","url":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/","name":"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)","description":"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/cloudminister.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#breadcrumblist"},"author":{"@id":"https:\/\/cloudminister.com\/blog\/author\/deepak-udai\/#author"},"creator":{"@id":"https:\/\/cloudminister.com\/blog\/author\/deepak-udai\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/cloudminister.com\/blog\/wp-content\/uploads\/2020\/09\/Feature-images-53.png","@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#mainImage","width":1200,"height":628},"primaryImageOfPage":{"@id":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/#mainImage"},"datePublished":"2024-01-10T12:43:00+00:00","dateModified":"2025-11-15T10:32:23+00:00"},{"@type":"WebSite","@id":"https:\/\/cloudminister.com\/blog\/#website","url":"https:\/\/cloudminister.com\/blog\/","name":"CloudMinister","inLanguage":"en-US","publisher":{"@id":"https:\/\/cloudminister.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"CloudMinister -","og:type":"article","og:title":"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)","og:description":"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface","og:url":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/","article:published_time":"2024-01-10T12:43:00+00:00","article:modified_time":"2025-11-15T10:32:23+00:00","twitter:card":"summary_large_image","twitter:title":"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)","twitter:description":"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface"},"aioseo_meta_data":{"post_id":"5348","title":"How to configure postfix and dovecot with roundcube in centos 7 VPS? (Part 2)","description":"Complete your email server setup! Part 2 of our guide covers installing a LAMP stack, configuring Roundcube webmail, and securing your installation to access emails through a modern browser interface","keywords":null,"keyphrases":{"focus":{"keyphrase":"VPS","score":51,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":3,"maxScore":9,"error":1},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":1},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":3,"maxScore":9,"error":1},"keyphraseInSubHeadings":{"score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":{"score":3,"maxScore":9,"error":1},"keywordDensity":{"score":0,"type":"low","maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"titles":[],"descriptions":[],"socialPosts":{"email":[],"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2025-05-21 08:16:51","updated":"2025-11-15 10:41:13","seo_analyzer_scan_date":null,"focus_keyword":"VPS","additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudminister.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cloudminister.com\/blog\/category\/centos\/\" title=\"Centos\">Centos<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/cloudminister.com\/blog\/"},{"label":"Centos","link":"https:\/\/cloudminister.com\/blog\/category\/centos\/"},{"label":"How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)","link":"https:\/\/cloudminister.com\/blog\/how-to-configure-postfix-and-dovecot-vpspart-2\/"}],"_links":{"self":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/5348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/comments?post=5348"}],"version-history":[{"count":2,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/5348\/revisions"}],"predecessor-version":[{"id":36527,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/posts\/5348\/revisions\/36527"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/media\/36526"}],"wp:attachment":[{"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/media?parent=5348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/categories?post=5348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudminister.com\/blog\/wp-json\/wp\/v2\/tags?post=5348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}