Mail Server Configuration Using sendmail Step 1 : Install the packages for mail server [root#] yum install sendmail* [root#] yum install procmail* [root#] yum install m4* Step 2 : Verify the packages [root#] rpmquery -qa | grep sendmail o/p: sendmail-8.14.4-8.el6.i686 sendmail-cf-8.14.4-8.el6.noarch Step 3 : Check the hostname [root#] hostname o/p: server.tyit.com Step 4 : Get the IP Address [root#] ifconfig o/p: 192.168.2.112 Step 5 : Open the Macro file of sendmail "/etc/mail/sendmail.mc" Line No : 116 DAEMON_OPTIONS('port=smtp,Addr=127.0.0.1,name=MTA')dnl Put "dnl #" in the beginning of the line dnl # DAEMON_OPTIONS('port=smtp,Addr=127.0.0.1,name=MTA')dnl ** Save the file and come back to terminal Step 6 : Convert the macro file in configuration file [root#] m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf Step 7 : Open the /etc/hosts Add last the line 127.0.0.1 server.tyit.com ** Save the file and come back to terminal Step 8 : Stop the firewall [root#] service iptables stop Step 9 : Turn off Linux Security [root#] setenforce 0 Step 10. Start and restart the sendmail service [root#] service sendmail start [root#] serivce sendmail restart Step 11 : Add a user "testB" [root#] useradd testB Step 12 : Allocate password to the user [root#] passwd testB o/p: Changing password for user testB. New password: (123) Retype new password: (123) passwd: all authentication tokens updated successfully. Step 13 : Check the hostname [root#] hostname server.tyit.com Step 14 : Sending a mail to user "testB" [root#] mail testB@server.tyit.com o/p: Subject: Testmail Hi m testing the mail [CTRL + D] EOT Step 15 : [root#] chkconfig sendmail on [root#] service sendmail restart