User Tools

Site Tools


mail-server-setup

Mail Server Setup

Toolchain

  1. Ubuntu 18.04 Server DO Droplet 1GB
  2. Postfix
  3. Dovecot
  4. SpamAssasin

Installing and configuring POSTFIX

Installation:

$ sudo apt DEBIAN_PRIORITY=low install postfix

while installing the configuration prompt will appear. Lets just go with the following settings.

  • General type of mail configuration?: Internet Site
  • System mail name: cooponscitech.in
  • Root and postmaster mail recipient: ragulkanth
  • Other destinations to accept mail for: $myhostname, cooponscitech.in, mail.cooponscitech.in, localhost
  • Force synchronous updates on mail queue?: No
  • Local networks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
  • Mailbox size limit: 0
  • Local address extension character: +
  • Internet protocols to use: all

To reconfigure postfix

$ sudo dpkg-reconfigure postfix

To store the emails we use Maildir format in which all the incoming and outgoing mails are stored in separate files and folders.

$ sudo postconf -e 'home_mailbox= Maildir/'

Setting the location for virtual_alias_maps table which maps the arbitrary mail accounts to linux user accounts.

$ sudo postconf -e 'virtual_alias_maps= hash:/etc/postfix/virtual'

Mapping the mail accounts to linux user accounts. For that we need to edit the file /etc/postfix/virtual.

ragulkanth@cooponscitech.in	ragulkanth
manimaran@cooponscitech.in	manimaran
prasanna@cooponscitech.in	prasanna

To make the above maps take effect

$ sudo postmap /etc/postfix/virtual

Now have to restart postfix

$ sudo systemctl restart postfix
mail-server-setup.txt · Last modified: 10/06/2019 22:33 by ragulkanth