Operating System - HP-UX
1827382 Members
4105 Online
109963 Solutions
New Discussion

Sendmail - disable on workstation & enable on server

 
SOLVED
Go to solution
Irfan Ahmed_1
Advisor

Sendmail - disable on workstation & enable on server

Hi unix fundus,

I want to know how can I disable sendmail in workstations & keep sendmail active only in the server. I am using HP-UX 11.00. Which all files need to be changed.

Is there any way in which by just doing some changes in the server will solve my problem

Thanks
5 REPLIES 5
Slawomir Gora
Honored Contributor

Re: Sendmail - disable on workstation & enable on server

Hi,

modify file

/etc/rc.config.d/mailservs

Sunil Sharma_1
Honored Contributor

Re: Sendmail - disable on workstation & enable on server

edit /etc/rc.config.d/mailservs

in server change it to this

export SENDMAIL_SERVER=1


and on workstation
export SENDMAIL_SERVER=0


Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Andrea Rossi
Frequent Advisor

Re: Sendmail - disable on workstation & enable on server

remember also to set
SENDMAIL_SERVER_NAME=
in mailsrvs, which takes pecedence over SENDMAIL_SERVER variable, and
domain mydom.com
in your resolv.conf
Geoff Wild
Honored Contributor

Re: Sendmail - disable on workstation & enable on server

On workstation:

/sbin/init.d/sendmail stop

In /etc/rc.config.d/mailservs
SENDMAIL_SERVER=0

In cron:

# Make sure any queued mail is delivered, as sendmail isn't a daemon anymore
0,30 * * * * /usr/sbin/sendmail -q

On server, make sure SENDMAIL_SERVER=1 and see if it is running:
ps -ef|grep sendmail

If not:

/sbin/init.d/sendmail start

You may also have to configure sendmail on server in /etc/mail/sendmail.cf

# who I masquerade as (null for no masquerading) (see also $=M)
DMyourdomain.com

# "Smart" relay host (may be null)
DSyourmainmailserver

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor
Solution

Re: Sendmail - disable on workstation & enable on server

Disabling the daemon is only half the issue.

So long as the binary exists and networking is set up properly, the workstation will still be able to send mail.

The daemon only has to be up for the box to accept mail.

So if you follow the solutions provided thus far, a web server or application or cronjob on the workstation will be able to send mail.

To stop that you can do several things:

1) Change permissions on sendmail binary to not executable.
2) Change networking so hostname resolution fails.
3) Make the sendmail.cf file relay to a server that won't accept mail.

Neither of these ideas is terrific. To provide further advice I would need to know why you are disabline sendmail. If its to stop mail acceptance, the prior posts will work. If its to stop outbound mail on the workstations, more work is required.

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