Install and configure Postfix (SMTP Server)

Postfix Configuration:


Here we are going to configure a SMTP mail server with Postfix. 

Step: 1 # apt-get install postfix

Ø  Select Internet side:

 

 

Ø  Put the domain name as like below:



Step:2#

Ø  vim /etc/hosts

 

127.0.0.1          localhost

122.144.9.74    mail.tanjila.com            mail                     [Format: Server IPFQDN hostname]

[Here 122.144.9.74 is mail server IP]

 

Ø  # vim /etc/hostname

mail                                                                               [here mail is server’s hostname]

 

Ø  # vim /etc/resolve.conf

 

nameserver 202.84.32.22

nameserver 202.84.33.13

 

Step: 3# cd /etc

Ø  # mv /etc/aliases /etc/postfix

 

Step: 4 # cd /etc/postfix

Ø  # touch transport

Ø  # vim transport

 

tanjila.com              local:                                                       [Format: domain            local:]

mail.tanjila.com      local:                                                        [Format: mail.domain    local:]

 

Step:5 # vim /etc/postfix/main.cf

 

myhostname = mail.tanjila.com

alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

transport_maps = hash:/etc/postfix/transport

myorigin = tanjila.com

mydestination = tanjila.com, mail.tanjila.com, localhost.tanjila.com, localhost, hash:/etc/postfix/transport

mynetworks = 127.0.0.0/8, 122.144.9.74/32 [::ffff:127.0.0.0]/104 [::1]/128

mailbox_size_limit = 0

inet_interfaces = all

:wq (save and exit)

 

Step: 6 #cd /etc/postfix

Ø  # postaliases aliases

Ø  # postmap transport

 

Step: 7 #etc/init.d/postfix restart


Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console