Operating System - Linux
1827259 Members
2248 Online
109716 Solutions
New Discussion

no sendmail shown, and it is working?

 
Hanry Zhou
Super Advisor

no sendmail shown, and it is working?

If I type ps -ef | grep sendmail, it is not running, but the system is able to send out emails. why?

the script /sbin/init.d/sendmail shows "sendmil -bd.."

Also when I do telnet mysystem 25, get connection refused, why?
none
6 REPLIES 6
Mark Grant
Honored Contributor

Re: no sendmail shown, and it is working?

The fact that you get connection refused strongly indicates that sendmail isn't running.

What do you use to send email?. Many e-mail clients ar eperfectly able to send and receive mails on their own. For example kmail can use sendmail but it can use smtp or pop or whatever as it has the protocols built in.

It is highly unlikely that sendmail is your mail agent in this case.
Never preceed any demonstration with anything more predictive than "watch this"
Martin P.J. Zinser
Honored Contributor

Re: no sendmail shown, and it is working?

Also that there is a script in /init.d does not
actually mean it is executed ;-) It just indicates that sendmail is a viable configuration option for the various runlevels.
How exactly this happens depends on the flavor of Linux you use. As for SuSE, there needs to be a link to the script in the rc[0-6].d directories to actually execute the script.
Stuart Browne
Honored Contributor

Re: no sendmail shown, and it is working?

What about 'ps -elf | grep sendmail' ? 'ef' could be cutting the command short.

In any case, to avoid speculation as to what is listening on port 25, use the command 'netstat -ntlp | grep :25'. It will return the LISTEN line, including the PID and process name of the daemon listening on that port.

You should be able to track it down from there.
One long-haired git at your service...
Elmar P. Kolkman
Honored Contributor

Re: no sendmail shown, and it is working?

There is another possibility too: you don't have to have sendmail running to be able to send mail, just to receive mail. And to send mail that could not be sent immediately and is queued for the time being (try a mailq).

When you send mail to an address not located on your own server, sendmail is started and it tries to send that to its relay or directly to the server in question. If that fails, the mail is put on the mailqueue.

When you only send and receive locally sendmail is not started: the mail will be delivered directly into the user's mailbox.

It is a good practice to not have sendmail running in daemon mode if you don't want to receive mails from other locations on your machine, but in that case put a line in your scheduler to run a sendmail to flush your mailqueue frequently (once every hour, for instance).
Every problem has at least one solution. Only some solutions are harder to find.
K.C. Chan
Trusted Contributor

Re: no sendmail shown, and it is working?

Generally you don't want to run a sendmail, just to be able to send email. You only need it when you want to recieve email. From what I gather from previous respones, you already have an email server set up. Why are you setting up another one?
Reputation of a thousand years can be determined by the conduct of an hour
Steven E. Protter
Exalted Contributor

Re: no sendmail shown, and it is working?

try this:

sendmail -v -d8 -d38 someone@yahoo.com
Type some text

.



You shold see things happen interactively.
This will definitively tell you whether sendmail is working or not.

The daemon only needs to run to accept mail, not to send it.

Also, try
service sendmail status

This checks daemon status.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com