Thursday, April 22, 2021

Mail Server Configuration - Ubuntu


  • Webmin DNS

  1. install ubuntu 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. ubuntu8
  4. set hosts
    1. root# cp /etc/hosts /etc/hosts.bak
    2. root# vi /etc/hosts
    3. 10.64.203.8         ubuntu8.ubu8.com         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 webmin.com to install webmin

  1. open webmin by https://ubuntu8:10000
  2. create master zoons(ubu8.com and ubu8.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.203.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

        root# nano /etc/postfix/main.cf 

  1. Make sure the settings for myhostname: ubuntu8.ubu8.com
  1. Mydestination add ubu8.com, ubu8.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
  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.

 

 

  1. SOLUTION FOR ERROR WITH OUTLOOK CONNECTING TO POP3 (Not yet test)

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: