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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutting down sendmail

Status
Not open for further replies.

sericson

Programmer
Jun 22, 2005
1
US
I have inherited a departmental computer lab at a university. We are shutting down the deparmental e-mail server in lieu of the university wide e-mail system. I could simply shut off the the sendmail daemon, but e-mail bounces take too long. I would like ALL e-mail sent to the server to immediately bounce (and outgoing mail to by denied as well). I'm sure if play with it long enough I could accidentally break it and all mail would bounce, but I would like the sendmail system to be recoverable in case the system has to be temporarily reinstated.

I have never dealt with sendmail before so no amount of detail is too much.

Thanks, Shawn
 
if you're running linux, the file that usually starts sendmail is /etc/rc.d/rc.sendmail (name and or location may differ depending on the dist you are using)

run as root "killall sendmail"
edit rc.sendmail, and comment out the first portion which should be something like:

sendmail_start() {
if [ -x /usr/sbin/sendmail ]; then
echo "Starting sendmail MTA daemon: /usr/sbin/sendmail -L sm-mta -bd -q25m"
/usr/sbin/sendmail -L sm-mta -bd -q25m
echo "Starting sendmail MSP queue runner: /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m"
/usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
fi
}

to

#sendmail_start() {
# if [ -x /usr/sbin/sendmail ]; then
# echo "Starting sendmail MTA daemon: /usr/sbin/sendmail #-L sm-mta -bd -q25m"
# /usr/sbin/sendmail -L sm-mta -bd -q25m
# echo "Starting sendmail MSP queue runner: #/usr/sbin/sendmail -L sm-msp-queue -Ac -q25m"
# /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
# fi
#}

You could delete the lines but if you ever decide to reactivate it you'll have a problem on your hands.

you may also want to locate your sendmail binaries and rename them to sendmail.bak or something so nobody (or no process) an in-advertently start them up again

Hope this helps
 
Mail coming into that server is coming in because it is directed there by dns or the universities router. If the mail server has an ip address that starts with 192.168.x.x or 10.x.x.x then it is a private ip address and you will need to get someone to change the port forwarding of the router. If it is a public ip address, one that can be accessed directly from the internet, then you need to change the dns "MX" record for that server. Many universities have their own dns servers so you would contact the administrator of those servers. Once this is done, no mail will come into the server. It will be redirected to the ip address of the new server.

 
RhythmAce:

I thought of that, but he's also wanting to deny any message being sent as well. (no email functionality period) atleast that's the way it reads to me.

 
I gathered that too. I was just coming from the bounce aspect. He can shutdown sendmail and if he changes his dns records to point to the new server he doesn't have to wait for mail to bounce.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top