{"id":39737,"date":"2021-12-15T12:30:00","date_gmt":"2021-12-15T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=39737"},"modified":"2022-06-03T03:31:28","modified_gmt":"2022-06-03T08:31:28","slug":"how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/","title":{"rendered":"How to Set Up a Mail Server with PostfixAdmin on Debian 11"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"742\" height=\"372\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg\" alt=\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\" class=\"wp-image-39808\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>Postfix is a free and widely used open-source mail transfer agent. It supports MySQL, PostgreSQL, and SQLite as the database server to store and manage the virtual domains.<br>PostfixAdmin is a free web-based interface to manage a postfix mail server. With this tool, we can easily add\/remove\/edit domain names, email accounts, email quotas, email forwarding, etc.<\/p>\n\n\n\n<p>In this tutorial, we will show you how to set up a mail server with PostfixAdmin on Debian 11 (Bullseye) OS.<\/p>\n\n\n\n<!--more-->\n\n\n\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-69ee2c976c4ff\" 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-69ee2c976c4ff\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-1-Log-in-via-SSH-and-update-the-system\" >Step 1. Log in via SSH and update the system<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-2-Set-Hostname\" >Step 2. Set Hostname<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-3-Install-Apache-MariaDB-and-PHP\" >Step 3. Install Apache, MariaDB, and PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-4-Create-a-System-User\" >Step 4. Create a System User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-4-Create-a-Database\" >Step 4. Create a Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-5-Install-Postfix\" >Step 5. Install Postfix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-6-Install-Dovecot\" >Step 6. Install Dovecot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#Step-7-Install-PostfixAdmin\" >Step 7. Install PostfixAdmin<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Debian 11 VPS<\/li><li>SSH root access or a regular system user with sudo privileges<\/li><li>A Fully Qualified Domain Name<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-log-in-via-ssh-and-update-the-system\"><span class=\"ez-toc-section\" id=\"Step-1-Log-in-via-SSH-and-update-the-system\"><\/span>Step 1. Log in via SSH and update the system<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Log in to your Debian 11 VPS through SSH as a root user or as a regular user with sudo privileges<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh master@IP_Address -p Port_number<\/pre>\n\n\n\n<p>Remember to replace &#8220;master&#8221; with a user that has sudo privileges, or root. Additionally, replace &#8220;IP_Address&#8221; and &#8220;Port_Number&#8221; with your server\u2019s IP address and SSH port.<\/p>\n\n\n\n<p>You can check whether you have the proper Debian version installed on your server with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ lsb_release -a<\/pre>\n\n\n\n<p>You should get this output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">No LSB modules are available.<br>Distributor ID: Debian<br>Description: Debian GNU\/Linux 11 (bullseye)<br>Release: 11<br>Codename: bullseye<\/pre>\n\n\n\n<p>To update the system, you can run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt update &amp;&amp; sudo apt upgrade<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-set-hostname\"><span class=\"ez-toc-section\" id=\"Step-2-Set-Hostname\"><\/span>Step 2. Set Hostname<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You would need to create a DNS A record for your hostname because the server hostname should be an FQDN. For example, we will create <strong>debian11.yourdomain.com<\/strong> as the server hostname, let&#8217;s run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo hostnamectl set-hostname debian11.yourdomain.com<\/pre>\n\n\n\n<p>The above command is just an example, you would need to use your own registered domain name to create a hostname.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-install-apache-mariadb-and-php\"><span class=\"ez-toc-section\" id=\"Step-3-Install-Apache-MariaDB-and-PHP\"><\/span>Step 3. Install Apache, MariaDB, and PHP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now, let&#8217;s install the webserver, database server, and PHP<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install apache2 mariadb-server php-{xml,pear,imap,intl,common,json,curl,mbstring,mysql,gd,imagick,zip,opcache,sqlite3} libapache2-mod-php<\/pre>\n\n\n\n<p>You can skip this step if these are already installed on your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-create-a-system-user\"><span class=\"ez-toc-section\" id=\"Step-4-Create-a-System-User\"><\/span>Step 4. Create a System User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let&#8217;s run the following commands to create a system user called &#8216;vmail&#8217; and create a directory and give the proper permission.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo useradd -r -u 150 -g mail -d \/var\/vmail -s \/sbin\/nologin -c \"Virtual Mail User\" vmail<br>$ sudo mkdir -p \/var\/vmail<br>$ sudo chmod -R 770 \/var\/vmail<br>$ sudo chown -R vmail:mail \/var\/vmail<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-create-a-database\"><span class=\"ez-toc-section\" id=\"Step-4-Create-a-Database\"><\/span>Step 4. Create a Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If your MySQL root user does not have a password, you can run this command to log in to the MySQL shell.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo mysql<\/pre>\n\n\n\n<p>If a password is required to log in to MySQL shell, then run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ mysql -u root -p<\/pre>\n\n\n\n<p>Once logged in, let&#8217;s run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">MariaDB [(none)]&gt; CREATE DATABASE postfixadmin;\nMariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON postfixadmin.* TO 'postfixadmin'@'localhost' IDENTIFIED BY '5tr0n6p455w0rd';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; \\q<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-5-install-postfix\"><span class=\"ez-toc-section\" id=\"Step-5-Install-Postfix\"><\/span>Step 5. Install Postfix<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Install Postfix mail server with this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install postfix-mysql<\/pre>\n\n\n\n<p>Once executes, you will see the following<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"680\" height=\"446\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/set-up-a-mail-server-with-postfixadmin-on-debian-11.png\" alt=\"set up a mail server with postfixadmin on debian 11\" class=\"wp-image-39833\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/set-up-a-mail-server-with-postfixadmin-on-debian-11.png 680w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/set-up-a-mail-server-with-postfixadmin-on-debian-11-300x197.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/set-up-a-mail-server-with-postfixadmin-on-debian-11-150x98.png 150w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/figure>\n\n\n\n<p>Choose <strong>Internet Site<\/strong> then hit <strong>Ok <\/strong>to continue<\/p>\n\n\n\n<p>In this step, you will be asked for the system mail name, make sure the system mail name is the same as your Debian 11 hostname. We set the system hostname at the beginning of this tutorial.<\/p>\n\n\n\n<p>Once completed we need to create several configuration files for Postfix to communicate with the database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo mkdir -p \/etc\/postfix\/sql<\/pre>\n\n\n\n<p>Let&#8217;s create the files, make sure to replace the password, database name, database user with the ones you created earlier.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_alias_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin\npassword = 5tr0n6p455w0rd\nhosts = localhost\ndbname = postfixadmin\nquery = SELECT goto FROM alias WHERE address='%s' AND active = '1'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_domains_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin<br>password = 5tr0n6p455w0rd<br>hosts = localhost<br>dbname = postfixadmin<br>query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_mailbox_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin<br>password = 5tr0n6p455w0rd<br>hosts = localhost<br>dbname = postfixadmin<br>query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_alias_domain_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin<br>password = 5tr0n6p455w0rd<br>hosts = localhost<br>dbname = postfixadmin<br>query = 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\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_alias_domain_mailbox_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin<br>password = 5tr0n6p455w0rd<br>hosts = localhost<br>dbname = postfixadmin<br>query = 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\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_mailbox_limit_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin<br>password = 5tr0n6p455w0rd<br>hosts = localhost<br>dbname = postfixadmin<br>query = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/sql\/mysql_virtual_alias_domain_catchall_maps.cf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user = postfixadmin<br>password = 5tr0n6p455w0rd<br>hosts = localhost<br>dbname = postfixadmin<br>query = 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'<\/pre>\n\n\n\n<p>Let us now proceed with editing <code>\/etc\/postfix\/main.cf<\/code> file, we can run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo postconf -e \"myhostname = $(hostname -f)\"\n$ sudo postconf -e \"mydestination = localhost\"\n$ sudo postconf -e \"mynetworks = 127.0.0.0\/8\"\n$ sudo postconf -e \"inet_protocols = ipv4\"\n$ sudo postconf -e \"inet_interfaces = all\"\n$ sudo postconf -e \"smtpd_tls_cert_file = \/etc\/ssl\/certs\/ssl-cert-snakeoil.pem\"\n$ sudo postconf -e \"smtpd_tls_key_file = \/etc\/ssl\/private\/ssl-cert-snakeoil.key\"\n$ sudo postconf -e \"smtpd_use_tls = yes\"\n$ sudo postconf -e \"smtpd_tls_auth_only = yes\"\n$ sudo postconf -e \"smtpd_sasl_type = dovecot\"\n$ sudo postconf -e \"smtpd_sasl_path = private\/auth\"\n$ sudo postconf -e \"smtpd_sasl_auth_enable = yes\"\n$ sudo postconf -e \"smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination\"\n$ sudo postconf -e \"virtual_transport = lmtp:unix:private\/dovecot-lmtp\"\n$ sudo postconf -e \"virtual_mailbox_domains = proxy:mysql:\/etc\/postfix\/sql\/mysql_virtual_domains_maps.cf\"\n$ sudo postconf -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\"\n$ sudo postconf -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\"<\/pre>\n\n\n\n<p>Once completed, we can continue and edit <code>\/etc\/postfix\/master.cf <\/code>file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/postfix\/master.cf<\/pre>\n\n\n\n<p>Modify or add the following lines to the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">smtp inet n - y - - smtpd\n#smtp inet n - y - 1 postscreen\n#smtpd pass - - y - - smtpd\n#dnsblog unix - - y - 0 dnsblog\n#tlsproxy unix - - y - 0 tlsproxy\nsubmission inet n - y - - smtpd\n  -o syslog_name=postfix\/submission\n  -o smtpd_tls_security_level=encrypt\n  -o smtpd_sasl_auth_enable=yes\n# -o smtpd_reject_unlisted_recipient=no\n# -o smtpd_client_restrictions=$mua_client_restrictions\n# -o smtpd_helo_restrictions=$mua_helo_restrictions\n# -o smtpd_sender_restrictions=$mua_sender_restrictions\n# -o smtpd_recipient_restrictions=\n# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\n  -o smtpd_client_restrictions=permit_sasl_authenticated,reject\n  -o milter_macro_daemon_name=ORIGINATING\nsmtps inet n - y - - smtpd\n  -o syslog_name=postfix\/smtps\n# -o smtpd_tls_wrappermode=yes\n  -o smtpd_sasl_auth_enable=yes\n# -o smtpd_reject_unlisted_recipient=no\n  -o smtpd_client_restrictions=permit_sasl_authenticated,reject\n# -o smtpd_client_restrictions=$mua_client_restrictions\n# -o smtpd_helo_restrictions=$mua_helo_restrictions\n# -o smtpd_sender_restrictions=$mua_sender_restrictions\n# -o smtpd_recipient_restrictions=\n# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\n  -o milter_macro_daemon_name=ORIGINATING<\/pre>\n\n\n\n<p>Save the changes then exit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-6-install-dovecot\"><span class=\"ez-toc-section\" id=\"Step-6-Install-Dovecot\"><\/span>Step 6. Install Dovecot<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install dovecot-mysql dovecot-imapd dovecot-pop3d dovecot-lmtpd<\/pre>\n\n\n\n<p>Once dovecot is installed, we need to edit some configuration files.<\/p>\n\n\n\n<p>Open the <code>\/etc\/dovecot\/conf.d\/10-auth.conf<\/code> file<\/p>\n\n\n\n<pre id=\"h-sudo-nano-etc-dovecot-conf-d-10-auth-conf\" class=\"wp-block-preformatted\">$ sudo nano \/etc\/dovecot\/conf.d\/10-auth.conf<\/pre>\n\n\n\n<p>Then find this line<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">auth_mechanisms = plain<\/pre>\n\n\n\n<p>replace it with this line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">auth_mechanisms = plain login<\/pre>\n\n\n\n<p>Then, comment <strong>!include auth-system.conf.ext<\/strong> and uncomment <strong>#!include auth-sql.conf.ext<\/strong><\/p>\n\n\n\n<p>It should look like this:<\/p>\n\n\n\n<pre id=\"h-include-auth-system-conf-ext\" class=\"wp-block-preformatted\">#!include auth-system.conf.ext <br>!include auth-sql.conf.ext<\/pre>\n\n\n\n<p>In the 10-auth.conf file, we include auth-sql.conf.ext. So, let&#8217;s edit the file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/dovecot\/dovecot-sql.conf.ext<\/pre>\n\n\n\n<p>then append these lines:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">driver = mysql<br>connect = host=localhost dbname=postfixadmin user=postfixadmin password=5tr0n6p455w0rd<br>default_pass_scheme = MD5-CRYPT<br>password_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'<br>user_query = SELECT '\/var\/vmail\/%d\/%u' as home, 'maildir:\/var\/vmail\/%d\/%u' as mail, 150 AS uid, 8 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'<\/pre>\n\n\n\n<p>The lines above contain the database credentials, make sure they match the ones you created in the previous step.<\/p>\n\n\n\n<p>Save the file and exit<\/p>\n\n\n\n<p>Next, open the <code>\/etc\/dovecot\/conf.d\/10-mail.conf<\/code> file and modify the following values:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/dovecot\/conf.d\/10-mail.conf<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">mail_location = maildir:\/var\/vmail\/%d\/%n<br>mail_uid = vmail<br>mail_gid = mail<br>mail_privileged_group = mail<br>first_valid_uid = 150<br>last_valid_uid = 150<\/pre>\n\n\n\n<p>By default, dovecot SSL support in Debian 11 is enabled. You can verify it by checking the file <code>\/etc\/dovecot\/conf.d\/10-ssl.conf<\/code>, make sure it has this line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssl = yes<\/pre>\n\n\n\n<p>If you want to edit the postmaster email address, you can edit the file <strong>\/etc\/dovecot\/conf.d\/15-lda.conf<\/strong> and find the <strong>postmaster_address<\/strong> line. By default, the postmaster email address would be <strong>postmaster@yourdomain.com<\/strong>. So, if you want to receive the postmaster email at <strong>admin@yourdomain.com<\/strong>, then you need to add this line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">postmaster_address = admin@yourdomain.com<\/pre>\n\n\n\n<p>Now, let&#8217;s proceed with editing other dovecot configuration files.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/dovecot\/conf.d\/10-master.conf<\/pre>\n\n\n\n<p>There are several changes you need to make to this file.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Find the service lmtp section and change it to the following:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">service lmtp {\n     unix_listener \/var\/spool\/postfix\/private\/dovecot-lmtp {\n     mode = 0600\n     user = postfix\n     group = postfix\n     }\n}<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>Find the service auth section and change it to:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">service auth {\n     unix_listener \/var\/spool\/postfix\/private\/auth {\n     mode = 0666\n     user = postfix\n     group = postfix\n}\n\nunix_listener auth-userdb {\n     mode = 0600\n     user = vmail\n\n}\nuser = dovecot\n}<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>Change the service auth-worker section to the following:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">service auth-worker {\n     user = vmail\n}<\/pre>\n\n\n\n<p>Do not forget to save the file then exit<\/p>\n\n\n\n<p>Before restarting Dovecot, we need to change the permissions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo chown -R vmail:dovecot \/etc\/dovecot\n$ sudo chmod -R o-rwx \/etc\/dovecot\n$ sudo systemctl restart postfix dovecot<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-7-install-postfixadmin\"><span class=\"ez-toc-section\" id=\"Step-7-Install-PostfixAdmin\"><\/span>Step 7. Install PostfixAdmin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this final step, we will download PostfixAdmin from Github and store it in the \/opt directory.<\/p>\n\n\n\n<pre id=\"h-apt-install-git\" class=\"wp-block-preformatted\">$ sudo apt install git\n$ cd \/opt\n$ sudo git clone https:\/\/github.com\/postfixadmin\/postfixadmin.git\n$ cd \/opt\/postfixadmin\n$ sudo -u bash install.sh\n$ sudo chown -R www-data. \/opt\/postfixadmin<\/pre>\n\n\n\n<p>We are not going to use a subdomain to access PostfixAdmin through a web browser, we will use an Apache <strong>alias <\/strong>instead.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/apache2\/conf-enabled\/postfixadmin.conf<\/pre>\n\n\n\n<p>Paste the following into the file then reload apache.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Alias \/postfixadmin \/opt\/postfixadmin\/public\n\n&lt;Directory \"\/opt\/postfixadmin\/public\"&gt;\n        AllowOverride All\n        Options +FollowSymLinks\n        Require all granted\n&lt;\/Directory&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl reload apache2<\/pre>\n\n\n\n<p>Create config.local.php and insert the following lines<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/opt\/postfixadmin\/config.local.php<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n$CONF['database_type'] = 'mysqli';\n$CONF['database_host'] = 'localhost';\n$CONF['database_user'] = 'postfixadmin';\n$CONF['database_password'] = '5tr0n6p455w0rd';\n$CONF['database_name'] = 'postfixadmin';\n$CONF['configured'] = true;\n\n?&gt;\n<\/pre>\n\n\n\n<p>Go to <code>http:\/\/YOUR_SERVER_IP_ADDRESS\/postfixadmin\/setup.php<\/code> and create a setup password. If you already have a website on your server, you can also access postfixadmin at <code>http:\/\/yourdomain.com\/postfixadmin\/setup.php<\/code><\/p>\n\n\n\n<p>Type your setup password twice and click on the &#8216;Generate setup_password hash&#8217; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"567\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-mail-server-with-postfixadmin-on-debian-11.png\" alt=\"\" class=\"wp-image-39834\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-mail-server-with-postfixadmin-on-debian-11.png 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-mail-server-with-postfixadmin-on-debian-11-300x166.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-mail-server-with-postfixadmin-on-debian-11-150x83.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-mail-server-with-postfixadmin-on-debian-11-768x425.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You will see a line containing a setup password like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$CONF['setup_password'] = '$2y$10$xlKkztMcpu6C3\/\/ZqPZM1.pTGjGD5oEn0KtBlbSl9VFDycxPNH1M2';<\/pre>\n\n\n\n<p>and you need to copy it to config.local.php<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n$CONF['database_type'] = 'mysqli';\n$CONF['database_host'] = 'localhost';\n$CONF['database_user'] = 'postfixadmin';\n$CONF['database_password'] = '5tr0n6p455w0rd';\n$CONF['database_name'] = 'postfixadmin';\n$CONF['configured'] = true;\n\n$CONF['setup_password'] = '$2y$10$xlKkztMcpu6C3\/\/ZqPZM1.pTGjGD5oEn0KtBlbSl9VFDycxPNH1M2';\n?&gt;<\/pre>\n\n\n\n<p>After adding the line to config.local.php file, you can refresh the page to log in and create a superadmin.<\/p>\n\n\n\n<p>The setup password you created earlier is required to create a superadmin. In the admin field, it should be filled with an email address, it should look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"904\" height=\"800\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/configuring-a-mail-server-with-postfixadmin-on-debian-11.png\" alt=\"configuring a mail server with postfixadmin on debian 11\" class=\"wp-image-39907\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/configuring-a-mail-server-with-postfixadmin-on-debian-11.png 904w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/configuring-a-mail-server-with-postfixadmin-on-debian-11-300x265.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/configuring-a-mail-server-with-postfixadmin-on-debian-11-150x133.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/configuring-a-mail-server-with-postfixadmin-on-debian-11-768x680.png 768w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure>\n\n\n\n<p>That&#8217;s it, after successfully adding a superadmin, you can use the credentials to log in to <code>http:\/\/<code>YOUR_SERVER_IP_ADDRESS<\/code>\/postfixadmin\/login.php<\/code> to add domains, email accounts, and any other email management tasks there.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/installing-a-mail-server-with-postfixadmin-on-debian-11.png\" alt=\"installing a mail server with postfixadmin on debian 11\" class=\"wp-image-39908\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/installing-a-mail-server-with-postfixadmin-on-debian-11.png 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/installing-a-mail-server-with-postfixadmin-on-debian-11-300x155.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/installing-a-mail-server-with-postfixadmin-on-debian-11-150x77.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/12\/installing-a-mail-server-with-postfixadmin-on-debian-11-768x397.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Of course, you don\u2019t have to set up a mail server with PostfixAdmin on Debian 11 if you use one of our <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">Debian 11 VPS hosting services<\/a>, in which case you can simply ask our expert Linux admins to set up a mail server with PostfixAdmin for you. They are available 24\u00d77 and will take care of your request immediately. Setting up a mail server with PostfixAdmin is an easy task if you followed this guide carefully.<\/p>\n\n\n\n<p>PS. If you liked this post, on how to set up a mail server with PostfixAdmin, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Postfix is a free and widely used open-source mail transfer agent. It supports MySQL, PostgreSQL, and SQLite as the database &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#more-39737\" aria-label=\"Read more about How to Set Up a Mail Server with PostfixAdmin on Debian 11\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":39808,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700,1706,13],"tags":[1962,384,1471],"class_list":["post-39737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","category-email-servers","category-tutorials","tag-debian-11","tag-mail-server","tag-postfixadmin","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Set Up a Mail Server with PostfixAdmin on Debian 11<\/title>\n<meta name=\"description\" content=\"In this tutorial, we will show you how to set up a mail server with PostfixAdmin on Debian 11. Read on, to learn more about it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will show you How to Set Up a Mail Server with PostfixAdmin on Debian 11. Read on, to learn more about it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/\" \/>\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=\"2021-12-15T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:31:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg?v=1637851993\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\" \/>\n<meta name=\"twitter:description\" content=\"In this tutorial, we will show you How to Set Up a Mail Server with PostfixAdmin on Debian 11. Read on, to learn more about it.\" \/>\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=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\",\"datePublished\":\"2021-12-15T18:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/\"},\"wordCount\":1054,\"commentCount\":20,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg\",\"keywords\":[\"debian 11\",\"mail-server\",\"PostfixAdmin\"],\"articleSection\":[\"Debian\",\"Email Servers\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/\",\"name\":\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg\",\"datePublished\":\"2021-12-15T18:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:28+00:00\",\"description\":\"In this tutorial, we will show you how to set up a mail server with PostfixAdmin on Debian 11. Read on, to learn more about it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg\",\"width\":742,\"height\":372,\"caption\":\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up a Mail Server with PostfixAdmin on Debian 11\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Set Up a Mail Server with PostfixAdmin on Debian 11","description":"In this tutorial, we will show you how to set up a mail server with PostfixAdmin on Debian 11. Read on, to learn more about it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up a Mail Server with PostfixAdmin on Debian 11","og_description":"In this tutorial, we will show you How to Set Up a Mail Server with PostfixAdmin on Debian 11. Read on, to learn more about it.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2021-12-15T18:30:00+00:00","article_modified_time":"2022-06-03T08:31:28+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg?v=1637851993","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"How to Set Up a Mail Server with PostfixAdmin on Debian 11","twitter_description":"In this tutorial, we will show you How to Set Up a Mail Server with PostfixAdmin on Debian 11. Read on, to learn more about it.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Set Up a Mail Server with PostfixAdmin on Debian 11","datePublished":"2021-12-15T18:30:00+00:00","dateModified":"2022-06-03T08:31:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/"},"wordCount":1054,"commentCount":20,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg","keywords":["debian 11","mail-server","PostfixAdmin"],"articleSection":["Debian","Email Servers","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/","name":"How to Set Up a Mail Server with PostfixAdmin on Debian 11","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg","datePublished":"2021-12-15T18:30:00+00:00","dateModified":"2022-06-03T08:31:28+00:00","description":"In this tutorial, we will show you how to set up a mail server with PostfixAdmin on Debian 11. Read on, to learn more about it.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11.jpg","width":742,"height":372,"caption":"How to Set Up a Mail Server with PostfixAdmin on Debian 11"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-a-mail-server-with-postfixadmin-on-debian-11\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Set Up a Mail Server with PostfixAdmin on Debian 11"}]},{"@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\/39737","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=39737"}],"version-history":[{"count":13,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39737\/revisions"}],"predecessor-version":[{"id":39909,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39737\/revisions\/39909"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/39808"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=39737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=39737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=39737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}