Sunday, August 15, 2010

sendmail on Centos 5.5

Hello...

I'll describe how to install sendmail onCentOs 5.5

------------------------------------------------

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

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

After you install sendmail 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 configurations.

cd /etc/mail
cp sendmail.mc sendmail.mc.org

vi sendmail.mc

We have to do some modifications to sendmmail.mc

Org cord..
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.

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@account.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.