Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

How emails get sent out while sendmail is not running?

SOLVED
Go to solution
newa
Frequent Advisor

How emails get sent out while sendmail is not running?

Hi,

We took over some rp3440 servers (running HP-UX 11i v2) from company X and recently people at company X informed us they still got eamils generated from those servers by Event Monditor and corn.

When I logged onto the those boxes I was surprised to find the sendmail servers were not even running on those boxes:

********************************************
# ps -ef|grep -i sendmail
root 21767 21730 0 13:19:14 pts/0 0:00 grep -i sendmail
# cat /etc/rc.config.d/mailservs
export SENDMAIL_SERVER=0
export SENDMAIL_SERVER_NAME=
export SENDMAIL_RECVONLY=0
export SENDMAIL_SENDONLY=0
#
*************************************

My question is without sendmail server ruuning how could those mails get sent to company X by Event Monitor and cron?

Thanks a lot in advance.

4 REPLIES
James R. Ferguson
Acclaimed Contributor
Solution

Re: How emails get sent out while sendmail is not running?

Hi:

You only need to run 'sendmail' as a daemon if you want to receive mail in real-time from outside of your server. That is, if you aren't using your server as a mail server then, generally, you don't cause 'sendmail' to continuously run.

In your case, like many of us, 'sendmail' is used to manage internal mail (usually with the friendly 'mailx' front-end) and/or to pass mail messages outward to a corporate mail engine.

By configuring the 'DS' ("smart relay" macro in '/etc/mail/sendmail.cf' to look like:

need to setup the smart relay macro in '/etc/mail/sendmail.cf'. You should have something like:

# DSmymailserver.xyz.com

...which would specify 'mymailserver.xyz.com' as the name of your corporate mail server (as for example, some Microsoft Exchange server).

Regards!

...JRF...
Doug O'Leary
Honored Contributor

Re: How emails get sent out while sendmail is not running?

Hey;

Check cron; one common config is to have sendmail process the queue every X minutes via a cron job.

Typically, espeicially with older versions of sendmail, the daemons don't have to be running in order to send mail. The daemon receives mail; another much shorter lived instance of the binary is actually responsible for sending it.

mailx, and its kin, kick off their own iteration of sendmail. Current versions submit the new mail to client queue; older versions just sent it out.

If you're running an older version of sendmail, any script that "sends mail" will still send it even w/o the daemons running.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Steven Schweda
Honored Contributor

Re: How emails get sent out while sendmail is not running?

> If you're running an older version of
> sendmail, [...]

A sendmail program (any version) is not
needed to send e-mail. It can be done using
a Telnet client, for example. Many
network-capable programs can do it.

If you can't find the program/script which is
sending the stuff, and if you don't want any
e-mail to be sent from a system, then you
might consider using a firewall of some sort
to block outgoing access to port 25 from that
system.

A big find+grep job (on the whole set of file
systems) looking for the old domain name
might be worth a try. (Might find some other
junk, too.)
newa
Frequent Advisor

Re: How emails get sent out while sendmail is not running?

Thank you all for answering my question.