Thursday, April 22, 2021

Mail Server Configuration - Debian

  • Webmin DNS
  1. install debian with GUI
  2. set static id address with nds
  3. set hostname
    1. root# cp /etc/hostname /etc/hostname.bak
    2. root# vi /etc/hostname
    3. debian8
  4. set hosts
    1. root# cp /etc/hosts /etc/hosts.bak
    2. root# vi /etc/hosts
    3.          debian8
  5. close firewall
    1. root# systemctl disable firewalld
    2. root# systemctl stop firewalld
  6. install bind9
    1. root# apt-get install -y bind9
    2. root# systemctl enable bind9
    3. root# systemctl start bind9
  7. after install dns server, we modify setting of DNS.
    1. nano /etc/bind/named.conf.options
    2. dnssec-validateion auto --> dnssec-validateion no

    1. add recursion yes; (optional)

  1. go to to install webmin


  1. open webmin by https://debian8:10000
  2. create master zoons( and, and A records, and MX records.
  3. In ‘zoon option’ allow zoon transfer to class dns server.
  4. Create secondary zoon in class dns server to transfer dns zoons.
  5. After these DNS setting, we change back DNS from to local
  6. This time we remove sendmail and install postfix for Debian.
  7. Apt-get install postfix.

  1. After installed postfix, we need to modify


  1. Make sure the settings for myhostname:


  1. Mydestination add,


  1. mynetworks add


  1. Install alpine



  • Install Dovecot
  1. Install dovecot
  2. apt-get install -y dovecot-core dovecot-pop3d dovecot-imapd dovecot-lmtpd

Or for fedora and centos:

  1. Check the configure file:

vi /etc/dovecot/dovecot.conf

  1. vi /etc/dovecot/conf.d/10-mail.conf


  1. remove the # to indicate the mail location.



  1. cd /etc/dovecot/conf.d
  2. vi 10-auth.conf
  3. disable_plaintext_auth = no
  4. save the file, restart the service, in outlook turn of secure authentication SPA
  5. And under the advanced tab uncheck the pop3 ssl authentication
  1. change the mail folder permission to 600.

Now we can setup the client email using outlook

  1. add new pop and imap account in outlook


No comments: