How to Setup Postfix on CentOS 6.4

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.

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

[root@centos64 ~]# yum install postfix -y

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

[root@centos64 ~]# rpm -q postfix

Example :

[root@centos64 ~]# rpm -q postfix

3. How to check Postfix version :

[root@centos64 ~]# postconf -d | grep mail_version

Example :

[root@centos64 ~]# postconf -d | grep mail_version
mail_version = 2.6.6
milter_macro_v = $mail_name $mail_version

4. Configure Basic postfix file :

[root@centos64 ~]# 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).

READ  How to Fix GNOME License Not Accepted Issue on CentOS 7

5. Start the postfix service :

[root@centos64 ~]# service postfix start
Starting postfix:                                          [  OK  ]

6. Restart the postfix service :

[root@centos64 ~]# service postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]

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

[root@centos64 ~]# 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

Your email address will not be published. Required fields are marked *

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee