summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-01-11 07:08:52 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-01-11 07:08:52 +0000
commitbc7c5830b5e7c973d3e65af4b35cb0aeb1f44a0d (patch)
tree4f906966b42ff0035efe16e19dfd1415de492c87 /net-mail/qmail-ldap
parentblock the new qmail-ldap for testing (diff)
downloadgentoo-2-bc7c5830b5e7c973d3e65af4b35cb0aeb1f44a0d.tar.gz
gentoo-2-bc7c5830b5e7c973d3e65af4b35cb0aeb1f44a0d.tar.bz2
gentoo-2-bc7c5830b5e7c973d3e65af4b35cb0aeb1f44a0d.zip
close bug #36828 with sj7trunks@gentoo.org's new stuff, including adding him as a maintainer
Diffstat (limited to 'net-mail/qmail-ldap')
-rw-r--r--net-mail/qmail-ldap/ChangeLog25
-rw-r--r--net-mail/qmail-ldap/Manifest37
-rw-r--r--net-mail/qmail-ldap/files/1.03-r2/samples.ldif46
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/99qmail4
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/conf-common29
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/conf-pop3d25
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/conf-qmqpd15
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/conf-qmtpd18
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/conf-smtpd37
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/config-sanity-check23
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/dot_qmail3
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/mkservercert55
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/qmail-control30
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/qmail-genrsacert.sh33
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/rc4
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3d26
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3dlog2
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpd27
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpdlog2
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpd27
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpdlog2
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailsend2
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailsendlog2
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpd27
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpdlog2
-rw-r--r--net-mail/qmail-ldap/files/1.03-r3/servercert.cnf37
-rw-r--r--net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r25
-rw-r--r--net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r34
-rw-r--r--net-mail/qmail-ldap/files/gentoo.patch34
-rw-r--r--net-mail/qmail-ldap/files/qmail-link-sync-gentoo.patch55
-rw-r--r--net-mail/qmail-ldap/files/tcp.pop3.sample6
-rw-r--r--net-mail/qmail-ldap/files/tcp.qmqp.sample8
-rw-r--r--net-mail/qmail-ldap/files/tcp.qmtp.sample8
-rw-r--r--net-mail/qmail-ldap/files/tcp.smtp.sample83
-rw-r--r--net-mail/qmail-ldap/metadata.xml14
-rw-r--r--net-mail/qmail-ldap/qmail-ldap-1.03-r2.ebuild355
-rw-r--r--net-mail/qmail-ldap/qmail-ldap-1.03-r3.ebuild356
37 files changed, 1465 insertions, 3 deletions
diff --git a/net-mail/qmail-ldap/ChangeLog b/net-mail/qmail-ldap/ChangeLog
index 4f6ca09ea430..846cb0bdc6b0 100644
--- a/net-mail/qmail-ldap/ChangeLog
+++ b/net-mail/qmail-ldap/ChangeLog
@@ -1,6 +1,27 @@
# ChangeLog for net-mail/qmail-ldap
-# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/ChangeLog,v 1.4 2004/01/05 23:32:13 robbat2 Exp $
+# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/ChangeLog,v 1.5 2004/01/11 07:08:52 robbat2 Exp $
+
+*qmail-ldap-1.03-r3 (10 Jan 2004)
+
+ 10 Jan 2004; Robin H. Johnson <robbat2@gentoo.org>
+ qmail-ldap-1.03-r2.ebuild, qmail-ldap-1.03-r3.ebuild, files/gentoo.patch,
+ files/qmail-link-sync-gentoo.patch, files/tcp.pop3.sample,
+ files/tcp.qmqp.sample, files/tcp.qmtp.sample, files/tcp.smtp.sample,
+ files/1.03-r2/samples.ldif, files/1.03-r3/99qmail,
+ files/1.03-r3/conf-common, files/1.03-r3/conf-pop3d,
+ files/1.03-r3/conf-qmqpd, files/1.03-r3/conf-qmtpd,
+ files/1.03-r3/conf-smtpd, files/1.03-r3/config-sanity-check,
+ files/1.03-r3/dot_qmail, files/1.03-r3/mkservercert,
+ files/1.03-r3/qmail-control, files/1.03-r3/qmail-genrsacert.sh,
+ files/1.03-r3/rc, files/1.03-r3/run-qmailpop3d,
+ files/1.03-r3/run-qmailpop3dlog, files/1.03-r3/run-qmailqmqpd,
+ files/1.03-r3/run-qmailqmqpdlog, files/1.03-r3/run-qmailqmtpd,
+ files/1.03-r3/run-qmailqmtpdlog, files/1.03-r3/run-qmailsend,
+ files/1.03-r3/run-qmailsendlog, files/1.03-r3/run-qmailsmtpd,
+ files/1.03-r3/run-qmailsmtpdlog, files/1.03-r3/servercert.cnf:
+ close bug #36828 with sj7trunks@gentoo.org's new stuff, including adding him
+ as a maintainer
05 Jan 2004; Robin H. Johnson <robbat2@gentoo.org>
qmail-ldap-1.03-r1.ebuild, files/supervise/run-qmailpop3d:
diff --git a/net-mail/qmail-ldap/Manifest b/net-mail/qmail-ldap/Manifest
index 03956d6c9b2b..6b7c3773c055 100644
--- a/net-mail/qmail-ldap/Manifest
+++ b/net-mail/qmail-ldap/Manifest
@@ -1,15 +1,26 @@
+MD5 00ee57b48c26b20218a13e9a2ba72ba1 qmail-ldap-1.03-r2.ebuild 11832
MD5 1428882a2044577b8c740e5c185ba488 qmail-ldap-1.03-r1.ebuild 11628
-MD5 1e0033dd027cbf1b5734d86b94895c11 ChangeLog 789
+MD5 7f60ae3f9d3df4b66c178d53fb100253 ChangeLog 1902
+MD5 6eb98a664d3be76c35b63df12cad1819 metadata.xml 510
+MD5 4aeb69b0d668c843be7bd8ea5fd3c13d qmail-ldap-1.03-r3.ebuild 10732
MD5 f42a779e5c708c2d7bf38de66dfb93f5 files/rc 108
MD5 931b3ed00571e8e2a22b550fcd1d7137 files/qmail-queue.patch.bz2 722
+MD5 b7e7c96254dabacdec5bf5904957c7b2 files/tcp.qmqp.sample 399
MD5 3866e15deb8a69d44cacb5b3680d1b61 files/qmail-linksync.patch.bz2 687
MD5 cdeca5e6a3d82ed7b85e372433576bb2 files/samples.ldif 821
+MD5 820848b92884db5bdd3030e57bf21d07 files/gentoo.patch 1419
+MD5 e59223e5e1882318ecec8cc9eb9d43de files/tcp.smtp.sample 3777
MD5 0078aede689ce77bc32e32124a5e7fbb files/homedir.patch.bz2 527
MD5 1dcd3bb9666d5015bca6b7eb33478542 files/errno.patch.bz2 401
+MD5 d779786aab66f97f6e7e4785ca89a636 files/tcp.pop3.sample 335
MD5 b69ae80155ab4d0555b66a79ae5ab95d files/digest-qmail-ldap-1.03-r1 452
+MD5 d2f6c625c3a73be4262b616e0e2d132c files/digest-qmail-ldap-1.03-r2 337
+MD5 61a73bd4ce3f9bd360b73b791799f4d8 files/digest-qmail-ldap-1.03-r3 263
MD5 c378c5845848ee31d70f0d05cbcf86be files/dot_qmail 12
MD5 8af1f30a164fbdec0d51d11ef82dcaa9 files/tls.patch.bz2 406
+MD5 13bd1b1b40e0f20ce43d86d2f4b65e82 files/tcp.qmtp.sample 432
MD5 f0fff68af5993d02735358e3a3d3b12e files/qmail-control 804
+MD5 b66cf6234bb37ddd8731676b201fa7e4 files/qmail-link-sync-gentoo.patch 1532
MD5 d24fa37b58967d2d8022c84c88148ed6 files/control/file 41
MD5 04f43d57aee8dc0b8e2465eeb7035e2b files/control/ldapbasedn 19
MD5 f77794722007d48a2d7751684ac23580 files/control/ldaplogin 45
@@ -33,3 +44,27 @@ MD5 f43900d79a0aacb5e0d71b0bb6c06fea files/supervise/run-qmailsmtpdlog 97
MD5 834dad5113515d0f00981fdc1d07fa84 files/supervise/run-qmailsendlog 96
MD5 23a2babf3049fe012de21c17e550b3e5 files/supervise/run-qmailsend 29
MD5 34f7022d4bda6c19752a878f8da7289b files/supervise/run-qmailpop3dlog 100
+MD5 9fc8ba8582cf5e04f67ee32ad9c8a967 files/1.03-r2/samples.ldif 1215
+MD5 6c0f741d2f9a7cc5e6b346d435ab0e64 files/1.03-r3/rc 117
+MD5 9b155a2ee5b007f5b73dc2b7b74a5479 files/1.03-r3/run-qmailpop3d 1176
+MD5 4d68354d61f3ebde2284565dba6acb95 files/1.03-r3/run-qmailqmqpd 1165
+MD5 27ed92380dfeda24cbd1300e69a14aa5 files/1.03-r3/run-qmailqmtpd 1165
+MD5 2e4d0fc52fe4b044b5bbedc443bfa0ae files/1.03-r3/run-qmailsmtpd 1165
+MD5 180a513f34e3f00abc609672a190072c files/1.03-r3/99qmail 137
+MD5 249138d56492deb0f856849bc002e46a files/1.03-r3/run-qmailqmqpdlog 97
+MD5 795f633858c0919b6e201cf2b845779e files/1.03-r3/run-qmailqmtpdlog 97
+MD5 bda652bf331978ad291ad0cef31167dc files/1.03-r3/qmail-genrsacert.sh 1170
+MD5 c369664bce0646b3d323d08f9ba5b8ce files/1.03-r3/dot_qmail 82
+MD5 f43900d79a0aacb5e0d71b0bb6c06fea files/1.03-r3/run-qmailsmtpdlog 97
+MD5 5cd8bf9433959230cac597db56fc09c2 files/1.03-r3/conf-pop3d 1071
+MD5 77e5d77ee07503b5635d7ae32d0867f9 files/1.03-r3/conf-qmqpd 470
+MD5 4b8681487ba234b51333c6e67d878f0d files/1.03-r3/conf-qmtpd 562
+MD5 776bd8c07655f8b2d155bb73408530db files/1.03-r3/servercert.cnf 1103
+MD5 75a0493ec2aceeb0cbcda02bdd505f3c files/1.03-r3/conf-smtpd 1707
+MD5 834dad5113515d0f00981fdc1d07fa84 files/1.03-r3/run-qmailsendlog 96
+MD5 7e6dbdfa1e3c30491d076eba152822ce files/1.03-r3/mkservercert 1434
+MD5 b4c1c9313544bdf46aae688569137d91 files/1.03-r3/qmail-control 858
+MD5 ae80de3e5557744c2424f28f20bbec2b files/1.03-r3/conf-common 1094
+MD5 e316a51ae24c697944e54a52aa6e84ea files/1.03-r3/config-sanity-check 814
+MD5 23a2babf3049fe012de21c17e550b3e5 files/1.03-r3/run-qmailsend 29
+MD5 0e97c0b031776f40cacdfbf3114af574 files/1.03-r3/run-qmailpop3dlog 97
diff --git a/net-mail/qmail-ldap/files/1.03-r2/samples.ldif b/net-mail/qmail-ldap/files/1.03-r2/samples.ldif
new file mode 100644
index 000000000000..74f805c9b86a
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r2/samples.ldif
@@ -0,0 +1,46 @@
+#ldapauth, better to use this than your rootdn for security reasons
+dn: uid=ldapauth,ou=People,dc=yhourhost,dc=net
+uid: ldapauth
+cn: ldapuath
+objectClass: account
+objectClass: posixAccount
+objectClass: top
+objectClass: shadowAccount
+shadowLastChange: 12116
+loginShell: /bin/true
+uidNumber: 11184
+gidNumber: 2110
+homeDirectory: /var/qmail/maildirs/
+gecos: ldap authorization,,,
+userPassword: libcrypt_format
+
+#sample user dn #NOTE YOU CANNOT HAVE mailMessageStore
+dn: uid=denverj ,ou=people,dc=yourhost,dc=net
+objectClass: top
+objectClass: inetOrgPerson
+objectClass: qmailUser
+objectClass: person
+cn: John Denver
+givenName: denverj
+sn: denverj
+uid: denverj
+mail: denverj@yourhost.net
+homeDirectory: /var/qmail/maildirs/denverj/
+mailAlternateAddress: denverj@alias.host.net
+userPassword: libcrypt_format
+
+#sample virtual user dn # NOTE YOU CANNOT HAVE homeDirectory
+dn: uid=denverj ,ou=people,dc=yourhost,dc=net
+objectClass: top
+objectClass: inetOrgPerson
+objectClass: qmailUser
+objectClass: person
+cn: John Denver
+givenName: denverj
+sn: denverj
+uid: denverj
+mail: denverj@yourhost.net
+mailMessageStore: /var/qmail/maildirs/denverj/Maildir/
+mailAlternateAddress: denverj@alias.host.net
+userPassword: libcrypt_format
+
diff --git a/net-mail/qmail-ldap/files/1.03-r3/99qmail b/net-mail/qmail-ldap/files/1.03-r3/99qmail
new file mode 100644
index 000000000000..d9d929e4892b
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/99qmail
@@ -0,0 +1,4 @@
+PATH="/var/qmail/bin"
+ROOTPATH="/var/qmail/bin"
+CONFIG_PROTECT="/var/qmail/control /var/qmail/alias"
+QMAIL_CONTROLDIR=/var/qmail/control
diff --git a/net-mail/qmail-ldap/files/1.03-r3/conf-common b/net-mail/qmail-ldap/files/1.03-r3/conf-common
new file mode 100644
index 000000000000..f35a22fd2313
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/conf-common
@@ -0,0 +1,29 @@
+# Common Configuration file for all qmail daemons
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/conf-common,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+# Qmail User IDS to run daemons as
+QMAILDUID=`id -u qmaild`
+NOFILESGID=`id -g qmaild`
+
+# Qmail Control Dir (this is actually set in /etc/env.d/99qmail)
+#QMAIL_CONTROLDIR=/var/qmail/control
+
+# Host and port to listen on
+# We listen on the IPv4 local ip by default
+TCPSERVER_HOST=0.0.0.0
+TCPSERVER_PORT=${SERVICE}
+
+# you do not need to specify -x, -c, -u or -g in this variable as those are
+# added later
+TCPSERVER_OPTS="-p -v"
+
+# we limit data and stack segments to 8mbytes, you may need to raise this if
+# you are using a filter in QMAILQUEUE
+SOFTLIMIT_OPTS="-m 8000000"
+
+# We don't have anything to set QMAILQUEUE to at the moment, so we leave it alone
+#QMAILQUEUE=""
+
+# tcpserver maximum concurrency, defaults to 40 in tcpserver
+# this controls the maximum number of incoming connections that it will accept
+[ -e ${QMAIL_CONTROLDIR}/concurrencyincoming ] && MAXCONN=$(<${QMAIL_CONTROLDIR}/concurrencyincoming) || MAXCONN=40
diff --git a/net-mail/qmail-ldap/files/1.03-r3/conf-pop3d b/net-mail/qmail-ldap/files/1.03-r3/conf-pop3d
new file mode 100644
index 000000000000..b1a3445ba19b
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/conf-pop3d
@@ -0,0 +1,25 @@
+# Configuration file for qmail-pop3d
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/conf-pop3d,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+# Stuff to run before tcpserver
+#QMAIL_TCPSERVER_PRE=""
+# Stuff to run before the authenticator
+#QMAIL_POP3_PREAUTH=""
+# Stuff to run after the user has authenticated successfully
+#QMAIL_POP3_POSTAUTH=""
+
+# this should contain the FQDN of your server
+# by default it pulls the value from qmail
+# which should be correct
+QMAIL_POP3_POP3HOST="$(<${QMAIL_CONTROLDIR}/me)"
+
+# If you want POP3 before SMTP, and you are using this POP3 daemon
+# uncomment the next two lines
+#QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"
+#QMAIL_POP3_POSTAUTH="${QMAIL_POP3_POSTAUTH} /usr/bin/relay-ctrl-allow"
+
+# This controls what password authentication tool POP3 uses
+# It must support DJB's checkpassword interface (http://cr.yp.to/checkpwd.html)
+QMAIL_POP3_CHECKPASSWORD="/bin/checkpassword"
+# cmd5checkpw only validates passwords from /etc/poppasswd
+#QMAIL_POP3_CHECKPASSWORD="/bin/cmd5checkpw"
diff --git a/net-mail/qmail-ldap/files/1.03-r3/conf-qmqpd b/net-mail/qmail-ldap/files/1.03-r3/conf-qmqpd
new file mode 100644
index 000000000000..a7d60f7929a0
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/conf-qmqpd
@@ -0,0 +1,15 @@
+# Configuration file for qmail-qmqpd
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/conf-qmqpd,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+# Stuff to run before tcpserver
+#QMAIL_TCPSERVER_PRE=""
+# Stuff to run qmail-qmqpd
+#QMAIL_QMQP_PRE=""
+# Stuff to after qmail-qmqpd
+#QMAIL_QMQP_POST=""
+
+# this turns off the IDENT grab attempt on connecting
+TCPSERVER_OPTS="${TCPSERVER_OPTS} -R"
+
+# I don't trust /etc/services to have obscure ports
+TCPSERVER_PORT=628
diff --git a/net-mail/qmail-ldap/files/1.03-r3/conf-qmtpd b/net-mail/qmail-ldap/files/1.03-r3/conf-qmtpd
new file mode 100644
index 000000000000..1abd3121edf8
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/conf-qmtpd
@@ -0,0 +1,18 @@
+# Configuration file for qmail-qmtpd
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/conf-qmtpd,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+# For more information on making your servers talk QMTP
+# see http://cr.yp.to/im/mxps.html
+
+# Stuff to run before tcpserver
+#QMAIL_TCPSERVER_PRE=""
+# Stuff to run qmail-qmtpd
+#QMAIL_QMTP_PRE=""
+# Stuff to after qmail-qmtpd
+#QMAIL_QMTP_POST=""
+
+# this turns off the IDENT grab attempt on connecting
+TCPSERVER_OPTS="${TCPSERVER_OPTS} -R"
+
+# I don't trust /etc/services to have obscure ports
+TCPSERVER_PORT=209
diff --git a/net-mail/qmail-ldap/files/1.03-r3/conf-smtpd b/net-mail/qmail-ldap/files/1.03-r3/conf-smtpd
new file mode 100644
index 000000000000..358bdc95fd0d
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/conf-smtpd
@@ -0,0 +1,37 @@
+# Configuration file for qmail-smtpd
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/conf-smtpd,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+# Stuff to run before tcpserver
+#QMAIL_TCPSERVER_PRE=""
+# Stuff to run qmail-smtpd
+#QMAIL_SMTP_PRE=""
+# Stuff to after qmail-smtpd
+#QMAIL_SMTP_POST=""
+
+# this turns off the IDENT grab attempt on connecting
+TCPSERVER_OPTS="${TCPSERVER_OPTS} -R"
+
+# You might want to use rblsmtpd with this, but you need to fill in a RBL server here first
+# see http://cr.yp.to/ucspi-tcp/rblsmtpd.html for more details
+#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} rblsmtpd -r RBL-SERVER"
+
+# If you are interested in providing POP or IMAP before SMTP type relaying,
+# emerge relay-ctrl, then uncomment the next 2 lines
+#QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"
+#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check"
+# In /etc/courier-imap/authdaemonrc add the next line to the end:
+#authmodulelist="${authmodulelist} relay-ctrl-allow"
+# Then in /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl}
+# Add this at the end
+#PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir"
+
+# This next block is for SMTP-AUTH
+# This provides the LOGIN, PLAIN and CRAM-MD5 types
+# the 'cmd5checkpw' used in $QMAIL_SMTP_AUTHCHECKPASSWORD supports CRAM-MD5
+# and reads it's data from /etc/poppasswd
+# see the manpage for cmd5checkpw for details on the passwords
+# uncomment the next four lines to enable SMTP-AUTH
+#QMAIL_SMTP_AUTHHOST=$(<${QMAIL_CONTROLDIR}/me)
+#[ -z "${QMAIL_SMTP_POST}" ] && QMAIL_SMTP_POST=/bin/true
+#QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw"
+#QMAIL_SMTP_POST="${QMAIL_SMTP_AUTHHOST} ${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}"
diff --git a/net-mail/qmail-ldap/files/1.03-r3/config-sanity-check b/net-mail/qmail-ldap/files/1.03-r3/config-sanity-check
new file mode 100644
index 000000000000..fb2a6d01b265
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/config-sanity-check
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Configuration Sanity Checking for qmail
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/config-sanity-check,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+# This is intended solely to stop qmail eating up all your hard disk space with logs
+
+CONFIG_SANITY_GOOD=1
+
+# check simple stuff first
+if [ -z "${QMAILDUID}" -o -z "${NOFILESGID}" -o -z "${SERVICE}" ]; then
+ echo "SERVICE(${SERVICE}), QMAILDUID(${QMAILDUID}) or NOFILESGID(${NOFILESGID}) is unset in $0"
+ CONFIG_SANITY_GOOD=0
+fi
+
+# now make sure we are are on a port that is resolable to a port number
+if [ -z "`getent services ${TCPSERVER_PORT}`" ]; then
+ CONFIG_SANITY_GOOD=0
+fi
+
+if [ ! "${CONFIG_SANITY_GOOD}" -eq "1" ]; then
+ echo "Some error detected, sleeping for 30 seconds for safety"
+ sleep 30s
+ exit 1
+fi
diff --git a/net-mail/qmail-ldap/files/1.03-r3/dot_qmail b/net-mail/qmail-ldap/files/1.03-r3/dot_qmail
new file mode 100644
index 000000000000..81a15fc5c50c
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/dot_qmail
@@ -0,0 +1,3 @@
+# Uncomment the next line for .forward support
+#|dot-forward .forward
+./.maildir/
diff --git a/net-mail/qmail-ldap/files/1.03-r3/mkservercert b/net-mail/qmail-ldap/files/1.03-r3/mkservercert
new file mode 100644
index 000000000000..a7de9b8bdf9a
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/mkservercert
@@ -0,0 +1,55 @@
+#! /bin/sh
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/mkservercert,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+# Self-signed certificate generator for Qmail under Gentoo
+# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003
+# Based on mkimapdcert from courier-imap.
+
+test -x /usr/bin/openssl || exit 0
+source /sbin/functions.sh
+
+filedir="/var/qmail/control"
+pemfile="${filedir}/servercert.pem"
+randfile="${filedir}/servercert.rand"
+conffile="${filedir}/servercert.cnf"
+
+# file details for pemfile
+mode="0640"
+uid="qmaild"
+gid="qmail"
+
+# expire on certifcate
+days="365"
+
+if test -f $pemfile
+then
+ eerror "$pemfile already exists."
+ exit 1
+fi
+
+ewarn "Please customize ${conffile} before continuing!"
+einfo "Press ENTER to continue, or CTRL-C to stop now."
+read
+
+# setup the temp file
+cp /dev/null $pemfile
+chmod 600 $pemfile
+chown root $pemfile
+
+cleanup() {
+ rm -f $pemfile
+ rm -f $randfile
+ exit 1
+}
+
+dd if=/dev/urandom of=${randfile} bs=64 count=1 2>/dev/null
+chmod 600 ${randfile}
+einfo "Creating self-signed certificate"
+/usr/bin/openssl req -new -x509 -days ${days} -nodes \
+ -config ${conffile} -out $pemfile -keyout $pemfile -rand ${randfile} || cleanup
+einfo "Certificate details"
+/usr/bin/openssl x509 -subject -dates -fingerprint -noout -in $pemfile || cleanup
+chown ${uid}:${gid} ${pemfile}
+chmod ${mode} ${pemfile}
+#qmail needs an extra item
+ln -s ${pemfile} ${filedir}/clientcert.pem
+rm -f $randfile
diff --git a/net-mail/qmail-ldap/files/1.03-r3/qmail-control b/net-mail/qmail-ldap/files/1.03-r3/qmail-control
new file mode 100644
index 000000000000..12e1748e535b
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/qmail-control
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/qmail-control,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+opts="start stop restart reload"
+
+start() {
+ ebegin "Starting qmail mta ..."
+ svc -u /service/qmail-{smtpd,send,qmqp,qmtp}
+ eend $?
+ ebegin "Starting qmail mta logging ..."
+ svc -u /service/qmail-{smtpd,send,qmqp,qmtp}/log
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping qmail mta ..."
+ svc -d /service/qmail-{smtpd,send,qmqp,qmtp}
+ eend $?
+ ebegin "Stopping qmail mta logging ..."
+ svc -d /service/qmail-{smtpd,send,qmqp,qmtp}/log
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading 'locals' and 'virtualdomains' control files."
+ svc -h /service/qmail-send
+ eend $?
+}
diff --git a/net-mail/qmail-ldap/files/1.03-r3/qmail-genrsacert.sh b/net-mail/qmail-ldap/files/1.03-r3/qmail-genrsacert.sh
new file mode 100644
index 000000000000..d991208c7306
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/qmail-genrsacert.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/qmail-genrsacert.sh,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003
+# This file generates the static temporary RSA keys needed for qmail to encrypt messages
+# It should be run from a crontab, once a day is ok on low load machines, but
+# if you do lots of mail, once per hour is more reasonable
+# if you do NOT create the rsa512.pem, qmail will generate it on the fly for
+# each connection, which can be VERY slow.
+
+if [ -z "${ROOT}" -o "${ROOT}" = "/" ]; then
+confdir=/var/qmail/control
+else
+confdir=${ROOT}/var/qmail/control
+fi
+pemfile="${confdir}/rsa512.pem"
+tmpfile="${confdir}/rsa512.pem.tmp"
+
+# this is the number of bits in the key
+# it should be a power of 2 ideally
+# and it must be more than 64!
+bits="512"
+
+# the key should be 0600
+# which is readable by qmaild only!
+umaskvalue="0077"
+uid="qmaild"
+gid="qmail"
+
+umask ${umaskvalue} ;
+# we need to make sure that all of the operations succeed
+/usr/bin/openssl genrsa -out ${tmpfile} ${bits} 2>/dev/null && \
+/bin/chown ${uid}:${gid} ${tmpfile} && \
+/bin/mv -f ${tmpfile} ${pemfile}
diff --git a/net-mail/qmail-ldap/files/1.03-r3/rc b/net-mail/qmail-ldap/files/1.03-r3/rc
new file mode 100644
index 000000000000..74b00778dc60
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/rc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec env - PATH="/var/qmail/bin:$PATH" \
+ qmail-start "`grep -v '^#' /var/qmail/control/defaultdelivery`"
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3d b/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3d
new file mode 100644
index 000000000000..cb002b6f91f5
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3d
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Gentoo Startup script for qmail's POP3 daemon
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3d,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+#
+# If you need to edit this file, please look at editing conf-pop3d and
+# conf-common first. If you still need to change this file, you should
+# probably file a bug on the bugzilla saying what you wanted to change so that
+# modification can be make possible via the configuration files
+
+# This is to make life easier
+SERVICE=pop3
+
+# this is to inherit QMAIL_CONTROLDIR
+. /etc/profile
+
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check
+
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x /etc/tcp.${SERVICE}.cdb -c ${MAXCONN} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_POP3_PREAUTH} /var/qmail/bin/qmail-popup ${QMAIL_POP3_POP3HOST} \
+ ${QMAIL_POP3_CHECKPASSWORD} ${QMAIL_POP3_POSTAUTH} \
+ /var/qmail/bin/qmail-pop3d .maildir 2>&1
+
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3dlog b/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3dlog
new file mode 100644
index 000000000000..b1fcb8f4af22
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailpop3dlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-pop3d
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpd b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpd
new file mode 100644
index 000000000000..92a0d1ede623
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpd
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Gentoo Startup script for qmail's QMQP daemon
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpd,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+#
+# If you need to edit this file, please look at editing conf-qmqpd and
+# conf-common first. If you still need to change this file, you should
+# probably file a bug on the bugzilla saying what you wanted to change so that
+# modification can be make possible via the configuration files
+
+# This is to make life easier
+SERVICE=qmqp
+
+# this is to inherit QMAIL_CONTROLDIR
+. /etc/profile
+
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check
+
+# Now run it all
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x /etc/tcp.${SERVICE}.cdb \
+ -c ${MAXCONN} -u ${QMAILDUID} -g ${NOFILESGID} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_QMQP_PRE} /var/qmail/bin/qmail-${SERVICE}d ${QMAIL_QMQP_POST} \
+ 2>&1
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpdlog b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpdlog
new file mode 100644
index 000000000000..d759fbcbcfe1
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmqpdlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-qmqpd
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpd b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpd
new file mode 100644
index 000000000000..a15cfdcdfc86
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpd
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Gentoo Startup script for qmail's QMTP daemon
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpd,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+#
+# If you need to edit this file, please look at editing conf-qmtpd and
+# conf-common first. If you still need to change this file, you should
+# probably file a bug on the bugzilla saying what you wanted to change so that
+# modification can be make possible via the configuration files
+
+# This is to make life easier
+SERVICE=qmtp
+
+# this is to inherit QMAIL_CONTROLDIR
+. /etc/profile
+
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check
+
+# Now run it all
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x /etc/tcp.${SERVICE}.cdb \
+ -c ${MAXCONN} -u ${QMAILDUID} -g ${NOFILESGID} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_QMTP_PRE} /var/qmail/bin/qmail-${SERVICE}d ${QMAIL_QMTP_POST} \
+ 2>&1
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpdlog b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpdlog
new file mode 100644
index 000000000000..413a217d7de6
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailqmtpdlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-qmtpd
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailsend b/net-mail/qmail-ldap/files/1.03-r3/run-qmailsend
new file mode 100644
index 000000000000..8dbd3adf524f
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailsend
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /var/qmail/rc
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailsendlog b/net-mail/qmail-ldap/files/1.03-r3/run-qmailsendlog
new file mode 100644
index 000000000000..5ff50d1e7711
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/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-ldap/files/1.03-r3/run-qmailsmtpd b/net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpd
new file mode 100644
index 000000000000..c289767bf03e
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpd
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Gentoo Startup script for qmail's SMTP daemon
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpd,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+#
+# If you need to edit this file, please look at editing conf-smtpd and
+# conf-common first. If you still need to change this file, you should
+# probably file a bug on the bugzilla saying what you wanted to change so that
+# modification can be make possible via the configuration files
+
+# This is to make life easier
+SERVICE=smtp
+
+# this is to inherit QMAIL_CONTROLDIR
+. /etc/profile
+
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check
+
+# Now run it all
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x /etc/tcp.${SERVICE}.cdb \
+ -c ${MAXCONN} -u ${QMAILDUID} -g ${NOFILESGID} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_SMTP_PRE} /var/qmail/bin/qmail-${SERVICE}d ${QMAIL_SMTP_POST} \
+ 2>&1
diff --git a/net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpdlog b/net-mail/qmail-ldap/files/1.03-r3/run-qmailsmtpdlog
new file mode 100644
index 000000000000..2d9546146583
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/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-ldap/files/1.03-r3/servercert.cnf b/net-mail/qmail-ldap/files/1.03-r3/servercert.cnf
new file mode 100644
index 000000000000..9186689f51cd
--- /dev/null
+++ b/net-mail/qmail-ldap/files/1.03-r3/servercert.cnf
@@ -0,0 +1,37 @@
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/files/1.03-r3/servercert.cnf,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003
+# This is the openssl config file to generate keys for qmail
+# It is read by mkservercert
+
+[ req ]
+# you can increase this value, but be aware that it will make things much slower
+# this should be a power of 2!
+default_bits = 1024
+# leave the rest of these alone!
+encrypt_key = yes
+distinguished_name = req_dn
+x509_extensions = cert_type
+prompt = no
+
+[ req_dn ]
+# 2-Letter ISO country code
+C=US
+# FULL name of state/province/district
+# NO abbreviations!
+ST=Alabama
+# FULL name of city
+# NO abbreviations!
+L=Mobile
+# Full Name of your organization
+# NO abbreviations!
+O=Foobar Systems
+# Leave this alone unless specifically need to change it!
+OU=Automatically-generated Qmail SMTP SSL key
+# This should be a FQDN that resolves to the IP of your server
+CN=localhost
+# This should be the email address for the administrator of the server
+emailAddress=postmaster@localhost
+
+# Leave this alone!
+[ cert_type ]
+nsCertType = server
diff --git a/net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r2 b/net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r2
new file mode 100644
index 000000000000..1d75c7d6c97b
--- /dev/null
+++ b/net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r2
@@ -0,0 +1,5 @@
+MD5 622f65f982e380dbe86e6574f3abcb7c qmail-1.03.tar.gz 220668
+MD5 8edda59102180973dd1bb546da7de160 qmail-0.0.0.0.patch 450
+MD5 4e1f2d8315e7e2a5482798c9d19fac4d sendmail-flagf.patch 863
+MD5 0c9ea59691ad08440e927a600b0bb5fd qmail-ldap-1.03-20040101.patch.gz 224532
+MD5 f4579bf5e099ab973252f168f47af203 qmail-ldap-1.03-r2-tls.patch.bz2 737
diff --git a/net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r3 b/net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r3
new file mode 100644
index 000000000000..0d368d70e883
--- /dev/null
+++ b/net-mail/qmail-ldap/files/digest-qmail-ldap-1.03-r3
@@ -0,0 +1,4 @@
+MD5 622f65f982e380dbe86e6574f3abcb7c qmail-1.03.tar.gz 220668
+MD5 8edda59102180973dd1bb546da7de160 qmail-0.0.0.0.patch 450
+MD5 4e1f2d8315e7e2a5482798c9d19fac4d sendmail-flagf.patch 863
+MD5 0c9ea59691ad08440e927a600b0bb5fd qmail-ldap-1.03-20040101.patch.gz 224532
diff --git a/net-mail/qmail-ldap/files/gentoo.patch b/net-mail/qmail-ldap/files/gentoo.patch
new file mode 100644
index 000000000000..2a81b4d716e2
--- /dev/null
+++ b/net-mail/qmail-ldap/files/gentoo.patch
@@ -0,0 +1,34 @@
+--- Makefile.old 2004-01-08 19:03:20.288589831 -0800
++++ Makefile 2004-01-08 19:07:26.942655958 -0800
+@@ -17,7 +17,7 @@
+ # -DQMQP_COMPRESS to use the QMQP on the fly compression (for clusters)
+ # -DQUOTATRASH to include the Trash in the quota calculation (normaly it is not)
+ # -DSMTPEXECCHECK to enable smtp DOS/Windows executable detection
+-#LDAPFLAGS=-DQLDAP_CLUSTER -DEXTERNAL_TODO -DDASH_EXT -DDATA_COMPRESS -DQMQP_COMPRESS
++LDAPFLAGS=-DEXTERNAL_TODO -DBIGTODO -DDASH_EXT -DALTQUEUE
+
+ # Perhaps you have different ldap libraries, change them here
+ LDAPLIBS=-L/usr/local/lib -lldap -llber
+@@ -55,18 +55,18 @@
+ MNW=-DMAKE_NETSCAPE_WORK
+
+ # to enable the auto-maildir-make feature uncomment the next line
+-#MDIRMAKE=-DAUTOMAILDIRMAKE
++MDIRMAKE=-DAUTOMAILDIRMAKE
+
+ # to enable the auto-homedir-make feature uncomment the next line
+-#HDIRMAKE=-DAUTOHOMEDIRMAKE
++HDIRMAKE=-DAUTOHOMEDIRMAKE
+
+ # on most systems we need this to make auth_pop and auth_imap
+ #SHADOWLIBS=-lcrypt
+ # OpenBSD and other Systems do not have libcrypt, so comment the line out
+ # if you get linking problems.
+ # To use shadow passwords under some Linux OS, uncomment the next two lines.
+-#SHADOWLIBS=-lcrypt -lshadow
+-#SHADOWOPTS=-DPW_SHADOW
++SHADOWLIBS=-lcrypt -lshadow
++SHADOWOPTS=-DPW_SHADOW
+ # To use shadow passwords under Solaris, uncomment the SHADOWOPTS line.
+
+ # to enable the possibility to log and debug imap and pop uncoment the
diff --git a/net-mail/qmail-ldap/files/qmail-link-sync-gentoo.patch b/net-mail/qmail-ldap/files/qmail-link-sync-gentoo.patch
new file mode 100644
index 000000000000..ec67d553c73e
--- /dev/null
+++ b/net-mail/qmail-ldap/files/qmail-link-sync-gentoo.patch
@@ -0,0 +1,55 @@
+diff -u qmail-1.03/qmail-local.c qmail-1.03-linksync/qmail-local.c
+--- qmail-1.03/qmail-local.c 2004-01-09 13:48:14.000000000 -0800
++++ qmail-1.03-linksync/qmail-local.c 2004-01-09 13:54:25.041334954 -0800
+@@ -1,5 +1,6 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <fcntl.h>
+ #include <unistd.h>
+ #include "readwrite.h"
+ #include "sig.h"
+@@ -159,6 +160,9 @@
+ }
+
+ if (link(fntmptph,fnnewtph) == -1) goto fail;
++ if ((fd = open(fnnewtph, O_RDONLY)) < 0 ||
++ fsync(fd) < 0 || close(fd) < 0) goto fail;
++
+ /* if it was error_exist, almost certainly successful; i hate NFS */
+ tryunlinktmp(); _exit(0);
+
+diff -u qmail-1.03/qmail-queue.c qmail-1.03-linksync/qmail-queue.c
+--- qmail-1.03/qmail-queue.c 2004-01-09 13:48:14.000000000 -0800
++++ qmail-1.03-linksync/qmail-queue.c 2004-01-09 13:53:10.766069219 -0800
+@@ -1,5 +1,6 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <fcntl.h>
+ #include <unistd.h>
+ #include "readwrite.h"
+ #include "sig.h"
+@@ -172,6 +173,7 @@
+ {
+ unsigned int len;
+ char ch;
++ int fd;
+ #ifdef BIGBROTHER
+ unsigned int xlen, n;
+ char *x;
+@@ -222,6 +224,7 @@
+ #endif
+
+ if (link(pidfn,messfn) == -1) die(64);
++ if ((fd = open(messfn, O_RDONLY)) < 0 || fsync(fd) < 0 || close(fd) < 0) die(64);
+ if (unlink(pidfn) == -1) die(63);
+ flagmademess = 1;
+
+@@ -312,6 +315,8 @@
+ if (fsync(intdfd) == -1) die_write();
+
+ if (link(intdfn,todofn) == -1) die(66);
++ if ((fd = open(todofn, O_RDONLY)) < 0 ||
++ fsync(fd) < 0 || close(fd) < 0) die(66);
+
+ triggerpull();
+ return 0;
diff --git a/net-mail/qmail-ldap/files/tcp.pop3.sample b/net-mail/qmail-ldap/files/tcp.pop3.sample
new file mode 100644
index 000000000000..55df788cf074
--- /dev/null
+++ b/net-mail/qmail-ldap/files/tcp.pop3.sample
@@ -0,0 +1,6 @@
+# to update the database after changing this file, run:
+# tcprules /etc/tcprules.d/tcp.qmail-pop3.cdb /etc/tcprules.d/.tcp.qmail-pop3.tmp < /etc/tcprules.d/tcp.qmail-pop3
+# Allow any client to connect to us via POP3
+# If people are abusing POP3 such as denial-of-service on POP3,
+# you can add their ips here to block them out
+:allow
diff --git a/net-mail/qmail-ldap/files/tcp.qmqp.sample b/net-mail/qmail-ldap/files/tcp.qmqp.sample
new file mode 100644
index 000000000000..da21632c950e
--- /dev/null
+++ b/net-mail/qmail-ldap/files/tcp.qmqp.sample
@@ -0,0 +1,8 @@
+# to update the database after changing this file, run:
+# tcprules /etc/tcprules.d/tcp.qmail-qmqp.cdb /etc/tcprules.d/.tcp.qmail-qmqp.tmp < /etc/tcprules.d/tcp.qmail-qmqp
+# QMQP is a bulk protocol
+# and we don't want spam to ever come by it
+# and it is intended to go between a few servers only
+# so we don't trust any default people with it
+# see /etc/tcprules.d/tcp.qmail-smtp for more info
+:deny
diff --git a/net-mail/qmail-ldap/files/tcp.qmtp.sample b/net-mail/qmail-ldap/files/tcp.qmtp.sample
new file mode 100644
index 000000000000..d72ac985ac9f
--- /dev/null
+++ b/net-mail/qmail-ldap/files/tcp.qmtp.sample
@@ -0,0 +1,8 @@
+# to update the database after changing this file, run:
+# tcprules /etc/tcprules.d/tcp.qmail-qmtp.cdb /etc/tcprules.d/.tcp.qmail-qmtp.tmp < /etc/tcprules.d/tcp.qmail-qmtp
+# We trust QMTP connections just as SMTP by default
+# see /etc/tcprules.d/tcp.qmail-smtp for more info
+# allow relaying from localhost
+127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""
+# everybody else is not allowed to relay, and is subject to RBLSMTPD checks
+:allow
diff --git a/net-mail/qmail-ldap/files/tcp.smtp.sample b/net-mail/qmail-ldap/files/tcp.smtp.sample
new file mode 100644
index 000000000000..a8e8d7a75fca
--- /dev/null
+++ b/net-mail/qmail-ldap/files/tcp.smtp.sample
@@ -0,0 +1,83 @@
+# to update the database after changing this file, run:
+# tcprules /etc/tcprules.d/tcp.qmail-smtp.cdb /etc/tcprules.d/.tcp.qmail-smtp.tmp < /etc/tcprules.d/tcp.qmail-smtp
+#------------------------------------------------------
+# DESCRIPTION OF THE RULES TO REMIND ME OF HOW THIS FILE WORKS
+#
+# If you set 'allow', this means that our mail server will allow
+# the specified IP range to make a TCP connection to our server
+#
+# If you set 'deny', this means that our mail server will not allow
+# the specified IP range to make a TCP connection to our server
+#
+# If you set RELAYCLIENT="", this means that the listed IP range is
+# allowed to relay mail through our server
+#
+# If you dont set RELAYCLIENT="", this means that the listed IP range
+# will not be able to relay mail through our server
+#
+# If you set RBLSMTPD="", this means that the listed IP ranges will
+# not be checked against any of the RBL databases
+#
+# If you set RBLSMTPD="some text here", this means that an RBL lookup
+# wont be performed, but the mail will be rejected with the specified
+# text as a 4xx temp error message
+#
+# If you set RBLSMTPD="-some text here", this means that an RBL lookup
+# wont be performed, but the mail will be rejected with the specified
+# text as a 5xx perm error message
+#
+# If you do not set RBLSMTPD="" or ="some text", then an RBL lookup
+# will be performed. If the lookup is successful, then RBLSMTPD will
+# return your custom error message (as specified in the -r parameter
+# in smtpd supervise script)
+#
+#-----------------------------------------------------
+# HERE ARE THE RULES! :
+#-----------------------------------------------------
+# BYPASS OPEN RELAY CHECKING FOR THESE IPS :
+#
+# These IPs are ones that we have setup so that they arent RBL checked.
+# We have done this because these particular servers are RBL listed,
+# and for whatever reason they can't/won't fix their open relay problem,
+# and we still want to be able to receive mail from them.
+#
+# reminder text goes here for this entry so we know the story...
+#111.111.111.111:allow,RBLSMTPD=""
+# reminder text goes here for this entry so we know the story...
+#222.222.222.222:allow,RBLSMTPD=""
+#
+#-----------------------------------------------------------------
+# DONT ALLOW THESE IPS TO SEND MAIL TO US :
+#
+# mailXX.offermail.net connecting regularly and sending invalid
+# format messages causing exit with status 256 (bare linefeed normally)
+# entry added 15/12/2001
+# after looking at the mail coming from these servers it was found to be spam
+#216.242.75.100-116:allow,RBLSMTPD="-Connections from this IP have been banned."
+#
+# heaps of spam from replyto of *@freeamateurhotties.com dec2001
+#64.228.127.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com"
+#154.20.94.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com"
+#209.151.132.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com"
+#216.18.85.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com"
+#
+#-----------------------------------------------------------------
+# ALLOW THESE IPS TO RELAY MAIL THROUGH OUR SERVER
+#
+# Local class-c's from our LAN are allowed to relay,
+# and we wont bother doing any RBL checking.
+#123.123.123.:allow,RELAYCLIENT="",RBLSMTPD=""
+#123.111.111.:allow,RELAYCLIENT="",RBLSMTPD=""
+#
+# Connections from localhost are allowed to relay
+# (because the WebMail server runs on localhost),
+# and obviously there is no point trying to perform an RBL check.
+127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""
+#
+#-----------------------------------------------------------------
+# ALLOW EVERYONE ELSE TO SEND US MAIL
+#
+# Everyone else can make connections to our server,
+# but not allowed to relay
+# RBL lookups are performed
+:allow
diff --git a/net-mail/qmail-ldap/metadata.xml b/net-mail/qmail-ldap/metadata.xml
new file mode 100644
index 000000000000..bf483fd34fca
--- /dev/null
+++ b/net-mail/qmail-ldap/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-mail</herd>
+ <maintainer>
+ <email>sj7trunks@gentoo.org></email>
+ <description>qmail-ldap maintainer for the ldap stuff</description>
+ </maintainer>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ <description>maintainer for the standard qmail part</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-mail/qmail-ldap/qmail-ldap-1.03-r2.ebuild b/net-mail/qmail-ldap/qmail-ldap-1.03-r2.ebuild
new file mode 100644
index 000000000000..5c2e0239b39a
--- /dev/null
+++ b/net-mail/qmail-ldap/qmail-ldap-1.03-r2.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/qmail-ldap-1.03-r2.ebuild,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+IUSE="ssl"
+
+inherit eutils
+
+S=${WORKDIR}/qmail-${PV}
+
+DESCRIPTION="A modern replacement for sendmail which uses maildirs"
+HOMEPAGE="http://www.qmail.org/
+ http://www.jedi.claranet.fr/qmail-tuning.html
+ http://iain.cx/unix/qmail/mysql.php
+ http://www.nrg4u.com/"
+SRC_URI="mirror://qmail/qmail-1.03.tar.gz
+ http://www.suspectclass.com/~sgifford/qmail/qmail-0.0.0.0.patch
+ http://david.acz.org/software/sendmail-flagf.patch
+ http://www.nrg4u.com/qmail/qmail-ldap-1.03-20040101.patch.gz
+ mirror://gentoo/${P}-r2-tls.patch.bz2"
+
+DEPEND="virtual/glibc
+ net-nds/openldap
+ sys-apps/groff
+ >=sys-apps/ucspi-tcp-0.88
+ >=net-mail/checkpassword-0.90
+ >=net-nds/openldap-2.0.25-r2
+ ssl? ( >=dev-libs/openssl-0.9.6e )"
+
+RDEPEND="!virtual/mta
+ virtual/glibc
+ sys-apps/groff
+ >=net-nds/openldap-2.0.25-r2
+ >=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 "
+
+src_unpack() {
+
+ unpack qmail-1.03.tar.gz
+
+ unpack qmail-ldap-1.03-20040101.patch.gz
+
+ cd ${S}
+
+ #main ldap patch
+ #includes : qmail-queue patch | big todo | errno
+ #qmail-103.patch | qmail-local-tabs.patch | big-concurrency.patch
+ epatch ${WORKDIR}/qmail-ldap-1.03-20040101.patch || die "ldap patch failed"
+
+ #define 0.0.0.0 as local system/network
+ epatch ${DISTDIR}/qmail-0.0.0.0.patch || die "0.0.0.0 patch did not apply"
+
+ #FIXNE
+ # AUTOHOME DIR MAKE AND FEATURES PATCH
+ epatch ${FILESDIR}/gentoo.patch || die "Homedir patch did not apply"
+
+ # Account for Linux filesystems lack of a synchronus link()
+ epatch ${FILESDIR}/qmail-link-sync-gentoo.patch
+
+ # make the qmail 'sendmail' binary behave like sendmail's for -f
+ epatch ${DISTDIR}/sendmail-flagf.patch
+
+ # This will make the emails headers be written in localtime rather than GMT
+ # If you really want, uncomment it yourself, as mail really should be in GMT
+ #epatch ${DISTDIR}/qmail-date-localtime.patch.txt
+
+ if [ `use ssl` ]; then
+ epatch ${DISTDIR}/${P}-r2-tls.patch.bz2 || die "tls+auth patch failed"
+ fi
+
+ echo "gcc ${CFLAGS}" > conf-cc
+ echo "gcc" > conf-ld
+ echo "500" > conf-spawn
+
+}
+
+src_compile() {
+
+ cd ${S}
+ emake it man ldap|| 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
+
+ keepdir /var/qmail/users
+
+ 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 ${FILESDIR}/${PV}-${PR}/samples.ldif
+ dodoc FAQ UPGRADE SENDMAIL INSTALL* TEST* REMOVE* PIC* SECURITY
+ dodoc SYSDEPS TARGETS THANKS THOUGHTS TODO VERSION
+
+ 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 auth_imap auth_pop \
+ auth_smtp dirmaker qmail-ldaplookup qmail-todo
+
+ into /usr
+ for i in *.1 *.5 *.8
+ do
+ doman $i
+ done
+
+ 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}/dot_qmail .qmail
+ fperms 644 /etc/skel/.qmail
+ insinto /root
+ ${D}/var/qmail/bin/maildirmake ${D}/root/.maildir
+ newins ${FILESDIR}/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
+ dodir /var/qmail/supervise/qmail-pop3d
+ dodir /var/qmail/supervise/qmail-pop3d/log
+ chmod +t ${D}/var/qmail/supervise/qmail-send
+ chmod +t ${D}/var/qmail/supervise/qmail-smtpd
+ chmod +t ${D}/var/qmail/supervise/qmail-pop3d
+ diropts -m 755 -o qmaill
+ keepdir /var/log/qmail /var/log/qmail/qmail-send /var/log/qmail/qmail-smtpd /var/log/qmail/qmail-pop3d
+
+ insinto /var/qmail/supervise/qmail-send
+ newins ${FILESDIR}/supervise/run-qmailsend run
+ insinto /var/qmail/supervise/qmail-send/log
+ newins ${FILESDIR}/supervise/run-qmailsendlog run
+ insinto /var/qmail/supervise/qmail-smtpd
+ newins ${FILESDIR}/supervise/run-qmailsmtpd run
+ insinto /var/qmail/supervise/qmail-smtpd/log
+ newins ${FILESDIR}/supervise/run-qmailsmtpdlog run
+ insinto /var/qmail/supervise/qmail-pop3d
+ newins ${FILESDIR}/supervise/run-qmailpop3d run
+ insinto /var/qmail/supervise/qmail-pop3d/log
+ newins ${FILESDIR}/supervise/run-qmailpop3dlog run
+
+ einfo "Installing the qmail control file ..."
+ exeinto /var/qmail/bin
+ doexe ${FILESDIR}/qmail-control
+
+ einfo "Installing the qmail startup file ..."
+ insinto /var/qmail
+ doins ${FILESDIR}/rc \
+
+ einfo "Installing the qmail configuration file ..."
+ insinto /var/qmail/control
+ insopts -o root -g root -m 644
+ doins ${FILESDIR}/control/defaultdomain \
+ ${FILESDIR}/control/defaulthost \
+ ${FILESDIR}/control/dirmaker \
+ ${FILESDIR}/control/ldapbasedn \
+ ${FILESDIR}/control/ldapgid \
+ ${FILESDIR}/control/ldaplocaldelivery \
+ ${FILESDIR}/control/ldaplogin \
+ ${FILESDIR}/control/ldapmessagestore \
+ ${FILESDIR}/control/ldapserver \
+ ${FILESDIR}/control/ldapuid \
+ ${FILESDIR}/control/qmail-pop3d-loglevel \
+ ${FILESDIR}/control/qmail-pop3d-softlimit \
+ ${FILESDIR}/control/qmail-smtpd-softlimit \
+ ${FILESDIR}/control/qmail-start-loglevel
+
+ insopts -o qmaild -g root -m 600
+ insinto /var/qmail/control
+ doins ${FILESDIR}/control/ldappassword
+
+ einfo "Installing the qmail.schema ..."
+ insinto /etc/openldap/schema
+ doins qmail.schema
+}
+
+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
+
+ if [ ! -p ${ROOT}/var/qmail/queue/lock/trigger ] ; then
+ mkfifo ${ROOT}/var/qmail/queue/lock/trigger
+ chmod 622 ${ROOT}/var/qmail/queue/lock/trigger
+ chown qmails:qmail ${ROOT}/var/qmail/queue/lock/trigger
+ fi
+
+ if [ `getent passwd ldapauth | cut -d: -f1` != ldapauth ]; then
+ useradd -g ldapauth -d /var/qmail/maildirs -s /bin/true -u 11184 ldapauth
+ fi
+
+ if [ `getent group ldapauth | cut -d: -f1` != ldapauth ]; then
+ groupadd ldapauth &>/dev/null
+ fi
+
+ 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"
+ echo -e "\e[32;01m ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d \033[0m"
+ echo -e ""
+ echo -e "\e[32;01m NOTE: Please check your /var/qmail/control/ldap* files to match your local \033[0m"
+ echo -e "\e[32;01m ldap settings and add the qmail.schema along with \"allow bind_v2\" to your \033[0m"
+ echo -e "\e[32;01m slapd.conf. For sample ldifs, please check \033[0m"
+ echo -e "\e[32;01m /usr/share/doc/${PN}-${PV}-${PR}/samples.ldif.gz \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=\"\",RBLSMTPD=\"\"" >> /etc/tcp.smtp
+ done
+ echo "127.0.0.1:allow,RELAYCLIENT=\"\",RBLSMTPD=\"\"" >> /etc/tcp.smtp
+
+ tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
+
+}
diff --git a/net-mail/qmail-ldap/qmail-ldap-1.03-r3.ebuild b/net-mail/qmail-ldap/qmail-ldap-1.03-r3.ebuild
new file mode 100644
index 000000000000..0d9b4a1a2add
--- /dev/null
+++ b/net-mail/qmail-ldap/qmail-ldap-1.03-r3.ebuild
@@ -0,0 +1,356 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-ldap/qmail-ldap-1.03-r3.ebuild,v 1.1 2004/01/11 07:08:52 robbat2 Exp $
+
+IUSE="ssl"
+
+inherit eutils
+
+S=${WORKDIR}/qmail-${PV}
+
+DESCRIPTION="A modern replacement for sendmail which uses maildirs"
+HOMEPAGE="http://www.qmail.org/
+ http://www.jedi.claranet.fr/qmail-tuning.html
+ http://iain.cx/unix/qmail/mysql.php
+ http://www.nrg4u.com/"
+SRC_URI="mirror://qmail/qmail-${PV}.tar.gz
+ http://www.suspectclass.com/~sgifford/qmail/qmail-0.0.0.0.patch
+ http://david.acz.org/software/sendmail-flagf.patch
+ http://www.nrg4u.com/qmail/qmail-ldap-1.03-20040101.patch.gz"
+
+DEPEND="virtual/glibc
+ sys-apps/groff
+ >=net-nds/openldap-2.0.25-r2
+ >=sys-apps/ucspi-tcp-0.88
+ >=net-mail/checkpassword-0.90
+ ssl? ( >=dev-libs/openssl-0.9.6e )"
+
+RDEPEND="!virtual/mta
+ ${DEPEND}
+ >=sys-apps/daemontools-0.76-r1
+ >=net-mail/dot-forward-0.71"
+
+PROVIDE="virtual/mta
+ virtual/mda"
+
+SLOT="0"
+LICENSE="as-is"
+KEYWORDS="~x86 ~ppc ~sparc "
+
+src_unpack() {
+ unpack qmail-1.03.tar.gz
+ unpack qmail-ldap-1.03-20040101.patch.gz
+
+ cd ${S}
+
+ #main ldap patch
+ #includes : qmail-queue patch | big todo | errno
+ #qmail-103.patch | qmail-local-tabs.patch | big-concurrency.patch
+ epatch ${WORKDIR}/qmail-ldap-1.03-20040101.patch || die "ldap patch failed"
+
+ #define 0.0.0.0 as local system/network
+ epatch ${DISTDIR}/qmail-0.0.0.0.patch || die "0.0.0.0 patch did not apply"
+
+ #FIXNE
+ # AUTOHOME DIR MAKE AND FEATURES PATCH
+ epatch ${FILESDIR}/gentoo.patch || die "Homedir patch did not apply"
+
+ # Account for Linux filesystems lack of a synchronus link()
+ epatch ${FILESDIR}/qmail-link-sync-gentoo.patch
+
+ # make the qmail 'sendmail' binary behave like sendmail's for -f
+ epatch ${DISTDIR}/sendmail-flagf.patch
+
+ # This will make the emails headers be written in localtime rather than GMT
+ # If you really want, uncomment it yourself, as mail really should be in GMT
+ #epatch ${DISTDIR}/qmail-date-localtime.patch.txt
+
+ if use ssl; then
+ epatch ${DISTDIR}/${P}-r2-tls.patch.bz2 || die "tls+auth patch failed";
+ fi
+
+ echo -n "${CC} ${CFLAGS}" >${S}/conf-cc
+ echo -n "${CC} ${LDFLAGS}" > ${S}/conf-ld
+ echo "500" > conf-spawn
+
+}
+
+src_compile() {
+ cd ${S}
+ emake it man ldap|| 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
+
+ keepdir /var/qmail/users
+
+ 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 ${FILESDIR}/1.03-r2/samples.ldif
+ dodoc FAQ UPGRADE SENDMAIL INSTALL* TEST* REMOVE* PIC* SECURITY
+ dodoc SYSDEPS TARGETS THANKS THOUGHTS TODO VERSION
+
+ 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 auth_imap auth_pop \
+ auth_smtp dirmaker qmail-ldaplookup qmail-todo
+
+ into /usr
+ for i in *.1 *.5 *.8
+ do
+ doman $i
+ done
+
+ 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
+ ${MAILDIRMAKE} ${D}/var/qmail/alias/.maildir
+ # for good measure
+ keepdir /var/qmail/alias/.maildir/{cur,new,tmp}
+
+ for i in mailer-daemon postmaster root
+ do
+ if [ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]; then
+ touch ${D}/var/qmail/alias/.qmail-${i}
+ fowners alias:qmail /var/qmail/alias/.qmail-${i}
+ fi
+ done
+
+ einfo "Setting up maildirs by default in the account skeleton ..."
+ diropts -m 755 -o root -g root
+ insinto /etc/skel
+ newins ${FILESDIR}/${PV}-${PR}/dot_qmail .qmail.sample
+ fperms 644 /etc/skel/.qmail.sample
+ ${MAILDIRMAKE} ${D}/etc/skel/.maildir
+ # for good measure
+ keepdir /etc/skel/.maildir/{cur,new,tmp}
+
+ einfo "Setting up all services (send, smtp, qmtp, qmqp, pop3) ..."
+ insopts -o root -g root -m 755
+ diropts -m 755 -o root -g root
+ dodir /var/qmail/supervise
+
+ for i in send smtpd qmtpd qmqpd pop3d; do
+ insopts -o root -g root -m 755
+ diropts -m 755 -o root -g root
+ dodir /var/qmail/supervise/qmail-${i}{,/log}
+ diropts -m 755 -o qmaill
+ keepdir /var/log/qmail/qmail-${i}
+ fperms +t /var/qmail/supervise/qmail-${i}{,/log}
+ insinto /var/qmail/supervise/qmail-${i}
+ newins ${FILESDIR}/${PV}-${PR}/run-qmail${i} run
+ insinto /var/qmail/supervise/qmail-${i}/log
+ newins ${FILESDIR}/${PV}-${PR}/run-qmail${i}log run
+ insinto /etc
+ done
+
+ for i in smtp qmtp qmqp pop3; do
+ if [ -f ${FILESDIR}/tcp.${i}.sample ]; then
+ newins ${FILESDIR}/tcp.${i}.sample /etc/tcp.${i}
+ fi
+ if [ -f ${D}/etc/tcp.${i} ]; then
+ tcprules ${D}/etc/tcp.${i}.cdb ${D}/etc/.tcp.${i}.tmp \
+ < ${D}/etc/tcp.${i}
+ fi
+ done
+
+ einfo "Installing the qmail control file ..."
+ exeinto /var/qmail/bin
+ doexe ${FILESDIR}/qmail-control
+
+ einfo "Installing the qmail startup file ..."
+ insinto /var/qmail
+ doins ${FILESDIR}/rc \
+
+ einfo "Installing the qmail configuration file ..."
+ insinto /var/qmail/control
+ insopts -o root -g root -m 644
+ doins ${FILESDIR}/control/defaultdomain \
+ ${FILESDIR}/control/defaulthost \
+ ${FILESDIR}/control/dirmaker \
+ ${FILESDIR}/control/ldapbasedn \
+ ${FILESDIR}/control/ldapgid \
+ ${FILESDIR}/control/ldaplocaldelivery \
+ ${FILESDIR}/control/ldaplogin \
+ ${FILESDIR}/control/ldapmessagestore \
+ ${FILESDIR}/control/ldapserver \
+ ${FILESDIR}/control/ldapuid \
+ ${FILESDIR}/control/qmail-pop3d-loglevel \
+ ${FILESDIR}/control/qmail-pop3d-softlimit \
+ ${FILESDIR}/control/qmail-smtpd-softlimit \
+ ${FILESDIR}/control/qmail-start-loglevel
+
+ insopts -o qmaild -g root -m 600
+ insinto /var/qmail/control
+ doins ${FILESDIR}/control/ldappassword
+
+ einfo "Installing the qmail.schema ..."
+ insinto /etc/openldap/schema
+ doins qmail.schema
+
+ einfo "Insalling some stock configuration files"
+ insinto /var/qmail/control
+ insopts -o root -g root -m 644
+ doins ${FILESDIR}/${PV}-${PR}/conf-*
+ newins ${FILESDIR}/${PV}-${PR}/dot_qmail defaultdelivery
+ use ssl && doins ${FILESDIR}/${PV}-${PR}/servercert.cnf
+
+ einfo "Configuration sanity checker"
+ into /var/qmail
+ insopts -o root -g root -m 644
+ dobin ${FILESDIR}/${PV}-${PR}/config-sanity-check
+
+ if use ssl; then
+ einfo "SSL Certificate creation script"
+ dobin ${FILESDIR}/${PV}-${PR}/mkservercert
+ einfo "RSA key generation cronjob"
+ insinto /etc/cron.daily
+ doins ${FILESDIR}/${PV}-${PR}/qmail-genrsacert.sh
+ chmod +x ${D}/etc/cron.daily/qmail-genrsacert.sh
+ fi
+}
+
+rootmailfixup() {
+ # so you can check mail as root easily
+ local TMPCMD="ln -sf /var/qmail/alias/.maildir/ ${ROOT}/root/.maildir"
+ if [ -d "${ROOT}/root/.maildir" ] && [ ! -L "${ROOT}/root/.maildir" ] ; then
+ einfo "Previously the qmail ebuilds created /root/.maildir/ but not"
+ einfo "mail was every delivered there. If the directory does not"
+ einfo "contain any mail, please delete it and run:"
+ einfo "${TMPCMD}"
+ else
+ ${TMPCMD}
+ fi
+ chown -R alias:qmail ${ROOT}/var/qmail/alias/.maildir 2>/dev/null
+}
+
+buildtcprules() {
+ for i in smtp qmtp qmqp pop3; do
+ # please note that we don't check if it exists
+ # as we want it to make the cdb files anyway!
+ cat ${ROOT}etc/tcp.${i} 2>/dev/null | tcprules ${ROOT}etc/tcp.${i}.cdb ${ROOT}etc/.tcp.${i}.tmp
+ done
+}
+
+
+pkg_postinst() {
+ einfo "Setting up the message queue hierarchy ..."
+ # queue-fix makes life easy!
+ /var/qmail/bin/queue-fix ${ROOT}/var/qmail/queue >/dev/null
+
+ rootmailfixup
+ buildtcprules
+
+ # for good measure
+ env-update
+
+ if [ `getent passwd ldapauth | cut -d: -f1` != ldapauth ]; then
+ useradd -g ldapauth -d /var/qmail/maildirs -s /bin/true -u 11184 ldapauth
+ fi
+
+ if [ `getent group ldapauth | cut -d: -f1` != ldapauth ]; then
+ groupadd ldapauth &>/dev/null
+ fi
+
+ einfo "Please do not forget to run, the following syntax :"
+ einfo "ebuild /var/db/pkg/${CATEGORY}/${PN}-${PV}-${PR}/${PN}-${PV}-${PR}.ebuild config "
+ einfo "This will setup qmail to run out-of-the-box on your system including SSL. "
+ echo
+ einfo "To start qmail at boot you have to enable the /etc/init.d/svscan rc file "
+ einfo "and create the following links : "
+ einfo "ln -s /var/qmail/supervise/qmail-send /service/qmail-send "
+ einfo "ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd "
+ einfo "ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d "
+ echo
+ einfo "NOTE: Please check your /var/qmail/control/ldap* files to match your local "
+ einfo "ldap settings and add the qmail.schema along with \"allow bind_v2\" to your "
+ einfo "slapd.conf. For sample ldifs, please check "
+ einfo "/usr/share/doc/${PN}-${PV}-${PR}/samples.ldif.gz "
+
+
+}
+
+pkg_config() {
+
+ # avoid some weird locale problems
+ export LC_ALL="C"
+
+ if [ ${ROOT} = "/" ] ; then
+ if [ ! -f ${ROOT}var/qmail/control/me ] ; then
+ export qhost=`hostname --fqdn`
+ ${ROOT}var/qmail/bin/config-fast $qhost
+ fi
+ else
+ ewarn "Skipping some configuration as it MUST be run on the final host"
+ fi
+
+ einfo "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`
+ TCPSTRING=":allow,RELAYCLIENT=\"\",RBLSMTPD=\"\""
+ for ip in $LOCALIPS; do
+ myline="${ip}${TCPSTRING}"
+ for proto in smtp qmtp qmqp; do
+ f="${ROOT}etc/tcp.${proto}"
+ egrep -q "${myline}" ${f} || echo "${myline}" >>${f}
+ done
+ done
+
+ buildtcprules
+
+ if use ssl; then
+ ${ROOT}etc/cron.daily/qmail-genrsacert.sh
+ einfo "Creating a self-signed ssl-certificate:"
+ /var/qmail/bin/mkservercert
+ einfo "If you want to have a properly signed certificate "
+ einfo "instead, do the following:"
+ einfo "openssl req -new -nodes -out req.pem \\"
+ einfo "-config /var/qmail/control/servercert.cnf \\"
+ einfo "-keyout /var/qmail/control/servercert.pem"
+ einfo "Send req.pem to your CA to obtain signed_req.pem, and do:"
+ einfo "cat signed_req.pem >> /var/qmail/control/servercert.pem"
+ fi
+}