From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/605 Path: main.gmane.org!not-for-mail From: Vincent Danen Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: supervising postfix Date: Sat, 16 Oct 2004 19:38:43 -0600 Message-ID: <47B750CA-1FDD-11D9-8DD8-000A9598BFB2@annvix.org> References: <532D0697-1FCC-11D9-8DD8-000A9598BFB2@annvix.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-55--589160665" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097977143 15434 80.91.229.6 (17 Oct 2004 01:39:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2004 01:39:03 +0000 (UTC) Original-X-From: supervision-return-844-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Oct 17 03:38:47 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14] ident=qmailr) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1CJ00V-0002tl-00 for ; Sun, 17 Oct 2004 03:38:47 +0200 Original-Received: (qmail 6686 invoked by uid 76); 17 Oct 2004 01:39:08 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 6680 invoked from network); 17 Oct 2004 01:39:07 -0000 In-Reply-To: <532D0697-1FCC-11D9-8DD8-000A9598BFB2@annvix.org> Original-To: X-Pgp-Agent: GPGMail 1.0.2 X-Mailer: Apple Mail (2.619) X-SA-Exim-Connect-IP: 68.149.32.61 X-SA-Exim-Mail-From: vdanen@annvix.org X-SA-Exim-Version: 4.1 (built Mon, 20 Sep 2004 22:38:34 -0600) X-SA-Exim-Scanned: Yes (on hades.annvix.org) Xref: main.gmane.org gmane.comp.sysutils.supervision.general:605 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:605 --Apple-Mail-55--589160665 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 16-Oct-04, at 5:37 PM, Vincent Danen wrote: >>> Patching postfix is not my idea of a good time, either. I'd prefer >>> to >>> not mangle as much software as possible because it becomes a >>> maintenance nuisance. >> >> Sure, but you already have a maintenance problem, right now. Postfix >> doesn't run for you. > > Well, it does. Not the way that I exactly want, but I can start > postfix from stage 1 and have it work. Of course, if I do it this way > I have to "exec chpst -P postfix start &" which isn't elegant. > > I'm recompiling postfix now with the change to master.c you noted in > your next email and we'll see if I can make master run under > supervision and do the right thing. Ok, just patched master.c and it works properly supervised now. For the archives, and anyone else looking to run postfix 2.1.5 supervised: [vdanen@dionysus SPECS]$ bzcat ../SOURCES/postfix-2.1.5-avx-warnsetsid.patch.bz2 --- postfix-2.1.5/src/master/master.c.avx 2004-10-16 15:47:25.000000000 -0600 +++ postfix-2.1.5/src/master/master.c 2004-10-16 15:49:27.000000000 -0600 @@ -286,9 +286,10 @@ * Run in a separate process group, so that "postfix stop" can terminate * all MTA processes cleanly. Give up if we can't separate from our * parent process. We're not supposed to blow away the parent. + * Annvix: to run master supervised, we change this from being fatal to being a warning */ - if (setsid() == -1) - msg_fatal("unable to set session and process group ID: %m"); + if (setsid() < 0) + msg_warn("setsid failed: %m"); /* * Make some room for plumbing with file descriptors. XXX This breaks Thanks, Charlie! That seemed to work quite well. -- Annvix - Secure Linux Server: http://annvix.org/ *Please note gpg keyid FE6F2AFD has been replaced with keyid FEE30AD4* "lynx -source http://linsec.ca/vdanen.asc | gpg --import" {FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4} --Apple-Mail-55--589160665 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFBcc0jLrxeMv7jCtQRAmNIAJ9csOnxUhZmaZ6wHzSKf7H6A6ofcACeNmAK NW2Jz04wLUynH88iDKeFMho= =OHVs -----END PGP SIGNATURE----- --Apple-Mail-55--589160665--