Step 1: Install postfix packages
#yum install postfix
switch the postfix mta for mail
#alternatives –config mta
select postfix and stop the service
#service sendmail stop
Step 2: edit postfix configuration file
#vim /etc/postfix/main.cf
Line no:69
myhostname = station4.rhel5.com
Line no:77
mydomain = rhel5.com
Line no:93
myorigin=$mydomain
Line no:
mydestination = $myhostname, localhost.$mydomain,localhost,$mydomain
Line no:last
masquerade_exceptions = root
Step 3: Restart the postfix service
#chkconfig postfix on
#service postfix restart
#netstat –tulpn |grep master
Step 4: Send email to user
#mail –v man@rhel5.com
Subject:test email
Sample mail from user root
.
Cc:
Step 5: Login as man check the email
#su – man
$mail
Post fix Mail server configuration in Red Hat rhel5
0 Comments