From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1146 Path: news.gmane.org!not-for-mail From: Michael Glaesemann Newsgroups: gmane.comp.sysutils.supervision.general Subject: qpsmtpd-forkserver on Mac OS X Date: Mon, 5 Jun 2006 17:58:17 +0900 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1149497919 22202 80.91.229.2 (5 Jun 2006 08:58:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2006 08:58:39 +0000 (UTC) Original-X-From: supervision-return-1382-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Jun 05 10:58:33 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1FnAuo-0003t9-7S for gcsg-supervision@gmane.org; Mon, 05 Jun 2006 10:58:26 +0200 Original-Received: (qmail 22789 invoked by uid 76); 5 Jun 2006 08:58:46 -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 22783 invoked from network); 5 Jun 2006 08:58:46 -0000 Original-To: supervision@list.skarnet.org X-Mailer: Apple Mail (2.750) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1146 Archived-At: Hello! 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 qpsmtpd-0.32 -- An easily extensible smtp server written in Perl. From what I can tell, the qpsmtpd installation is working fine, and the runit installation is okay. However, using the two together doesn't seem to work. Details of my configuration are below. I've googled and looked through the documentation on using runit with qpsmtpd [2] and runit with launchd [3], but am at a loss as to what I have misconfigured. I've posted this to the runit mailing list first, as it appears that my qpstmpd installation is okay. If it looks like it's a qpstmpd configuration problem, I'll definitely ask there as well. Any hints or suggestions on what else I might check in my configuration, or where I might find additional information is appreciated. If there's any information about the setup I can provide to make it easier to diagnose, please let me know. Thanks! Michael Glaesemann grzm seespotcode net [1](http://smtpd.develooper.com/) [2](http://wiki.qpsmtpd.org/runit) [3] (http://smarden.org/runit/useinit.html#macosx) ----- I can run the qpstmpd-forkserver from the command line using sudo /usr/local/qpsmtpd/qpsmtpd-forkserver --detach --user www --port 25 After launching the qpsmtpd-forkserver from the command line, I can connect to the smtp server via telnet: $ telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 wilde.local ESMTP qpsmtpd 0.32 ready; send us your mail, but not your spam. The server also delivers mail as expected when launched from the command line. 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 $ I've installed runit according to the instructions, including the modifications for installation on Mac OS X (modifications to src/conf- ld and src/Makefile) Installation appeared to go fine. I saw no errors at the end of the installation script. $ ls -la /sbin/runsvdir-start -rwxr-x--- 1 root wheel 554 Jun 5 11:17 /sbin/runsvdir-start $ ls -la /var/service/qpsmtpd/ total 8 drwxr-xr-x 5 root wheel 170 Jun 5 17:19 . drwxr-xr-x 3 root wheel 102 Jun 5 11:24 .. drwxr-xr-x 3 root wheel 102 Jun 5 17:20 log -rwxr-xr-x 1 saiadmin wheel 99 Jun 5 13:08 run drwx------ 8 root wheel 272 Jun 5 17:52 supervise /var/service/qpsmtpd/supervise was created automatically and I can see that the modification time is incrementing. This is why I think runit is properly installed. $ cat /var/service/qpsmtpd/run #!/bin/bash unset PERL_UNICODE /usr/local/qpsmtpd/qpsmtpd-forkserver --detach --user www --port 25 wilde:/usr/local/qpsmtpd saiadmin$ $ cat /Library/LaunchDaemons/org.smarden.runit.plist Label org.smarden.runit ServiceDescription runsvdir - starts and monitors a collection of runsv (8) processes QueueDirectories /var/service OnDemand Disabled ProgramArguments /sbin/runsvdir-start $ 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: $ netstat -atn | grep -e '\.25' tcp4 0 0 *.25 *.* LISTEN $ Connecting via telnet fails: $ telnet localhost 25 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. $ 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.)