summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-mail/qmail/ChangeLog2
-rw-r--r--net-mail/qmail/files/1.03-r10/99qmail2
-rw-r--r--net-mail/qmail/files/1.03-r10/defaultdelivery2
-rw-r--r--net-mail/qmail/files/1.03-r10/dot_qmail1
-rw-r--r--net-mail/qmail/files/1.03-r10/qmail-control30
-rw-r--r--net-mail/qmail/files/1.03-r10/rc4
-rw-r--r--net-mail/qmail/files/1.03-r10/run-qmailsend2
-rw-r--r--net-mail/qmail/files/1.03-r10/run-qmailsendlog2
-rw-r--r--net-mail/qmail/files/1.03-r10/run-qmailsmtpd6
-rw-r--r--net-mail/qmail/files/1.03-r10/run-qmailsmtpdlog2
-rw-r--r--net-mail/qmail/files/1.03-r10/tls-patch.txt105
-rw-r--r--net-mail/qmail/files/1.03-r10/tls.patch.bz2bin0 -> 10458 bytes
-rw-r--r--net-mail/qmail/files/digest-qmail-1.03-r105
-rw-r--r--net-mail/qmail/qmail-1.03-r10.ebuild307
14 files changed, 469 insertions, 1 deletions
diff --git a/net-mail/qmail/ChangeLog b/net-mail/qmail/ChangeLog
index a10ca6d39c26..140c5817b892 100644
--- a/net-mail/qmail/ChangeLog
+++ b/net-mail/qmail/ChangeLog
@@ -1,6 +1,6 @@
# ChangeLog for net-mail/qmail
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/ChangeLog,v 1.11 2003/02/01 08:01:36 raker Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/ChangeLog,v 1.12 2003/02/01 08:04:04 raker Exp $
*qmail-1.03-r10 (01 Feb 2003)
diff --git a/net-mail/qmail/files/1.03-r10/99qmail b/net-mail/qmail/files/1.03-r10/99qmail
new file mode 100644
index 000000000000..d17f5d7dbee9
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/99qmail
@@ -0,0 +1,2 @@
+PATH=/var/qmail/bin
+ROOTPATH=/var/qmail/bin
diff --git a/net-mail/qmail/files/1.03-r10/defaultdelivery b/net-mail/qmail/files/1.03-r10/defaultdelivery
new file mode 100644
index 000000000000..d0ef7de8b590
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/defaultdelivery
@@ -0,0 +1,2 @@
+|dot-forward .forward
+./.maildir/
diff --git a/net-mail/qmail/files/1.03-r10/dot_qmail b/net-mail/qmail/files/1.03-r10/dot_qmail
new file mode 100644
index 000000000000..7c9e5d08f067
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/dot_qmail
@@ -0,0 +1 @@
+./.maildir/
diff --git a/net-mail/qmail/files/1.03-r10/qmail-control b/net-mail/qmail/files/1.03-r10/qmail-control
new file mode 100644
index 000000000000..31581b6c8315
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/qmail-control
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r10/qmail-control,v 1.1 2003/02/01 08:04:04 raker Exp $
+
+opts="start stop restart reload"
+
+start() {
+ ebegin "Starting qmail mta ..."
+ svc -u /var/qmail/supervise/*
+ eend $?
+ ebegin "Starting qmail mta logging ..."
+ svc -u /var/qmail/supervise/*/log
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping qmail mta ..."
+ svc -d /var/qmail/supervise/*
+ eend $?
+ ebegin "Stopping qmail mta logging ..."
+ svc -d /var/qmail/supervise/*/log
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading 'locals' and 'virtualdomains' control files."
+ svc -h /var/qmail/supervise/qmail-send
+ eend $?
+}
diff --git a/net-mail/qmail/files/1.03-r10/rc b/net-mail/qmail/files/1.03-r10/rc
new file mode 100644
index 000000000000..a7bbdc986766
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/rc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec env - PATH="/var/qmail/bin:$PATH" \
+ qmail-start "`cat /var/qmail/control/defaultdelivery`"
diff --git a/net-mail/qmail/files/1.03-r10/run-qmailsend b/net-mail/qmail/files/1.03-r10/run-qmailsend
new file mode 100644
index 000000000000..8dbd3adf524f
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/run-qmailsend
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /var/qmail/rc
diff --git a/net-mail/qmail/files/1.03-r10/run-qmailsendlog b/net-mail/qmail/files/1.03-r10/run-qmailsendlog
new file mode 100644
index 000000000000..5ff50d1e7711
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/run-qmailsendlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-send
diff --git a/net-mail/qmail/files/1.03-r10/run-qmailsmtpd b/net-mail/qmail/files/1.03-r10/run-qmailsmtpd
new file mode 100644
index 000000000000..9733e11e154a
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/run-qmailsmtpd
@@ -0,0 +1,6 @@
+#!/bin/sh
+QMAILDUID=`id -u qmaild`
+NOFILESGID=`id -g qmaild`
+exec /usr/bin/softlimit -m 8000000 \
+ /usr/bin/tcpserver -H -R -v -p -x /etc/tcp.smtp.cdb \
+ -u $QMAILDUID -g $NOFILESGID 0 smtp rblsmtpd /var/qmail/bin/qmail-smtpd 2>&1
diff --git a/net-mail/qmail/files/1.03-r10/run-qmailsmtpdlog b/net-mail/qmail/files/1.03-r10/run-qmailsmtpdlog
new file mode 100644
index 000000000000..2d9546146583
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/run-qmailsmtpdlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-smtpd
diff --git a/net-mail/qmail/files/1.03-r10/tls-patch.txt b/net-mail/qmail/files/1.03-r10/tls-patch.txt
new file mode 100644
index 000000000000..62d11e8d295f
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/tls-patch.txt
@@ -0,0 +1,105 @@
+Frederik Vermeulen <qmail-tls akrul inoa.net> 20021228
+http://inoa.net/qmail/qmail-1.03-tls.patch
+
+This patch implements RFC2487 in qmail. This means you can
+get SSL or TLS encrypted and authenticated SMTP between
+the MTAs and from MUA to MTA.
+The code is considered experimental (but has worked for
+many since its first release on 1999-03-21).
+
+Usage: - install OpenSSL-0.9.6g http://www.openssl.org/
+ (any 0.9.6 version is presumed to work)
+ - apply patch to qmail-1.03 http://www.qmail.org/
+ The patches to qmail-remote.c
+ and qmail-smtpd.c can be applied separately.
+ - provide a server certificate in /var/qmail/control/servercert.pem.
+ "make cert" makes a self-signed certificate.
+ "make cert-req" makes a certificate request.
+ Note: you can add the CA certificate and intermediate
+ certs to the end of servercert.pem.
+ - replace qmail-smtpd and/or qmail-remote binary
+ - verify operation (header information should show
+ something like
+ "Received [..] with DES-CBC3-SHA encrypted SMTP;")
+ If you don't have a server to test with, you can test
+ by sending mail to tag-ping@tbs-internet.com,
+ which will bounce your mail.
+
+Optional: - when DEBUG is defined, some extra TLS info will be logged
+ - qmail-remote will authenticate with the certificate in
+ /var/qmail/control/clientcert.pem. By preference this is
+ the same as servercert.pem, where nsCertType should be
+ == server,client or be a generic certificate (no usage specified).
+ - when a 512 RSA key is provided in /var/qmail/control/rsa512.pem,
+ this key will be used instead of on-the-fly generation by
+ qmail-smtpd. Periodical replacement can be done by crontab:
+ 01 01 * * * umask 0077; /usr/local/ssl/bin/openssl genrsa \
+ -out /var/qmail/control/rsa512.new 512 > /dev/null 2>&1 &&\
+ chown qmaild.qmail /var/qmail/control/rsa512.new && /bin/mv -f \
+ /var/qmail/control/rsa512.new /var/qmail/control/rsa512.pem
+ - server authentication:
+ qmail-remote requires authentication from servers for which
+ /var/qmail/control/tlshosts/host.dom.ain.pem exists.
+ The .pem file contains the validating CA certificates
+ (or self-signed server certificate).
+ CommonName has to match.
+ WARNING: this option may cause mail to be delayed, bounced,
+ doublebounced, and lost.
+ - client authentication:
+ when relay rules would reject an incoming mail,
+ qmail-smtpd can allow the mail based on a presented cert.
+ Certs are verified against a CA list in
+ /var/qmail/control/clientca.pem (eg. http://www.modssl.org/
+ source/cvs/exp/mod_ssl/pkg.mod_ssl/pkg.sslcfg/ca-bundle.crt)
+ and the cert email-address has to match a line in
+ /var/qmail/control/tlsclients. This email-address is logged
+ in the headers.
+ - cipher selection:
+ qmail-remote:
+ openssl cipher string (`man ciphers`) read from
+ /var/qmail/control/tlsclientciphers
+ qmail-smtpd:
+ openssl cipher string read from TLSCIPHERS environment variable
+ (can vary based on client IP address e.g.)
+ or if that is not available /var/qmail/control/tlsserverciphers
+ - smtps (deprecated SMTP over TLS via port 465):
+ qmail-remote: when connecting to port 465
+ qmail-smtpd: when SMTPS environment variable is not empty
+
+Caveats: - do a `make clean` after patching
+ - binaries dynamically linked with current openssl versions need
+ recompilation when the shared openssl libs are upgraded.
+ - this patch could conflict with other patches (notably those
+ replacing \n with \r\n, which is a bad idea on encrypted links).
+ - some broken servers have a problem with TLSv1 compatibility.
+ Uncomment the line where we set the SSL_OP_NO_TLSv1 option.
+ - needs working /dev/urandom (or EGD for openssl versions >0.9.7)
+ for seeding random number generator.
+ - packagers should make sure that installing without a valid
+ servercert is impossible
+ - when applied in combination with AUTH patch, AUTH patch
+ should be applied first and first part of this patch
+ will fail. This error can be ignored. Packagers should
+ cut the first 12 lines of this patch to make a happy
+ patch
+
+Copyright: GPL
+ Links with OpenSSL
+ Inspiration and code from examples in SSLeay (E. Young
+ <eay@cryptsoft.com> and T. Hudson <tjh@cryptsoft.com>),
+ stunnel (M. Trojnara <mtrojnar@ddc.daewoo.com.pl>),
+ Postfix/TLS (L. Jaenicke <Lutz.Jaenicke@aet.tu-cottbus.de>),
+ modssl (R. Engelschall <rse@engelschall.com>),
+ openssl examples of E. Rescorla <ekr@rtfm.com>.
+ Debug code, tlscipher selection, many feature suggestions,
+ French docs https://www.TBS-internet.com/ssl/qmail-tls.html
+ from Jean-Philippe Donnio <tag-ssl@tbs-internet.com>.
+ Openssl usage consulting from B. M"oller <bmoeller@acm.org>.
+ Bug report from A. Dustman <adustman@comstar.net>.
+ Ssl_timeoutio functions (non-blocking io, timeouts), smtps,
+ auth, qmtp, mxps patch compatibility, man pages, code cleanup,
+ improved error reporting, RFC2595 server identity check
+ from A. Meltzer <albertikm (a) hotmail.com>.
+ Bug report from Niall Richard Murphy, Tim Helton.
+
+Bug reports: mailto:<jos-tls@kotnet.org>
diff --git a/net-mail/qmail/files/1.03-r10/tls.patch.bz2 b/net-mail/qmail/files/1.03-r10/tls.patch.bz2
new file mode 100644
index 000000000000..ee9d912da088
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r10/tls.patch.bz2
Binary files differ
diff --git a/net-mail/qmail/files/digest-qmail-1.03-r10 b/net-mail/qmail/files/digest-qmail-1.03-r10
new file mode 100644
index 000000000000..6ad5ffb471dd
--- /dev/null
+++ b/net-mail/qmail/files/digest-qmail-1.03-r10
@@ -0,0 +1,5 @@
+MD5 622f65f982e380dbe86e6574f3abcb7c qmail-1.03.tar.gz 220668
+MD5 6b202f71a99fb41e9e32906017270ba0 qmail-smtpd-auth-0.31.tar.gz 8798
+MD5 1d5b0aafb651ce2ad02aac6af80758c0 qmail-link-sync.patch 1403
+MD5 99070bb55cac5ad61f8fb203422e651e ext_todo-20030105.patch 33763
+MD5 2ff58c3570870a8ff9a1d9eb9aec05a6 big-concurrency.patch 9331
diff --git a/net-mail/qmail/qmail-1.03-r10.ebuild b/net-mail/qmail/qmail-1.03-r10.ebuild
new file mode 100644
index 000000000000..df41ba63d31d
--- /dev/null
+++ b/net-mail/qmail/qmail-1.03-r10.ebuild
@@ -0,0 +1,307 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/qmail-1.03-r10.ebuild,v 1.1 2003/02/01 08:04:04 raker Exp $
+
+IUSE="ssl"
+
+S=${WORKDIR}/${P}
+
+DESCRIPTION="A modern replacement for sendmail which uses maildirs and
+includes SSL, AUTH SMTP, queue optimization, and support"
+HOMEPAGE="http://www.qmail.org/
+ http://members.elysium.pl/brush/qmail-smtpd-auth/
+ http://www.jedi.claranet.fr/qmail-tuning.html"
+SRC_URI="http://cr.yp.to/software/qmail-1.03.tar.gz
+ http://members.elysium.pl/brush/qmail-smtpd-auth/dist/qmail-smtpd-auth-0.31.tar.gz
+ http://www.jedi.claranet.fr/qmail-link-sync.patch
+ http://www.nrg4u.com/qmail/ext_todo-20030105.patch
+ http://www.qmail.org/big-concurrency.patch"
+DEPEND="virtual/glibc
+ sys-apps/groff
+ >=sys-apps/ucspi-tcp-0.88
+ >=net-mail/checkpassword-0.90
+ >=net-mail/cmd5checkpasswd-0.22
+ ssl? ( >=dev-libs/openssl-0.9.6g )"
+RDEPEND="!virtual/mta
+ virtual/glibc
+ sys-apps/groff
+ >=sys-apps/ucspi-tcp-0.88
+ >=sys-apps/daemontools-0.76-r1
+ >=net-mail/checkpassword-0.90
+ >=net-mail/dot-forward-0.71"
+PROVIDE="virtual/mta
+ virtual/mda"
+SLOT="0"
+LICENSE="as-is"
+KEYWORDS=~"x86 ~ppc ~sparc"
+
+inherit eutils
+
+src_unpack() {
+
+ unpack qmail-1.03.tar.gz
+
+ # SMTP AUTH
+ unpack qmail-smtpd-auth-0.31.tar.gz
+ cd ${WORKDIR}/qmail-smtpd-auth-0.31
+ cp README.auth base64.c base64.h ${S}
+ cd ${S}
+ epatch ../qmail-smtpd-auth-0.31/auth.patch || die
+
+ # TLS support and an EHLO patch
+ use ssl && bzcat ${FILESDIR}/${PV}-${PR}/tls.patch.bz2 | patch || die
+
+ # Account for Linux filesystems lack of a synchronus link()
+ cd ${S}
+ epatch ${DISTDIR}/qmail-link-sync.patch || die
+
+ # Speeds up processing of large amounts of queue'd messages
+ epatch ${DISTDIR}/ext_todo-20030105.patch
+
+ # Increase limits for large mail systems
+ epatch ${DISTDIR}/big-concurrency.patch || die
+
+ if [ `use ssl` ]; then
+ echo "gcc ${CFLAGS} -DTLS" > conf-cc
+ else
+ echo "gcc ${CFLAGS}" > conf-cc
+ fi
+
+ echo "gcc" > conf-ld
+ echo "500" > conf-spawn
+
+}
+
+src_compile() {
+ cd ${S}
+ emake it man || die
+}
+
+
+
+src_install() {
+
+ cd ${S}
+
+ einfo "Setting up directory hierarchy ..."
+
+ diropts -m 755 -o root -g qmail
+ dodir /var/qmail
+
+ for i in bin boot control
+ do
+ dodir /var/qmail/${i}
+ done
+
+ dodir /var/qmail/users
+ touch ${D}/var/qmail/users/.keep
+
+ diropts -m 755 -o alias -g qmail
+ dodir /var/qmail/alias
+
+ einfo "Installing the qmail software ..."
+
+ insopts -o root -g qmail -m 755
+ insinto /var/qmail/boot
+ doins home home+df proc proc+df binm1 binm1+df binm2 binm2+df binm3 binm3+df
+
+ into /usr
+ dodoc FAQ UPGRADE SENDMAIL INSTALL* TEST* REMOVE* PIC* SECURITY
+ dodoc SYSDEPS TARGETS THANKS THOUGHTS TODO VERSION
+ dodoc ${FILESDIR}/${PV}-${PR}/tls-patch.txt
+
+ insopts -o qmailq -g qmail -m 4711
+ insinto /var/qmail/bin
+ doins qmail-queue qmail-queue
+
+ insopts -o root -g qmail -m 700
+ insinto /var/qmail/bin
+ doins qmail-lspawn qmail-start qmail-newu qmail-newmrh
+
+ insopts -o root -g qmail -m 711
+ insinto /var/qmail/bin
+ doins qmail-getpw qmail-local qmail-remote qmail-rspawn \
+ qmail-clean qmail-send splogger qmail-pw2u
+
+ insopts -o root -g qmail -m 755
+ insinto /var/qmail/bin
+ doins qmail-inject predate datemail mailsubj qmail-showctl \
+ qmail-qread qmail-qstat qmail-tcpto qmail-tcpok qmail-pop3d \
+ qmail-popup qmail-qmqpc qmail-qmqpd qmail-qmtpd qmail-smtpd \
+ sendmail tcp-env qreceipt qsmhook qbiff forward preline \
+ condredirect bouncesaying except maildirmake maildir2mbox \
+ maildirwatch qail elq pinq config-fast
+
+ into /usr
+ for i in *.1 *.5 *.8
+ do
+ doman $i
+ done
+
+ einfo "Adding /var/qmail/bin to PATH and ROOTPATH"
+ dodir /etc/env.d
+ cp ${FILESDIR}/${PV}-${PR}/99qmail ${D}/etc/env.d
+
+ einfo "Creating sendmail replacement ..."
+ diropts -m 755
+ dodir /usr/sbin /usr/lib
+ dosym /var/qmail/bin/sendmail /usr/sbin/sendmail
+ dosym /var/qmail/bin/sendmail /usr/lib/sendmail
+
+ einfo "Setting up the default aliases ..."
+ diropts -m 700 -o alias -g qmail
+ if [ ! -d ${ROOT}/var/qmail/alias/.maildir ] ; then
+ dodir /var/qmail/alias/.maildir
+ for i in cur new tmp
+ do
+ dodir /var/qmail/alias/.maildir/$i
+ done
+ fi
+
+ for i in mailer-daemon postmaster root
+ do
+ touch ${D}/var/qmail/alias/.qmail-${i}
+ fowners alias.qmail /var/qmail/alias/.qmail-${i}
+ done
+
+ einfo "Setting up maildirs by default in the account skeleton ..."
+ diropts -m 755 -o root -g root
+ insinto /etc/skel
+ ${D}/var/qmail/bin/maildirmake ${D}/etc/skel/.maildir
+ newins ${FILESDIR}/${PV}-${PR}/dot_qmail .qmail
+ fperms 644 /etc/skel/.qmail
+ insinto /root
+ ${D}/var/qmail/bin/maildirmake ${D}/root/.maildir
+ newins ${FILESDIR}/${PV}-${PR}/dot_qmail .qmail
+ fperms 644 /root/.qmail
+
+ einfo "Setting up daemontools ..."
+ insopts -o root -g root -m 755
+ diropts -m 755 -o root -g root
+ dodir /var/qmail/supervise
+ dodir /var/qmail/supervise/qmail-send
+ dodir /var/qmail/supervise/qmail-send/log
+ dodir /var/qmail/supervise/qmail-smtpd
+ dodir /var/qmail/supervise/qmail-smtpd/log
+ chmod +t ${D}/var/qmail/supervise/qmail-send
+ chmod +t ${D}/var/qmail/supervise/qmail-smtpd
+ diropts -m 755 -o qmaill
+ dodir /var/log/qmail
+ touch ${D}/var/log/qmail/.keep
+ dodir /var/log/qmail/qmail-send
+ touch ${D}/var/log/qmail/qmail-send/.keep
+ dodir /var/log/qmail/qmail-smtpd
+ touch ${D}/var/log/qmail/qmail-smtpd/.keep
+
+ insinto /var/qmail/supervise/qmail-send
+ newins ${FILESDIR}/${PV}-${PR}/run-qmailsend run
+ insinto /var/qmail/supervise/qmail-send/log
+ newins ${FILESDIR}/${PV}-${PR}/run-qmailsendlog run
+ insinto /var/qmail/supervise/qmail-smtpd
+ newins ${FILESDIR}/${PV}-${PR}/run-qmailsmtpd run
+ insinto /var/qmail/supervise/qmail-smtpd/log
+ newins ${FILESDIR}/${PV}-${PR}/run-qmailsmtpdlog run
+
+ einfo "Installing the qmail control file ..."
+ exeinto /var/qmail/bin
+ doexe ${FILESDIR}/${PV}-${PR}/qmail-control
+
+ einfo "Installing the qmail startup file ..."
+ insinto /var/qmail
+ doins ${FILESDIR}/${PV}-${PR}/rc
+ insinto /var/qmail/control
+ doins ${FILESDIR}/${PV}-${PR}/defaultdelivery
+
+}
+
+pkg_postinst() {
+
+ einfo "Setting up the message queue hierarchy ..."
+
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/todo
+ install -d -m 700 -o qmailq -g qmail ${ROOT}/var/qmail/queue/pid
+ install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/bounce
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/mess
+
+ for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
+ do
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/mess/${i}
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/todo/${i}
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/intd/${i}
+ done
+
+ for i in info local remote
+ do
+ install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/${i}
+ done
+
+ for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
+ do
+ install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/info/${i}
+ install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/local/${i}
+ install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/remote/${i}
+ done
+
+ install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/lock
+
+ dd if=/dev/zero of=${ROOT}/var/qmail/queue/lock/tcpto bs=1024 count=1
+ chmod 644 ${ROOT}/var/qmail/queue/lock/tcpto
+ chown qmailr.qmail ${ROOT}/var/qmail/queue/lock/tcpto
+
+ touch ${ROOT}/var/qmail/queue/lock/sendmutex
+ chmod 600 ${ROOT}/var/qmail/queue/lock/sendmutex
+ chown qmails.qmail ${ROOT}/var/qmail/queue/lock/sendmutex
+
+ mkfifo ${ROOT}/var/qmail/queue/lock/trigger
+ chmod 622 ${ROOT}/var/qmail/queue/lock/trigger
+ chown qmails.qmail ${ROOT}/var/qmail/queue/lock/trigger
+
+ echo -e "\e[32;01m Please do not forget to run, the following syntax :\033[0m"
+ echo -e "\e[32;01m ebuild /var/db/pkg/${CATEGORY}/${PN}-${PV}-${PR}/${PN}-${PV}-${PR}.ebuild config \033[0m"
+ echo -e "\e[32;01m This will setup qmail to run out-of-the-box on your system. \033[0m"
+ echo -e ""
+ echo -e "\e[32;01m To start qmail at boot you have to enable the /etc/init.d/svscan rc file \033[0m"
+ echo -e "\e[32;01m and create the following links : \033[0m"
+ echo -e "\e[32;01m ln -s /var/qmail/supervise/qmail-send /service/qmail-send \033[0m"
+ echo -e "\e[32;01m ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd \033[0m"
+
+
+ if use ssl; then
+ echo "Creating a self-signed ssl-cert:"
+ /usr/bin/openssl req -new -x509 -nodes -out /var/qmail/control/servercert.pem -days 366 -keyout /var/qmail/control/servercert.pem
+ chmod 640 /var/qmail/control/servercert.pem
+ chown qmaild.qmail /var/qmail/control/servercert.pem
+ ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem
+
+ echo -e "\e[32;01m If You want to have a signed cert, do the following: \033[0m"
+ echo -e "\e[32;01m openssl req -new -nodes -out req.pem \ \033[0m"
+ echo -e "\e[32;01m -keyout /var/qmail/control/servercert.pem \033[0m"
+ echo -e "\e[32;01m chmod 640 /var/qmail/control/servercert.pem \033[0m"
+ echo -e "\e[32;01m chown qmaild.qmail /var/qmail/control/servercert.pem \033[0m"
+ echo -e "\e[32;01m ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem \033[0m"
+ echo -e "\e[32;01m Send req.pem to your CA to obtain signed_req.pem, and do: \033[0m"
+ echo -e "\e[32;01m cat signed_req.pem >> /var/qmail/control/servercert.pem \033[0m"
+ fi
+
+}
+
+pkg_config() {
+
+export qhost=`hostname`
+ if [ ${ROOT} = "/" ] ; then
+ if [ ! -f ${ROOT}/var/qmail/control/me ] ; then
+ ${ROOT}/var/qmail/bin/config-fast $qhost
+ fi
+ fi
+
+ echo "Accepting relaying by default from all ips configured on this machine."
+ LOCALIPS=`/sbin/ifconfig | grep inet | cut -d " " -f 12 -s | cut -b 6-20`
+ for ip in $LOCALIPS; do
+ echo "$ip:allow,RELAYCLIENT=\"\"" >> /etc/tcp.smtp
+ done
+ echo ":allow" >> /etc/tcp.smtp
+
+ tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
+
+}