How do i set up an outbound mail server on our server?

Our company intranet is hosted on our in-house Centos 5.2 server. Our company hosts their company email with a web hosting provider, but there are forms on our intranet where I need to setup an outbound mail server in order for the form results to be sent out. Anyone know how to configure a centos 5.2 server for outbound mail? Or is it easier to install third-party outbound mail server software? If so, does anyone know any good products? Thanks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Centos by default has sendmail installed
which will work as mail server which means you will be able to sent email outside by using this (unless you have any restriction on your firewall )

to start sendmail :server sendmail start

you can test if its working or not :

cat text.txt | mail -s "test email "

you will see you have received an email in gmail account with content of text.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
No third party softwares are needed.  You can use sendmail or postfix, both of which come with RedHat.  It is not even hard to configure them.  Do you just need outgoing mail only?

iamdiggnifiedAuthor Commented:
yes I need outgoing mail only. So on centos 5.2 i only have to type :server sendmail start to activate it? I'm a web designer so this backend stuff i'm unfamiliar with. Do i have to do anything else to set up Send mail on our centos 5.2 server?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Your configuration is very basic.

Basically you need to do

service sendmail start

chkconfig sendmail on

See if you can send out mail

echo "testing" | mail -s "Test msg" <EMAIL_ADDR>

Check mailq

If DNS is configured right, it should start sending out, out-of-box.
as a web programmer you dont need to do anything.

if you use php, then from you php code you need to configure what outgoing email address you want to use

other wise, when you will sent email to another email address, "from" might be look like this


you can change this from php or what ever web language you are using .
Ok, without starting sendmail, try:

First do

echo "testing" | mail -s "Test msg" <EMAIL_ADDR>

If it doesn't, then try starting sendmail.  Sendmail is not just MTA, it is MUA also.  I will have to look again.  Just try sending again.  I would look into it later.

iamdiggnifiedAuthor Commented:
farzanj, how do i determine if our dns is configured right? How do I get our Centos server to recognize our DNS or IP address? Will our outbound email server not work if our DNS or IP address is not recognized by our Centos server?
Do a query on your DNS.  It should point to the correct MX.  So suppose if MYDNS is IP address or FQDN of your DNS server, then issue the following command


In the answer section, number of answers should be at least 1.

It does not care what kind of OS the DNS server is being run on.
iamdiggnifiedAuthor Commented:
This was the best answer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.