supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: qpsmtpd-forkserver on Mac OS X
Date: Tue, 6 Jun 2006 15:57:58 +0000	[thread overview]
Message-ID: <20060606155758.32069.qmail@3d2f285f0534b6.315fe32.mid.smarden.org> (raw)
In-Reply-To: <ACC1EED2-BDE8-4A61-8A9E-77C96FAFAD58@seespotcode.net>

On Mon, Jun 05, 2006 at 05:58:17PM +0900, Michael Glaesemann wrote:
> I'm trying to get qpsmtpd-forkserver[1] to start automatically on  
> server restart.
> 
> Mac OS X 10.4.6 (Intel Mac Mini)
> runit-1.5.1

This may be another problem, independent from what you report:  AFAIK
the poll() implementation of Mac OSX 10.4/Intel is broken, and doesn't
work for named pipes.  runit (or better daemontools' iopause()) has an
alternative implementation using select(), but this isn't chosen while
building as poll() is available, but broken.

> I can run the qpstmpd-forkserver from the command line using
> 
> sudo /usr/local/qpsmtpd/qpsmtpd-forkserver --detach --user www --port 25

I guess you get a prompt back after this command because of the --detach
option.

> The qpsmtpd wiki gives instructions[2] on how to configure qpsmtpd- 
> forkserver with runit. Here's /var/service/qpsmtpd/run
> 
> $ cat /var/service/qpsmtpd/run
> #!/bin/bash
> unset PERL_UNICODE
> /usr/local/qpsmtpd/qpsmtpd-forkserver --detach --user www --port 25
> $

The service daemon must not background (or 'daemonize') when supervised
by runit, but must run in the foreground.  Try to remove the --detach
option.

> When org.smarden.runit.plist is loaded (either manually using  
> launchctl or automatically on server restart), qsmtpd-forkserver  
> doesn't appear to work. However, something is definitely running on  
> port 25:

Maybe you didn't stop the daemon you started before from the command
line, and which detached from the terminal and process tree, and now
still listens on the port.

> I don't see anything in /var/log/system.log (where launchd problems  
> are logged) or /var/log/mail.log (the qpsmtpd log). When using  
> launchd/runit, nothing is logged to /var/log/mail.log at all. (When  
> run from the command line, mail.log contains information about  
> connections to the smtp server.)

There should be no difference, I don't know why you get no logs here.

HTH, Gerrit.


  reply	other threads:[~2006-06-06 15:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-05  8:58 Michael Glaesemann
2006-06-06 15:57 ` Gerrit Pape [this message]
2006-06-07  3:36   ` Michael Glaesemann
2006-06-07  9:20     ` Laurent Bercot
2006-06-07  9:54       ` Michael Glaesemann
2006-06-07 12:28         ` Charlie Brady
2006-06-07 13:40           ` Laurent Bercot
2006-10-12  6:56             ` Michael Glaesemann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060606155758.32069.qmail@3d2f285f0534b6.315fe32.mid.smarden.org \
    --to=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).