Thursday, April 22, 2021

Mail Server Configuration - Debian


  • Webmin DNS
  1. install debian with GUI
  2. set static id address with nds 8.8.8.8
  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. 10.64.202.8         debian8.deb8.com          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 webmin.com to install webmin

 

  1. open webmin by https://debian8:10000
  2. create master zoons(deb8.com and deb8.ca), 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 8.8.8.8 to local 10.64.202.8
  6. This time we remove sendmail and install postfix for Debian.
  7. Apt-get install postfix.

  1. After installed postfix, we need to modify main.cf

 

  1. Make sure the settings for myhostname:

 

  1. Mydestination add deb8.com, deb8.ca

 

  1. mynetworks add 10.64.0.0/12
        

 

  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. SOLUTION FOR ERROR WITH OUTLOOK CONNECTING TO POP3 (Not yet test)
  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: