Skip to content

Commit

Permalink
Upgraded to qmail-ldap-1.03-20050401a
Browse files Browse the repository at this point in the history
  • Loading branch information
amery committed Dec 18, 2009
1 parent aa6bf97 commit 8107d26
Show file tree
Hide file tree
Showing 351 changed files with 29,435 additions and 2,017 deletions.
112 changes: 112 additions & 0 deletions EXTTODO
@@ -0,0 +1,112 @@
EXTTODO by Claudio Jeker <jeker@n-r-g.com> and
Andre Oppermann <opi@nrg4u.com>
(c) 2002-2004 Internet Business Solutions Ltd.

The EXTTODO patch is a part of the qmail-ldap patch.
This patches for qmail come with NO WARRANTY.

RELEASE: 5. Jan. 2003 ($Date: 2004/04/16 13:24:16 $)

EXTTODO:
======================

TOC:
WHAT DOES IT DO
INSTALL
CONFIG FILES
SETUP
BIG PICTURE

NEWS:

This is the first release of the EXTTODO patch.

================================================================================

WHAT DOES IT DO

The exttodo patch addresses a problem known as the silly qmail (queue)
problem. This problem is found only on system with high injection rates.

qmail with a big local and remote concurrency could deliver a tremendous
amount of messages but normally this can not be achieved because qmail-send
becomes a bottleneck on those high volumes servers.
qmail-send preprocesses all new messages before distributing them for local
or remote delivering. In one run qmail-send does one todo run but has the
ability to close multiple jobs. Because of this layout qmail-send can not
feed all the new available (local/remote) delivery slots and therefor it is
not possible to achieve the maximum throughput.
This would be a minor problem if one qmail-send run could be done in extreme
short time but because of many file system calls (fsync and (un)link) a todo
run is expensive and throttles the throughput.

The exttodo patch tries to solve the problem by moving the todo routine into
an external program. This reduces the run time in qmail-send.

exttodo adds a new program to qmail called qmail-todo. qmail-todo prepares
incoming messages for local and remote delivering (by creating info/<messid>
local/<messid> and remote/<messid> and removing todo/<messid>). See also
INTERNALS. As next qmail-todo transmits the <messid> to qmail-send which will
add this message into the priority queue which schedules the message for
delivery.

INSTALL

To enable the exttodo patch you need to define EXTERNAL_TODO while compiling
qmail(-ldap) this can be done with the -D flag of cc (e.g. cc -DEXTERNAL_TODO).

NOTE: the exttodo patch can also be used on qmail systems without the
qmail-ldap patch.

================================================================================

CONFIG FILES

No additional control files are used or needed.

================================================================================

SETUP

qmail-todo will be started by qmail-start and therefor no additional setup
is needed.

To verify that exttodo is running just check if qmail-todo is running.

================================================================================

BIG PICTURE

+-------+ +-------+
| clean | | clean |
+--0-1--+ +--0-1--+ +-----------+
trigger ^ | ^ | +->0,1 lspawn |
| | v | v / +-----------+
+-------+ v +--2-3--+ +--5-6--+ /
| | | | 0<--7 1,2<-+
| queue |--+--| todo | | send |
| | | | 1-->8 3,4<-+
+-------+ +-------+ +---0---+ \
| \ +-----------+
v +->0,1 rspwan |
+---0---+ +-----------+
| logger|
+-------+

Communication between qmail-send and qmail-todo

todo -> send:
D[LRB]<mesgid>\0
Start delivery for new message with id <messid>.
the character L, R or B defines the type
of delivery, local, remote or both respectively.
L<string>\0
Dump string to the logger without adding additional \n or similar.
send -> todo:
H Got a SIGHUP reread ~/control/locals and ~/control/virtualdomains
X Quit ASAP.

qmail-todo sends "\0" terminated messages whereas qmail-send just send one
character to qmail-todo.


113 changes: 105 additions & 8 deletions FILES
Expand Up @@ -227,16 +227,11 @@ case_lowerb.c
case_lowers.c
case_starts.c
cdb.3
cdb.c
cdb.h
cdb_hash.c
cdb_seek.c
cdb_unpack.c
cdbmake.h
cdbmake_add.c
cdbmake_hash.c
cdbmake_pack.c
cdbmss.h
cdbmss.c
cdb_make.c
cdb_make.h
coe.3
coe.h
coe.c
Expand Down Expand Up @@ -431,3 +426,105 @@ maildir.c
tcp-environ.5
constmap.h
constmap.c
EXTTODO
Makefile.cdb
POPBEFORESMTP
QLDAPGROUP
QLDAPINSTALL
QLDAPNEWS
QLDAPPICTURE
QLDAPTODO
TLS.readme
auth_imap.c
auth_mod.c
auth_mod.h
auth_pop.c
auth_smtp.c
auto_userl.h
base64.c
base64.h
byte_repl.c
case_startb.c
check.c
check.h
checkpassword.c
checkpassword.h
condwrite.c
digest.c
digest_md4.c
digest_md4.h
digest_md5.c
digest_md5.h
digest_rmd160.c
digest_rmd160.h
digest_sha1.c
digest_sha1.h
dirmaker
dirmaker.c
dirmaker.h
endian.c
execcheck.c
execcheck.h
localdelivery.c
localdelivery.h
locallookup.c
locallookup.h
maildir++.c
maildir++.h
mailmagic.c
mailmagic.h
mailmaker.c
mailmaker.h
output.c
output.h
passwd.c
passwd.h
pbsadd.c
pbscheck.c
pbsdbd.c
pbsexec.c
pbsexec.h
popfetch.pl
qldap-cluster.c
qldap-cluster.h
qldap-debug.c
qldap-debug.h
qldap-errno.c
qldap-errno.h
qldap-filter.c
qldap-profile.c
qldap-profile.h
qldap.c
qldap.h
qmail-cdb.c
qmail-forward.c
qmail-group.c
qmail-imapd-ssl.sh
qmail-imapd.rules
qmail-imapd.sh
qmail-ldap.h
qmail-ldaplookup.c
qmail-pop3d-ssl.sh
qmail-pop3d.rules
qmail-pop3d.sh
qmail-qmqpd.rules
qmail-qmqpd.sh
qmail-quotawarn.c
qmail-reply.c
qmail-secretary.c
qmail-smtpd.rules
qmail-smtpd.sh
qmail-todo.c
qmail-verify.c
qmail.schema
qmail.sh
rbl.c
rbl.h
read-ctrl.c
read-ctrl.h
readwrite.c
signatures
smtpcall.c
smtpcall.h
xtext.c
xtext.h
40 changes: 40 additions & 0 deletions LICENSE
@@ -0,0 +1,40 @@

This copyright notice applies to the qmail-ldap patch. It does not apply
to the original qmail-1.03 by Dan Bernstein. It also partly applies to
the resulting source and object code. In that Dan Bernsteins copyright
remains intact and is enhanced with ours as derivative work.

/*
* Copyright (c) 1998-2004 Andre Oppermann, Claudio Jeker,
* Internet Business Solutions AG, CH-8005 Z�rich, Switzerland
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Internet Business
* Solutions AG and its contributors.
* 4. Neither the name of the author nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/

0 comments on commit 8107d26

Please sign in to comment.