Postfix 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 :
[[email protected] ~]# yum install postfix -y
2. To verify if Postfix is already installed, use the following rpm command :
[[email protected] ~]# rpm -q postfix
[[email protected] ~]# rpm -q postfix postfix-2.6.6-2.2.el6_1.x86_64
3. How to check Postfix version :
[[email protected] ~]# postconf -d | grep mail_version
[[email protected] ~]# postconf -d | grep mail_version mail_version = 2.6.6 milter_macro_v = $mail_name $mail_version
4. Configure Basic postfix main.cf file :
[[email protected] ~]# vi /etc/postfix/main.cf
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 mail.example.com).
mydomain: is the domain name for the email server (it can be a real or fake domain name).
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
Like this Article? Subscribe to Our Feed!
This article was posted on Sunday, May 19, 2013 at 12:25 PM