Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
netqmail supervise scripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
therealjrd
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 106

PostPosted: Sun Nov 13, 2011 1:03 pm    Post subject: netqmail supervise scripts Reply with quote

Sorry if there's a better place to post this, seemed like as good a fit as any.

I'm just commisioning a couple of new servers with netqmail. svc fails to start it, as /var/qmail-send/supervise (due to symlinks, really /var/qmail/supervise/qmail-send/supervise) doesn't exist. Same goes for qmail-smtpd and some other stuff.

I have an older machine also with netqmail-1.06, which works fine. I believe I followed http://www.gentoo.org/doc/en/qmail-howto.xml on all these hosts, but reviewing it again now, I don't see a mention of creating those dirs for svc. equery on both new and old machines doesn't claim a package own that stuff, so it probably is meant to get created by some script or something.

I've probably braino'ed something, but it's not obvious (by definition) what. Hints? What's supposed to set up the supervise infrastructure for qmail daemons?

Thanks in advance...
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Tue Nov 15, 2011 3:52 pm    Post subject: Reply with quote

Quote:
/var/qmail/supervise/qmail-send/supervise


It seems like you would just have a "run" command and log/ directory
in /var/qmail/supervise/qmail-send/. (One too many levels of subdirectory
there). Then symlink /var/qmail/supervise/qmail-send/ to a subdirectory
under /service/, so that svscan finds it when svscan is started at boot.
You also need to add svscan to the services started at boot with
rc-update.

(The run command has the path to wherever the qmail-send binary is located.)

You could install the daemontools and qmail sources from http://cr.yp.to/
to see how the default "make install" arranges things. daemontools
binaries end up in /command/ and IIRC qmail binaries end up in a
subdirectory of /var/qmail/, so they should not collide with the Gentoo
packages, which tend to keep binaries in /usr/bin/, /usr/sbin/, etc, and
start svscan from a script in /etc/init.d/ rather than from /etc/inittab.

If you have existing /var/qmail/ and /service/ directories with content,
move them out of the way first, and copy /etc/inittab to /etc/inittab.Gentoo
first, so you can put it back less the daemontools "make install" edit
afterwards.
_________________
TIA
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Fri Nov 18, 2011 6:38 pm    Post subject: Reply with quote

So, having some time, I looked at an old (kernel 2.4) Slackware
directory setup for qmail. It started with a "/var/qmail/rc" file
(a shell script) that simply ran /var/qmail/bin/qmail-start with an
argument to check the mail aliases database with fastforward and
another argument to log with multilog (from the daemontools
package). It started from one of the Slackware /etc/rc.d/* scripts
that run when you change into different runlevels. Here is the content
of /var/qmail/rc:

Code:

#!/bin/sh

# Using qmail-local to deliver messages to ~/Mailbox by default.

QBIN=/var/qmail/bin
DBIN=/command # daemontools

if [ -x ${QBIN}/qmail-start ]; then
  if [ -x ${DBIN}/multilog ]; then
    ${QBIN}/qmail-start '|fastforward -d /etc/aliases.cdb' \
      ${DBIN}/multilog t /var/log/mail/qmail_send &
  else
     echo
     echo "${DBIN}/multilog not found or not executable"
  fi
else
  echo
  echo "${QBIN}/qmail-start not found or not executable"
fi


(It should have checked for fastforward, too, found in /var/qmail/bin/.)

qmail-start is C code. One would need to look at the source to see
what all it started in daemon mode, sleeping in memory and listening
to a port (qmail-smtpd) or some pipe (local delivery agent, etc).

That installation did not integrate qmail with svscan, supervise, and
svc. (They were installed but were not managing the qmail smtp daemon
or other qmail utilities.)

Apparently there is a newer way that enables supervise to monitor
qmail-smtpd:
http://rod.info/HowToGentoo
_________________
TIA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum