Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail is not working

Status
Not open for further replies.

gchen

Programmer
Nov 14, 2002
174
0
0
US
Hi,

I need some help with sendmail here... :(

my sendmail was working fine for more than a year. but it stopped working without a reason. i just found out a minute ago and it has been down for over 2 days.

it is a linux redhat 8, i have perl script to call sendmail when needed. before i post this message, i reboot it and no luck...

can anyone shed some light?

thanks a million!!!

gary
 
also, i just did a ps and below is what i got...

root 729 1 0 11:55 ? 00:00:00 sendmail: accepting connections
smmsp 739 1 0 11:55 ? 00:00:00 sendmail: Queue runner@01:00:00

does this mean my sendmail is up and running fine?
 
yes, sendmail is up, not sure if it is running fine.

Try sending your self some email...

 
i did this...

mailq -s test gchen@consultant.com < aaa

however the email did not reach gchen@consultant.com

then i did a mailq and there is the requests: 0

i guess some part of the sendmail is not working and the email was not sent for some reason.

any clue?

thanks!
 
i have enough disc space but i do not know how to restart sendmail, so i did a reboot at the beginning of this thread. should i restart sendmail? how do i do it? thanks!
 
what flavor of linux are you using?

also, check your mail.log (if you set up syslogd).
 
yes, i have syslogd. are the log files are those under
/etc/httpd/logs ?

or there is other place folder for sendmail log files?

thanks!
 
Most log files are in /var/log, there shouldn't be any log files going into /etc at all! Mail logs will be somewhere like /var/log/mail.info or /var/log/mail/*

To restart sendmail, try /etc/init.d/sendmail restart (or stop or start)

A good way to see if any errors are occuring in sending mail is to use telnet to test the server. A good guide to do this is:


HTH,

Darren.
 
Also on Redhat, you can run service sendmail restart (from /sbin).

Are you forwarding the e-mail to another mail server?

I like webmin for configuring servers. You could check the mail queues from there also.

Next step, check the sendmail logs.

Mark
 
Hi all! thanks for all the tips but i still have no luck :(

i tried to send a mail from command line and i did below...

>mail -s test gchen@consultant.com
this is just for test
.
>

i did not encounter any error at this point, at least not to my knowledge... so i did a mailq...

>mailq
/var/spool/mqueue is empty

there is no mailq nor gchen@consultant.com received it.

however, all my crob job was working and it fires up email afterwards and those email are in my mailbox.

So, what do i miss and any cure from anyone?

Thanks a lot!!!!!




 
Then i checked /var/log/maillog and the last entry was this...

Jun 30 00:44:09 nca-usa sendmail[11190]: j5U7i9ZJ011190: to=emb_list, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30144, relay=localhost.net. [65.59.245.131], dsn=4.0.0, stat=Deferred: Connection refused by localhost.net.

it said connection refused by localhost.net.

is it possible my server got a trajon? or is there any mail setting being altered incorrectly. i am the only user but i might did something stupid... :(

any clue? and thanks a lot for the help!!!!!
 
The machine sendmail is on thinks its name is localhost.net. How'd it get a foolish idea like that? Type the word 'hostname' at the command shell and see if that is what comes back. If you type 'hostname podunk', it will change the name to podunk. Now check /etc/mail/local-host-names and make sure the name of the domain or machine you are sending from is in there.

 
Hi, great tips! i went there and found something, then made change but problem still there. these were what i have done...

1. >hostname
>nca-usa.net

2. vi /etc/mail/local-host-names
~ (nothing in this file)

so i added one line for
nca-usa.net

3. i then reboot the server

4. after reboot, i tried to send an email via sendmail and still, it did not go through and the log entry is the same...

<snippet>
Jul 1 23:09:37 nca-usa sendmail[1021]: j6269bOc001021: to=emb_list, ctladdr=gchen (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30144, relay=localhost.net. [65.59.245.131], dsn=4.0.0, stat=Deferred: Connection refused by localhost.net.
</snippet>

why it is still saying localhost.net ?

On the other hand, i did an `uname -snm` and below is what i got...

(short domain name) $w = nca-usa
(canonical domain name) $j = nca-usa.net
(subdomain name) $m = net
(node name) $k = nca-usa.net

could it be the problem?


 
Localhost.net is a public domain... check the IP address 65.59.245.131.
You said the e-mail works for your crob jobs, which are internal. You are testing sendmail with an external account gchen@consultant.com.
I am guessing that sendmail is trying to relay the message through your local ISPs smtp server and it is refusing to relay.
 
Hi,

can someone shed the light for me why my sendmail send the email to localhost.net for connection? I guess i might have something done on my linux box incorrectly so sendmail route my send email request to localhost.net. below is my uname ...

(short domain name) $w = nca-usa
(canonical domain name) $j = nca-usa.net
(subdomain name) $m = net
(node name) $k = nca-usa.net

is there any clue, maybe sendmail append subdomain name (net) to the default localhost and send my request to localhost.net whereas it is a legit domain name and it refused my request.

am i on the right track toward solving the long lasting problem? OR if there is any recommended guru who can help me out with a charge?

welcome all suggestions to get going... THANKS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top