Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when I try to send mail on centos: mail -s "hello" root

to=root, ctladdr=root (0/0), delay=00:00:00\ , xdelay=00:00:00, mailer=relay, pri=30031, relay=[] [], dsn=4.0.0, stat=Deferred: Con\ nection refused by []

my question is: 1. do I need to setup a smtp mail server on localhost for mail to work?

share|improve this question
up vote 2 down vote accepted

Yes. There are plenty of HOWTOs on configuring sendmail, but iirc CentOS comes out of the box ready to run a working sendmail (for sending) on localhost. Try

chkconfig --list sendmail

and if it's not running,

chkconfig sendmail on
service sendmail start

and try again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.