Joseph4829
Jan 16 2004, 02:50 AM
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
Jan 16 2004, 02:56 AM
sendmail logs are normally in /var/log/maillog
though errors from cgi scripts probably be in /var/log/httpd/error_log
Joseph4829
Jan 16 2004, 03:07 AM
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
Jan 16 2004, 03:11 AM
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
Jan 16 2004, 03:15 AM
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
Jan 16 2004, 03:25 AM
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
Jan 16 2004, 03:36 AM
QUOTE
sendmail_path = /usr/sbin/sendmail -t -i
Correct. Any ideas what the problem is?
jaume
Jan 16 2004, 04:47 AM
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
Jan 16 2004, 11:34 AM
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
Jan 16 2004, 05:36 PM
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.