Commit 7c86a158 authored by Ondrej Sury's avatar Ondrej Sury

Imported Upstream version 0.73.1

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

Courier is written by:
Sam Varshavchik <mrsam@courier-mta.com>
Double Precision, Inc.
402 Main Street
Suite 100-241
Metuchen, NJ 08840
The HTML layout of the webmail server based on on a design by cniconsulting.com
Courier benchmarks:
a) Local ESMTP loopback test.
Hardware: ASUS P2B-DS Dual PentiumII-450 motherboard.
FAST SCSI-II disk (Quantum Fireball)
256MB RAM.
Network card: NE2000 clone, 10mbps ethernet.
Software: Two copies of Courier running locally:
Courier S is the sending server.
Courier R is the receiving server.
Default options for both Courier S and R, with the following
exceptions:
Both copies of Courier are configured for 40 ESMTP connections
maximum (Courier R has the max sessions per C block
bumped up to 40).
Courier R is configured to issue forward/reverse IP address
DNS query for every connecting session (default configuration).
Courier R is configured to check each connection against two
DNS blacklists (default configuration).
Note -- all DNS queries were over an analog dialup 28.8
connection (but the test ran locally).
Courier R is configured to check IDENT for each connection
(default).
Courier R has SMTP spam filtering enabled (but no spam filter
is actually used for this test).
Courier R had BOFHCHECKDNS disabled, so the sender's address
wasn't checked in DNS.
Both versions of Courier had certain modules linked with the
ElectricFence malloc debugger, which introduces its own overhead.
Basically, there was some additional overhead in this test. In
the real world the timings would probably be faster by a hair.
Test consists of sending messages from Courier S to Courier R as fast
as possible. Courier R is configured to treat *.example.com as a local
address. Courier S is configured to send all mail to *.example.com to the
same IP address as what's assigned to the local NIC card, which is
functionally identical to sending all trafic through 127.0.0.1.
Because multiple hostnames are used, Courier S is tricked into opening
multiple ESMTP clients in parallel, instead of queueing up everything for
a few connections. The following script was used to generate test
messages (hostnames and account names changed to protect the innocent):
for n in 1 2 3 4 5 6 7 8 9 10
do
for f in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
env - /tmp/courier/bin/sendmail \
-f sender@example.com \
recipient-foo-$f@$f.foo.example.com <<EOF
From: sender
To: recipient
Subject: test $f
test $f
EOF
done
done
A global .courier-foo-default file is used in the recipient account
to dump all mail into the same Maildir. As you can see, there are 20
different recipient addresses scattered across 20 different hostnames.
Courier's default configuration opens a maximum of four connections to
the same recipient hostname, so this test can theoretically use up to 80
parallel connections, however both Courier R and S were configured to
use no more than 40, causing contention. Ten copies of each message
were sent.
Total run time: 1 min 5 seconds for 196 messages. Four messages were
stuck waiting on a stalled DNS query, and were delivered when it timed out
and retried, 50-75 seconds later.
Mail logs show that there were 57 total ESMTP connections made. So,
Courier's message scheduler was able to reuse most ESMTP sessions, but the
scheduler did close some connections along the way.
NOTE that each ESMTP connection required four DNS lookups. So, in the
space of 1 min 5 seconds Courier was able to deliver 196 messages and
issue 53*4=216 DNS lookups over a severely bandwidth-limited line.
This software is released under the GPL, version 3 (see COPYING.GPL).
Additionally, compiling, linking, and/or using the OpenSSL toolkit in
conjunction with this software is allowed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# Copyright 1998 - 2009 Double Precision, Inc. See COPYING for
# distribution information.
@SET_MAKE@
AUTOMAKE_OPTIONS=dist-bzip2
SUBDIRS=afx @DBSUBDIR@ libs/numlib libs/soxwrap libs/md5 libs/sha1 \
libs/libhmac libs/random128 libs/unicode libs/rfc822 libs/rfc1035 \
libs/rfc2045 libs/liblock libs/maildir libs/waitlib libs/tcpd \
libs/threadlib libs/makedat libs/rootcerts libs/imap libs/maildrop \
libs/cgi libs/http11 libs/ldapaddressbook libs/gpglib libs/pcp \
libs/sqwebmail webadmin courier
DIST_SUBDIRS=afx libs/gdbmobj libs/bdbobj libs/numlib libs/soxwrap \
libs/md5 libs/sha1 libs/libhmac libs/random128 libs/unicode \
libs/rfc822 libs/rfc1035 libs/rfc2045 libs/liblock libs/maildir \
libs/waitlib libs/tcpd libs/threadlib libs/makedat libs/rootcerts \
libs/imap libs/maildrop libs/cgi libs/http11 libs/ldapaddressbook \
libs/gpglib libs/pcp libs/sqwebmail webadmin courier
HTML2TXT=links -dump -no-numbering -no-references
INSTALL: courier/doc/install.html
rm -f INSTALL
$(HTML2TXT) courier/doc/install.html >INSTALL
NEWS: NEWS.html
$(HTML2TXT) NEWS.html >NEWS
EXTRA_DIST=BENCHMARKS sysconftool ChangeLog.2001 \
COPYING.GPL NEWS.html pgpkeys.txt config.rpath
DISTCLEANFILES=version configure.args
#
# install-perms creates permissions.dat, listing all files and directories,
# and their corresponding permissions. This is used to build an RPM.
#
install-perms:
@$(MAKE) install-perms-recursive
@$(MAKE) install-perms-local
install-perms-recursive:
@>permissions.dat
@SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do ( cd $$f && $(MAKE) $(AM_MAKEFLAGS) install-perms ) ; cat /dev/null >>$$f/permissions.dat ; done
@SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do cat $$f/permissions.dat >>permissions.dat ; done
install-perms-local:
install-data-local:
cd courier && $(MAKE) -$(MAKEFLAGS) DESTDIR=$(DESTDIR) install-permissions
@cat libs/sqwebmail/sqwebmail.msg
@echo "Do not forget to run make install-configure"
install-recursive: install-check-umask
install-check-umask:
@test `umask | sed 's/^0*//'` = 22 && exit 0; \
test "$$INSTALL_IGNORE_UMASK" = 1 && exit 0; \
echo "ERROR: your umask MUST be 022."; \
echo "Change your umask to 022, then";\
echo "rerun (g)make install." ; exit 1
all-recursive: all-make-check
all-make-check:
$(MAKE) all-gmake-check FOO=BAR
all-gmake-check:
@test "$(FOO)" = "BAR" && exit 0 ; echo "" ; \
echo "ERROR: Something's wrong. If you're using xBSD, you must use gmake" ; \
echo "instead of make, as you were told by the INSTALL file (you did read the" ; \
echo "INSTALL file, did you?)" ; echo "" ; exit 1
#
# For maintainer's use only
#
dist-hook:
test -f $(srcdir)/rpm.release && cp $(srcdir)/rpm.release $(distdir) ; \
exit 0
$(MAKE) -$(MAKEFLAGS) courier.spec courier.lpspec
cp courier.spec courier.lpspec $(distdir)
release: dist
distrelease:
umask 022; $(MAKE) distcheck
$(MAKE) rpm
$(MAKE)
$(MAKE)
rm -f INSTALL courier.spec courier.lpspec
$(MAKE) INSTALL courier.spec courier.lpspec
$(MAKE) dist
rpm: rpm-build
rpm-build:
$(MAKE) bump.rpm.release
$(MAKE) dist
$(MAKE) dorpm
lpm: lpm-build
lpm-build:
$(MAKE) bump.rpm.release
$(MAKE) dist
rm -rf lpm
mkdir lpm
lpbuild `test "@REPOSITORY@" == "" || echo --define "repository=1"` --srcbuild -o lpm @PACKAGE@-@VERSION@.tar.bz2
publish: publish-@REPOSITORY@
publish-dev:
$(MAKE) dopublish SUBDIR=dev
publish-prod:
$(MAKE) dopublish SUBDIR=prod
dopublish:
lpbuild --resign lpm/*
rm -rf lpmtmp
mkdir lpmtmp
ln lpm/* lpmtmp
rm -f lpmtmp/*debuginfo*
mv lpmtmp/*.src.lp repository-$(SUBDIR)/`lpm -q --distribution`/sources
mv lpmtmp/*.lp repository-$(SUBDIR)/`lpm -q --distribution`/packages
rm -rf lpmtmp
ls -t repository-$(SUBDIR)/`lpm -q --distribution`/sources | tail -n +6 | xargs -r -n 1 lpm --erase repository-$(SUBDIR)
lpm --sync repository-$(SUBDIR)
rsync -a -v --delete-after repository-$(SUBDIR)/`lpm -q --distribution`/. headache:lpmtool.com/www/repositories/$(SUBDIR)/courier/`lpm -q --distribution`
dorpm:
rm -rf rpm/BUILD/*
rm -f rpm/RPMS/*/*
rm -f rpm/SOURCES/*
rm -f rpm/SPECS/*
rm -f rpm/SRPMS/*
rpmbuild -ta --clean \
--define "_topdir `pwd`/rpm" \
--define '_rpmdir %{_topdir}/RPMS' \
--define '_srcrpmdir %{_topdir}/SRPMS' \
--define '_sourcedir %{_topdir}/SOURCES' \
--define '_specdir %{_topdir}/SPECS' \
--define '_builddir %{_topdir}/BUILD' \
--define '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
--define '_tmppath %{_var}/tmp' \
--define '__spec_prep_pre %{___build_pre}' \
$(RPMFLAGS) @PACKAGE@-@VERSION@.tar.bz2
bump.rpm.release: courier.spec courier.lpspec
VERSION="x"; \
test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
NEXT_RELEASE=0; \
test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
RELEASE=`expr $$NEXT_RELEASE + 1`; \
echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
sed 's/^Release: .*/Release: '$$RELEASE'%{?dist}%{courier_release}/' \
<courier.spec >courier.spec.new; \
mv courier.spec.new courier.spec; \
sed 's/^Release: .*/Release: '$$RELEASE'/' \
<courier.lpspec >courier.lpspec.new; \
mv courier.lpspec.new courier.lpspec
install-configure:
@$(MAKE) install-perms
@SYSCONFTOOL@ `awk ' $$5 == "config" && $$1 ~ /\.dist$$/ { print $$1 }' <permissions.dat`
install-webadmin-password:
@stty -echo ; echo -n "Password: " ; read P; stty echo ; echo "" ; echo $$P >@sysconfdir@/webadmin/password && chown @mailuser@ @sysconfdir@/webadmin/password && chgrp @mailgroup@ @sysconfdir@/webadmin/password && chmod 400 @sysconfdir@/webadmin/password
upload-beta:
test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
~/src/sftools/release.pl mrsam $(SFPASSWD) courier courier-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
upload-dist:
test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
set -e; v="@PACKAGE@/@VERSION@/`date +%Y%m%d%H%M%S`"; git tag -s $$v -m 'Tag version @VERSION@'; cd libs; git tag -s $$v -m 'Tag version @VERSION@'
socksify ~/src/sftools/release.pl mrsam $(SFPASSWD) cou