April 5, 2018 Roberto Puzzanghera 18 comments
daemontools
is a collection of tools for managing UNIX services. It monitorsqmail
services and saves error messages to one or more logs.
First of all, let's create the folder which will host qmail
, daemontools
and ucspi-tcp
:
mkdir /var/qmail
In this guide I will assume that all the source packages have been downloaded into the /usr/local/src
folder.
cd /usr/local/src wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz wget https://notes.sagredo.eu/files/qmail/patches/daemontools/daemontools-0.76.errno.patch wget https://notes.sagredo.eu/files/qmail/patches/daemontools/multilog_filesize_limit.patch
The multilog_filesize_limit
patch (thanks to Sam Tang) extends the file log size limit to 100MB (default is 16MB).
cd /var/qmail tar xzf /usr/local/src/daemontools-0.76.tar.gz cd admin ln -s daemontools-0.76 daemontools chmod 1755 .
So you have daemontools in /var/qmail/admin/daemontools
Now let's apply the patches and install
cd daemontools patch -p1 < /usr/local/src/daemontools-0.76.errno.patch patch -p1 < /usr/local/src/multilog_filesize_limit.patch package/install
Note that package/install
will also add a line to the end of /etc/inittab
to automatically launch scanboot
(if it doesn’t already find the line there).
Add the "clear" service, so that you can easily clear the readproctitle service errors
line:
cd ../ mkdir clear touch clear/down cat > clear/run << __EOF__ #!/bin/sh yes '' | head -4000 | tr '\n' . __EOF__ chmod +x clear/run
Finally, since this number of directory levels bothers me:
ln -s /var/qmail/admin/daemontools/command /command
That way, I have almost everything in /var/qmail
, except for /command
and /service,
which are just symbolic links.
qq_temporary_problem_(#4.3.0)
June 2, 2023 06:32
qq_temporary_problem_(#4.3.0)
June 1, 2023 21:18
qq_temporary_problem_(#4.3.0)
May 31, 2023 18:22
qq_temporary_problem_(#4.3.0)
May 31, 2023 14:42
qq_temporary_problem_(#4.3.0)
May 31, 2023 14:33
Thank you! for all the documentation, patches and support
May 26, 2023 08:42
free(): double free detected in tcache 2: /var/www/qmail/cgi-bin/qmailadmin
May 17, 2023 15:25
free(): double free detected in tcache 2: /var/www/qmail/cgi-bin/qmailadmin
May 17, 2023 07:46
Tags
apache clamav dkim dovecot ezmlm fail2ban hacks lamp letsencrypt linux linux-vserver lxc mariadb mediawiki mozilla mysql openboard owncloud patches php proftpd qmail qmail to postfix qmail-spp qmailadmin rbl roundcube rsync sieve simscan slackware solr spamassassin spf ssh ssl surbl tcprules tex ucspi-tcp vpopmail vqadmin
Comments
suggestion to insert install of build-essentials etc on this page.
GoofY March 4, 2023 09:06
is it an idea to put the following already here instead of on page installing and configuring vpopmail?:
Reply | Permalink
suggestion to insert install of build-essentials etc on this page.
Roberto Puzzanghera GoofY March 4, 2023 19:55
I created a page with the preinstallation tasks, where this and other preliminary tasks are covered. Fill free to post other hints
Reply | Permalink
suggestion to insert install of build-essentials etc on this page.
Roberto Puzzanghera GoofY March 4, 2023 09:09
ok, inserted
Reply | Permalink
make: not found
Thuan March 5, 2020 04:18
Hi everybody .
i had a problem need your help :
- when i run a command line :
i see :
help me , pls .
thanks.
Reply | Permalink
make: not found
Roberto Puzzanghera Thuan March 5, 2020 07:56
I think that you should install a C compiler. Please refer to your distribution's documentation for the purpose
Reply | Permalink
attribute eXecute to "run" file
Marco Varanda February 16, 2020 14:43
Hello,
I´m doing a procedure to install qmail to CentOS 8 (systemd)
run file gets 644 attribute, should we change to 744 ?
Thanks for your work !
Marco Varanda
Reply | Permalink
attribute eXecute to
Roberto Puzzanghera Marco Varanda February 16, 2020 14:58
yes
Reply | Permalink
Supervise not running on debian
Jmecherie August 24, 2019 07:45
If you receive error: Error supervise not running
It's because daemontools/svscanboot is not starting from sysvinit inittab.
To start from systemd:
Reply | Permalink
Broken link
Gabriel Torres June 19, 2019 00:31
qmail.org is offline, change:
wget http://www.qmail.org/netqmail-1.06.tar.gz
to
wget https://notes.sagredo.eu/files/qmail/tar/netqmail-1.06.tar.gz
Reply | Permalink
patch of multilog file size limit
Sam Tang April 6, 2018 11:35
Hi,
This is the little multilog patch I would like to share.
By default multilog only support max 16MB log file, for my email server, 16MB only can save 5 hours log, so I made this little patch, and change multilog file limit to 100MB, here how to apply:
and then update log/run file/s, now can assign file size to s104857600 (100MB).
Reply | Permalink
patch of multilog file size limit
Roberto Puzzanghera Sam Tang April 6, 2018 19:55
thank you, Sam.. I'll add it asap
Reply | Permalink
clear service
Ivelin Topalov February 6, 2018 10:17
the creation of clear service is non understandeable and not well described
cat > clear/run <
syntax error near unexpected token `newline'
what must do run to clear ?
no link creation for service clear
Reply | Permalink
clear service
Roberto Puzzanghera Ivelin Topalov February 6, 2018 12:10
thank you, corrected
Reply | Permalink
But how do you set the PATH so daemontools can run properly?
Dave Martin March 10, 2012 20:04
I tried installing daemontools exactly as outlined above. But qmailctl start fails because it can't find svc, svok, etc. I researched on the web, and it appears that the issue is with daemontools not being found in the PATH. I've tried updating the path in /etc/profile, and in /etc/inittab (when launching svscan). Although ps -ef | grep svscan demonstrates that svscan is running, qmailctl can't seem to find scripts in the /command folder.
(Per your suggestion, I'm trying to do this install on Slackware (version 13.37).)
I also tried running ./rts > rts.out (as mentioned in Dave Sill's book, "Life With Qmail") but it bombs on every line--again complaining 'command not found' one line after the next.
What am I doing wrong?
Thanks in advance for your response.
-Dave Martin
Reply | Permalink
Hi Dave, first of all thanks
roberto puzzanghera Dave Martin March 10, 2012 20:55
Hi Dave, first of all thanks a lot for your support.
You should have this PATH inside the /command/svscanboot script:
qmail should start by means of a line inside /etc/inittab
so, you may want to check that svscanboot was actually launched on boot, or try to run it manually. I prefer to have it in my rc.local
fyi, I have tested everything on a slackware64 13.37
cheers :)
Roberto
Reply | Permalink
Daemantools with systemd
hifs roberto puzzanghera January 11, 2014 14:38
if your linux using systemd
remove SV:123456:repawn:/command/svscanboot from /etc/inittab
create a file at /lib/systemd/system/daemontools.service
edit as
copy links
reboot ur system
Reply | Permalink
I confirmed the settings you gave, but still not working
Dave Martin roberto puzzanghera March 12, 2012 12:15
qmailctl start continues to return errors on line 17: svok: command not found
However, ps -ef | grep svscan returns the following:
Could there be a permissions issue with the qmail user accounts? Does the qmail group need to be granted permission to in order to run the daemontool utilities?
Reply | Permalink
It's seems like the
roberto puzzanghera Dave Martin March 12, 2012 13:51
It's seems like the daemontools' installation has failed... can you post please:
anyway feel free to contact me in private using the contact button above
Reply | Permalink