Home > centOS > centOS – Postfix (remove sendmail, noarmal)

centOS – Postfix (remove sendmail, noarmal)

$ yum install postfix dovecot system-switch-mail system-switch-mail-gnome

$ service sendmail stop

or

$ ntsysv

$ gedit /etc/postfix/main.cf:
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains =

####################
# Maildir/ is very nice, it uses the system username and in there home directory it creates Maildir/cur or new to put all mails
####################

home_mailbox = Maildir/

###################
# I have Domain1 or 2, 3, 4, …….. then following
###################
virtual_alias_domains = domain1.com, domain2.com
virtual_alias_maps = hash:/etc/postfix/map1, hash:/etc/postfix/map2

# end of main.cf settings

$ gedit map1
#Create file map1, put there email lists

#/etc/postfix/map1:
#     postmaster@domain1.com postmaster
#     info@domain1.com       me_
#     sales@domain1.com      me_you_anyone

$ gedit map2
# Create file map2, put there email lists
#/etc/postfix/map2:
#     postmaster@domain2.com postmaster
#     info@domain2.com       me_
#     sales@domain2.com      me_you_anyone

Advertisements
Categories: centOS Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: