Click Add

Friday, February 15, 2013

Sendmail on Centos 5.x

How to install sendmail onCentOs 5.5??

Installation:
Normally, Sendmail (MTA) comes with Centos5.x. But if you cannot find sendmail install on your server
you can donwload the package from

http://www.sendmail.org/releases
.

After finishing the installation of sendmail in centos
You can check the sendmail status by following commands

#sendmail status - [give the sendmail current status]
#sendmail stop - [stop sendmail]
#sendmail start - [start sendmail]
#sendmail restart- [restart sendmail]

Sendmail basic configurations.

#cd /etc/mail
#cp sendmail.mc sendmail.mc.org [copy and store the original configuration file]

#vi sendmail.mc

We have to do 4/5 modifications to sendmmail.mc

Step-1.
dnl define(`SMART_HOST', `smtp.your.provider')dnl

change to
define(`SMART_HOST', `your service provider')dnl

There are more modifications to be done in sendmal.mc,
however if you made this modification correct,
you can rout mails through your smart host.

After you done the change you can save and quit. (:x :wq)

Ten, you have to compile the sendmail.mc to sendmail.cf to do that,

#cd /etc/mail

#m4 sendmail.mc > sendmail.cf

#service sendmail restart

now you can test your sendmail (MTA)

command,

sendmail -v yourmal@urdomain.com
this is test mail
.

you can check the mail log using

tail -f /var/log/maillog

If want to check the MTA functions locally, create local few local mail accounts. Then you can check there mail boxes.

#

No comments:

Post a Comment