How to Setup Postfix on CentOS 6.4

Share this Article :

Posfix MailPostfix is a open-source mail transfer agent (MTA) that routes and delivers electronic mail. Postfix is an alternative for Sendmail service which provide the same function. This post will describe on how you can install and setup postfix on CentOS 6.4. After you installed postfix, you can use postfix command to controls the operation of the Postfix mail system such as start or stop the master daemon, do a health check, and other maintenance.

Also Read :   How to Install the Dependencies for GForge Community Edition and GForge Advanced Server

1. To install Postfix, use the following yum command :

[[email protected] ~]# yum install postfix -y

2. To verify if Postfix is already installed, use the following rpm command :

[[email protected] ~]# rpm -q postfix

Example :

[[email protected] ~]# rpm -q postfix

3. How to check Postfix version :

[[email protected] ~]# postconf -d | grep mail_version

Example :

[[email protected] ~]# postconf -d | grep mail_version
mail_version = 2.6.6
milter_macro_v = $mail_name $mail_version

4. Configure Basic postfix file :

[[email protected] ~]# vi /etc/postfix/

Uncomment and modify the following two line :

myhostname = centos6.4.ehowstuff.local
mydomain = ehowstuff.local

myhostname: is the host name of the system (i.e, the system is called mail or
mydomain: is the domain name for the email server (it can be a real or fake domain name).

Also Read :   How to Install 389 Directory Server on CentOS 5.8

5. Start the postfix service :

[[email protected] ~]# service postfix start
Starting postfix:                                          [  OK  ]

6. Restart the postfix service :

[[email protected] ~]# service postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]

7. How to show postfix pid number on running for postfix services ?

[[email protected] ~]# ps -ef | grep postfix
root      3081     1  0 05:57 ?        00:00:00 /usr/libexec/postfix/master
postfix   3083  3081  0 05:57 ?        00:00:00 pickup -l -t fifo -u
postfix   3084  3081  0 05:57 ?        00:00:00 qmgr -l -t fifo -u
root      3292  1963  0 06:40 pts/0    00:00:00 grep postfix

Leave a Reply