Thursday, April 22, 2021

Mail Server Configuration - Ubuntu

  • Webmin DNS

  1. install ubuntu 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. ubuntu8
  4. set hosts
    1. root# cp /etc/hosts /etc/hosts.bak
    2. root# vi /etc/hosts
    3.         ubuntu8
  5. close firewall
    1. root# systemctl disable ufw
    2. root# systemctl stop ufw
  6. install bind9
    1. root# apt-get install -y bind9
    2. root# systemctl enable named
    3. root# systemctl start named
  7. after install dns server, we modify setting of DNS.
    1. vi /etc/bind/named.conf.options
    2. dnssec-validateion no;
    1. add recursion yes;

  1. go to to install webmin

  1. open webmin by https://ubuntu8: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

        root# nano /etc/postfix/ 

  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
  1. Check the configure file: (not need to change anything for now)

vi /etc/dovecot/dovecot.conf

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


  1. remove the # in order to indicate the mail location.




cd /etc/dovecot/conf.d

vi 10-auth.conf

disable_plaintext_auth = no

then, save the fileRestart the serviceIn outlook turn of secure authentication SPAAnd 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: