From owner-freebsd-questions Wed Jan 14 16:09:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA20049 for questions-outgoing; Wed, 14 Jan 1998 16:09:13 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA19977 for ; Wed, 14 Jan 1998 16:08:11 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id VAA00470; Thu, 15 Jan 1998 21:07:54 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id KAA14702; Thu, 15 Jan 1998 10:37:51 +1030 (CST) (envelope-from grog) Message-ID: <19980115103751.40881@lemis.com> Date: Thu, 15 Jan 1998 10:37:51 +1030 From: Greg Lehey To: stephen farrell Cc: michael dorin , questions@FreeBSD.ORG Subject: Re: smtp restarting after changes to sendmail.* References: <199801140606.GAA00312@chaski.com> <8767nnf51i.fsf@phaedrus.uchicago.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84e In-Reply-To: <8767nnf51i.fsf@phaedrus.uchicago.edu>; from stephen farrell on Wed, Jan 14, 1998 at 09:28:57AM -0600 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk On Wed, Jan 14, 1998 at 09:28:57AM -0600, stephen farrell wrote: > michael dorin writes: > >> How do I restart smtp without rebooting after I change the sendmail >> files? > > In my opinion this is a benefit of sysV way of doing things over > BSD--under solaris, e.g., you do /etc/init.d/sendmail stop; > /etc/init.d/sendmail start and you don't have to worry about flags and > so on. No, instead you have to worry about the name of the file. Even if you can remember it, it's a lot more to type. If I try that on my System V box (IRIX 5.3), I get: # /etc/init.d/sendmail stop bash: /etc/init.d/sendmail: No such file or directory In other words, it's not a universal solution. IRIX 5.3 *does* have a directory /etc/init.d with the kind of scripts you describe, but it doesn't include sendmail. > Unless I'm sadly mistaken and need to take myself out and shoot > myself, under freebsd you need to > (a) ps -auxx and find the sendmail process and kill it (or use > killall, which I never think of b/c I use solaris so much, and > killall in solaris does something totally immoral) Yes. This is the same procedure for just about every daemon. > (b) check the flags for sendmail in /etc/rc.conf, No. > and then (c) run sendmail (which is in /usr/sbin) with those flags. > (of course you quickly learn /usr/sbin/sendmail -bd -q1h). Again, no. You send it a SIGHUP: # ps auxx | grep sendmail root 14683 0.8 0.5 264 472 p9 S+ 10:33AM 0:00.02 grep sendmail root 7810 0.0 0.4 596 332 ?? Is 11:52AM 0:01.81 sendmail: accepting connections on port 25 (sendmail) # kill -1 7810 My Sun box just died, so I can't confirm that this is what /etc/init.d/sendmail restart does, but I strongly suspect it. This difference in approach is one of the big differences between System V and BSD. In BSD, you go out and do it. In System V, you find a script which does it for you, and you may spend more time looking for the script and how to use it than it would have taken you to do the job in the first place. To make a point, I've just found the script on my IRIX box. It's called /etc/init.d/mail, not /etc/init.d/sendmail. It's too long to quote here, but it doesn't send a SIGHUP (which is the correct way to do it). You need to do a 'stop' followed by a 'start'. I can't see any merit in this approach. Greg