Operating System - HP-UX
1748169 Members
4202 Online
108758 Solutions
New Discussion юеВ

Sending mail without sendmail

 
SOLVED
Go to solution
Kevin Masaryk
Occasional Advisor

Sending mail without sendmail

None of our HP-UX servers receive email so I'd think I should be able to turn off sendmail. However, each server does need to retain the ability to send email; primarily from the HP Event Monitor but there's also a couple of perl programs running which send emails out every now and then.

I've noticed that if I stop the sendmail demon, "mail kevin@foo.com" no longer works. The only thing we change in the sendmail.cf file is "DSmail.foo.com" We also use a .forward file for root so email goes to our email boxes elsewhere on the network.

Does anyone have any suggestions as to how I can remove sendmail yet still be able to send from the server from the cmd line, shell scripts and the Event Monitor?

Thanks,
Kevin Masaryk
3 REPLIES 3
Mel Burslan
Honored Contributor

Re: Sending mail without sendmail

It is hard to understand why you change the smart relay directive (DS) if you want to send out email from this server.

if you keep this DSmail.foo.com in place, and still shut the sendmail daemons, you should be able to send email out of this bix using a command like

cat mailfile | sendmail kevin@foo.com

The smart relay is who handles the delivery of your outgoing email and should not be removed or changed to something which is not a mail relay.
________________________________
UNIX because I majored in cryptology...
Christopher Caldwell
Honored Contributor

Re: Sending mail without sendmail

To send with queueing, but not to recieve, change the startup script line in /sbin/init.d from something like
sendmail -bd -q30m
(run sendmail in daemon mode, run the queue every thirty minutes)
to
sendmail -q30m
(don't accept mail), send immediate if you can, run the queue every 30 minutes if you can't.

For immediate effect, stop sendmail and use the sendmail -q30m command at the command line.
Steven E. Protter
Exalted Contributor
Solution

Re: Sending mail without sendmail

You kind of need sendmail.

You seem to have disabled the daemon in the /etc/rc.config.d/sendmail file.

If you use mailx, it actually passes the mail to the sendmail binary to get it off the box.

elm uses sendmail as mta as well.

You can configure a differenet mail transport, but if you want sendmail to really be gone, remove it or change the permissions on the binaries.

Be prepared for some work getting any mail you need off the machine off of it. Even that DS directive uses in a standard configuration the sendmail binary to process the mail.

The sendmail binary itself used just for sending as you have configured it, is not a security risk, so long as you keep it patched up.

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