Help - Search - Members - Calendar
Full Version: Sendmail not working on RHE?
The Planet Forums > Operating Systems > Red Hat Linux
Joseph4829
I'm new to RHE and I want to see if sendmail is working correctly. Some of my scripts aren't sending out any emails. Is there an error log for sendmail? Or does someone know what may be wrong?

J.
simonmay
sendmail logs are normally in /var/log/maillog
though errors from cgi scripts probably be in /var/log/httpd/error_log
Joseph4829
Thanks!

I looked in the mail log and everything seems to be going out. I also looked in the apache log and didn't see anything about sendmail. Any thoughts why mail may not be going out?


Also, what is the command to clear a text file?
simonmay
to clear a text file
echo > filename

is the script php or perl
if perl

check that the mail program path is correct

try "which sendmail" to see the correct path
Joseph4829
Its PHP.

I did a "which sendmail" and got this below. I did a "ps -A" and it said it was running. Does my script not know where to find sendmail?

/usr/bin/which: no sendmail in (snip)
simonmay
in the php.ini
you will see
sendmail_path = /usr/sbin/sendmail -t -i

check out
http://www.redhat.com/docs/manuals/enterpr...-email-mta.html
Joseph4829
QUOTE
sendmail_path = /usr/sbin/sendmail -t -i


Correct. Any ideas what the problem is?
jaume
Make sure you don't get any error on the /var/log/maillog ... try tailing it on real time while sending the email tests.

tail -f /var/log/maillog

do you have a valid hostname that resolve dns?
Joseph4829
QUOTE
do you have a valid hostname that resolve dns? [/B]




I checked the sendmail error logs and it looks like everything goes out.

How can I check to make sure the hostname is valid and resolves?

J.
Joseph4829
I got it to work. The hostname "server2.example.com" was not in the NS record and could not resolve. Thanks everyone!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.