- install debian with GUI
- set static id address with nds 8.8.8.8
- set hostname
- root# cp /etc/hostname /etc/hostname.bak
- root# vi /etc/hostname
- debian8
- set hosts
- root# cp /etc/hosts /etc/hosts.bak
- root# vi /etc/hosts
- 10.64.202.8 debian8.deb8.com debian8
- close firewall
- root# systemctl disable firewalld
- root# systemctl stop firewalld
- install bind9
- root# apt-get install -y bind9
- root# systemctl enable bind9
- root# systemctl start bind9
- after install dns server, we modify setting of DNS.
- nano /etc/bind/named.conf.options
- dnssec-validateion auto --> dnssec-validateion no
- add recursion yes; (optional)
- go to webmin.com to install webmin
![](//1.bp.blogspot.com/-c3eyRFPjBXU/YIHyc5b2btI/AAAAAAAAyKk/QkifUrt33BMJI3rPGve4bbW5sG_qB4vbwCK4BGAYYCw/w641-h765/image003-747278.png)
![](//2.bp.blogspot.com/-IpbIpgtgES8/YIHydJkOT1I/AAAAAAAAyKs/Vz_61Oj-3NQQjhdtDP9FEVvYWKA1kBzKgCK4BGAYYCw/w641-h754/image004-747975.png)
- open webmin by https://debian8:10000
- create master zoons(deb8.com and deb8.ca), and A records, and MX records.
- In ‘zoon option’ allow zoon transfer to class dns server.
- Create secondary zoon in class dns server to transfer dns zoons.
- After these DNS setting, we change back DNS from 8.8.8.8 to local 10.64.202.8
- This time we remove sendmail and install postfix for Debian.
- Apt-get install postfix.
![](//4.bp.blogspot.com/-8hnvffRQ1GI/YIHydGioOXI/AAAAAAAAyK0/1TDBBHZOrSAL1sCOV6fOqQEc8Cae13QlQCK4BGAYYCw/w642-h429/image005-748699.png)
- After installed postfix, we need to modify main.cf
![](//2.bp.blogspot.com/-QOIfPYgSSwY/YIHydRYVzMI/AAAAAAAAyK8/vCo4tnr5Zk8iyzNCaWYYm-HiMrcecxlOQCK4BGAYYCw/w646-h430/image006-749345.png)
- Make sure the settings for myhostname:
![](//2.bp.blogspot.com/-ubsO_CUX40o/YIHydoS80EI/AAAAAAAAyLE/DLuUSKtIqqAtZAZV-towuTYNSClQBhZ_QCK4BGAYYCw/w643-h438/image007-750226.png)
- Mydestination add deb8.com, deb8.ca
![](//3.bp.blogspot.com/-K2kgDYZsbGA/YIHyd1KkWBI/AAAAAAAAyLM/IN3wk0FPKqEkzmyvhMX2ZtXRk25MvQ72gCK4BGAYYCw/w645-h353/image008-750974.png)
- mynetworks add 10.64.0.0/12
- Install alpine
![](//2.bp.blogspot.com/-cIhu6Uep2Rw/YIHyeJ_-bSI/AAAAAAAAyLc/2ht76NoX0NYfArpJe4efvdsQIxehjcR3ACK4BGAYYCw/w645-h437/image010-752686.png)
- Install dovecot
- apt-get install -y dovecot-core dovecot-pop3d dovecot-imapd dovecot-lmtpd
Or for fedora and centos:
- Check the configure file:
vi /etc/dovecot/dovecot.conf
- vi /etc/dovecot/conf.d/10-mail.conf
![](//4.bp.blogspot.com/-0hZ6GBMw7H8/YIHyecsvrFI/AAAAAAAAyLk/IIIkdLY13LIPAr39k2duL1xjgJsWci_JgCK4BGAYYCw/w642-h403/image011-753362.png)
- remove the # to indicate the mail location.
![](//4.bp.blogspot.com/-wobJIFu4k24/YIHyehYWROI/AAAAAAAAyLs/bij3utbWqHA46kHsh9x1hlc4skS0kYkdQCK4BGAYYCw/w654-h304/image012-754390.png)
- SOLUTION FOR ERROR WITH OUTLOOK CONNECTING TO POP3 (Not yet test)
- cd /etc/dovecot/conf.d
- vi 10-auth.conf
- disable_plaintext_auth = no
- save the file, restart the service, in outlook turn of secure authentication SPA
- And under the advanced tab uncheck the pop3 ssl authentication
- change the mail folder permission to 600.
![](//2.bp.blogspot.com/-QLf3t0kJydA/YIHyeyNDD4I/AAAAAAAAyL0/9xkIs-HHXlInwqJdkaIgr29XyPd7MjDMgCK4BGAYYCw/w648-h285/image013-755212.png)
Now we can setup the client email using outlook
- add new pop and imap account in outlook
![](//2.bp.blogspot.com/-cNnYnkjgUc8/YIHyfAGyVuI/AAAAAAAAyL8/9iH-qQRDAr8v6A40Q81_Ea4loU6nUOGBwCK4BGAYYCw/w651-h458/image014-756040.png)
![](//4.bp.blogspot.com/-JwP6CG1Olpw/YIHyfS4ngjI/AAAAAAAAyME/spjen7Af8ucbvxVhSFRgWwmZPuxGotXTgCK4BGAYYCw/w648-h624/image015-756845.png)