summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hanselmann <hansmi@gentoo.org>2006-02-12 18:42:33 +0000
committerMichael Hanselmann <hansmi@gentoo.org>2006-02-12 18:42:33 +0000
commit50cb6d5381b780bae789e27f56428c054a089f36 (patch)
tree2f86931ed86c4499ecde2baca1328f9e41c3f758 /mail-mta
parentUupps, forgot comment. (diff)
downloadgentoo-2-50cb6d5381b780bae789e27f56428c054a089f36.tar.gz
gentoo-2-50cb6d5381b780bae789e27f56428c054a089f36.tar.bz2
gentoo-2-50cb6d5381b780bae789e27f56428c054a089f36.zip
New ebuild, partially based on the qmail ebuild.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/netqmail/ChangeLog19
-rw-r--r--mail-mta/netqmail/Manifest81
-rw-r--r--mail-mta/netqmail/files/99qmail4
-rw-r--r--mail-mta/netqmail/files/conf-common67
-rw-r--r--mail-mta/netqmail/files/conf-pop3d29
-rw-r--r--mail-mta/netqmail/files/conf-qmqpd15
-rw-r--r--mail-mta/netqmail/files/conf-qmtpd18
-rw-r--r--mail-mta/netqmail/files/conf-send6
-rw-r--r--mail-mta/netqmail/files/conf-smtpd51
-rw-r--r--mail-mta/netqmail/files/digest-netqmail-1.059
-rw-r--r--mail-mta/netqmail/files/dot-qmail3
-rw-r--r--mail-mta/netqmail/files/mkservercert55
-rw-r--r--mail-mta/netqmail/files/qmail-config-system72
-rw-r--r--mail-mta/netqmail/files/qmail-genrsacert.sh44
-rw-r--r--mail-mta/netqmail/files/run-qmail-pop3d19
-rw-r--r--mail-mta/netqmail/files/run-qmail-pop3d-log7
-rw-r--r--mail-mta/netqmail/files/run-qmail-qmqpd18
-rw-r--r--mail-mta/netqmail/files/run-qmail-qmqpd-log7
-rw-r--r--mail-mta/netqmail/files/run-qmail-qmtpd18
-rw-r--r--mail-mta/netqmail/files/run-qmail-qmtpd-log7
-rw-r--r--mail-mta/netqmail/files/run-qmail-send6
-rw-r--r--mail-mta/netqmail/files/run-qmail-send-log7
-rw-r--r--mail-mta/netqmail/files/run-qmail-smtpd18
-rw-r--r--mail-mta/netqmail/files/run-qmail-smtpd-log7
-rw-r--r--mail-mta/netqmail/files/servercert.cnf35
-rw-r--r--mail-mta/netqmail/files/tcp.pop3.sample12
-rw-r--r--mail-mta/netqmail/files/tcp.qmqp.sample14
-rw-r--r--mail-mta/netqmail/files/tcp.qmtp.sample23
-rw-r--r--mail-mta/netqmail/files/tcp.smtp.sample79
-rw-r--r--mail-mta/netqmail/metadata.xml9
-rw-r--r--mail-mta/netqmail/netqmail-1.05.ebuild427
31 files changed, 1186 insertions, 0 deletions
diff --git a/mail-mta/netqmail/ChangeLog b/mail-mta/netqmail/ChangeLog
new file mode 100644
index 000000000000..63a166551e23
--- /dev/null
+++ b/mail-mta/netqmail/ChangeLog
@@ -0,0 +1,19 @@
+# ChangeLog for mail-mta/netqmail
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/ChangeLog,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+*netqmail-1.05 (12 Feb 2006)
+
+ 12 Feb 2006; Michael Hanselmann <hansmi@gentoo.org> +files/99qmail,
+ +files/conf-common, +files/conf-pop3d, +files/conf-qmqpd,
+ +files/conf-qmtpd, +files/conf-send, +files/conf-smtpd, +files/dot-qmail,
+ +files/mkservercert, +files/qmail-config-system,
+ +files/qmail-genrsacert.sh, +files/run-qmail-pop3d,
+ +files/run-qmail-pop3d-log, +files/run-qmail-qmqpd,
+ +files/run-qmail-qmqpd-log, +files/run-qmail-qmtpd,
+ +files/run-qmail-qmtpd-log, +files/run-qmail-send,
+ +files/run-qmail-send-log, +files/run-qmail-smtpd,
+ +files/run-qmail-smtpd-log, +files/servercert.cnf, +files/tcp.pop3.sample,
+ +files/tcp.qmqp.sample, +files/tcp.qmtp.sample, +files/tcp.smtp.sample,
+ +metadata.xml, +netqmail-1.05.ebuild:
+ New ebuild, partially based on the qmail ebuild.
diff --git a/mail-mta/netqmail/Manifest b/mail-mta/netqmail/Manifest
new file mode 100644
index 000000000000..a2a093642204
--- /dev/null
+++ b/mail-mta/netqmail/Manifest
@@ -0,0 +1,81 @@
+MD5 020bef44264d3859daf0d13364b15925 .netqmail-1.05.ebuild.swp 24576
+RMD160 73069f566eebad34cb9ec2f85434cf9c2d9ed21e .netqmail-1.05.ebuild.swp 24576
+SHA256 3cfc9e1501f0d5ca2c2b6c042189c0d56ae461f79cf55437c0d08cbdb8ee7871 .netqmail-1.05.ebuild.swp 24576
+MD5 180a513f34e3f00abc609672a190072c files/99qmail 137
+RMD160 bb1d8b76562c60df05b1e10811d479ca24fdad48 files/99qmail 137
+SHA256 b721c405ab3a13803c4647b98a3c0ffbdfb450e4a0f9e5476c1633470b0d6e50 files/99qmail 137
+MD5 6efa3f0fc92f971baa41b2905dc55aac files/conf-common 2278
+RMD160 bea10abbca5e9c3c4daad4cdd138057f3b5f7246 files/conf-common 2278
+SHA256 3e9abbfdf81bfce8bb15895085430aba88692f4838a24ec0c6e06750ecd9c6b0 files/conf-common 2278
+MD5 ae967da8c38fde8f69960392f89e262f files/conf-pop3d 1207
+RMD160 c366cb704d02a6a240d67a26355a51efaab9c081 files/conf-pop3d 1207
+SHA256 2fdfac3f449386f06c0d9ede66876e7490374c5820a337cee123f618a6ad3b9a files/conf-pop3d 1207
+MD5 52892cdf994815c6767ffbafc49df454 files/conf-qmqpd 465
+RMD160 3a767d2c04fb91f7ebcbdc2bfba0521d1b6572a2 files/conf-qmqpd 465
+SHA256 03f56e929548f3fc2fbe8d3a521dd2208088c65bbd2a02fd923ad34ea46ca915 files/conf-qmqpd 465
+MD5 9e5d2ac8b47e094d63eb620f5067446f files/conf-qmtpd 557
+RMD160 5ed9416ecd3bbea3a92418c76995b16a7aceab06 files/conf-qmtpd 557
+SHA256 8789371ecadcbc56e9be18ce0fa65987b2a01ce1f142ebeab8eac12b596bcc53 files/conf-qmtpd 557
+MD5 836c401d53b4f1d40872dcb3c3ccbd46 files/conf-send 235
+RMD160 11c7d23519166a16b082743c1fea7d4fcad7bb40 files/conf-send 235
+SHA256 e403511220b5993efe4f1f1148632b4613964eedf475ed5f746f846e01f0c1d2 files/conf-send 235
+MD5 67846eb34b070a0260353900b2d6a669 files/conf-smtpd 1973
+RMD160 6fe70e3ea72738f2bd9306e503b2530b33fbd6cc files/conf-smtpd 1973
+SHA256 32b22aebb7b30ae7681ded53d5d6492bf4a98c0eaa8875bb3fea93a19cfe4641 files/conf-smtpd 1973
+MD5 7cd919a248a3d8fd86f94679b49b99e3 files/digest-netqmail-1.05 774
+RMD160 c115f81337aee175cbe0304bc9924bdc95671b79 files/digest-netqmail-1.05 774
+SHA256 fb4c8526ef405355312ceb2f40c7069aff1d78c91d5d600bb92fbc94c6a97474 files/digest-netqmail-1.05 774
+MD5 c369664bce0646b3d323d08f9ba5b8ce files/dot-qmail 82
+RMD160 0576de46f687b2c9041fd48948a050ae82f2242e files/dot-qmail 82
+SHA256 ceed2e098092a550d66778241149439871f5518ff2c71dc53ce05308b1a63a06 files/dot-qmail 82
+MD5 0a8b1b730dcdf841c6d8ece2b1bb8a20 files/qmail-config-system 1980
+RMD160 aca33753713a77b14b2744368bffcdd8e712b362 files/qmail-config-system 1980
+SHA256 21853f9e4daaab236e62f53367cf4d0ec6c51e8ca47ac5f825c171e5e6e0159a files/qmail-config-system 1980
+MD5 4f3ca023cdddd1126f884a15253cde6d files/run-qmail-pop3d 808
+RMD160 7f14eed095143b488c479a535a7241519db9ba76 files/run-qmail-pop3d 808
+SHA256 18a9c799f2e2ceecce658ac8458a736ed0597413f8fb3f980d7c5931556852e1 files/run-qmail-pop3d 808
+MD5 120eca1f3001d7fb599d5684986cbf8f files/run-qmail-pop3d-log 217
+RMD160 90eb98ad5762573672e06a96217e9517dcf4d21c files/run-qmail-pop3d-log 217
+SHA256 b3144e6d75ac3c3f049d3b0b2a6d25c843569da5656fbdf661f37b0ab9180911 files/run-qmail-pop3d-log 217
+MD5 6d21e9e9c635df16ce9724efc88694ba files/run-qmail-qmqpd 738
+RMD160 4f3bc1da570b4117ee158219e0a71671e8eef59f files/run-qmail-qmqpd 738
+SHA256 83cddeeb6a0d11913b7338a130ae8ccd5ec54f3173922a27f9d3ebf32dc11fce files/run-qmail-qmqpd 738
+MD5 e2f8fc2be907c420cac5dda1cd628d26 files/run-qmail-qmqpd-log 217
+RMD160 6a55a428082b8603c22f95dd800414476a96ce15 files/run-qmail-qmqpd-log 217
+SHA256 f478deee95d3c0f8311ddbc023abdb4543aaf8358380be987e0de212e43dc878 files/run-qmail-qmqpd-log 217
+MD5 79602604a47bcc11b5aac2b3622b7ab9 files/run-qmail-qmtpd 738
+RMD160 9f91cff45e55cb00df6d71b99ca8a045d6011c27 files/run-qmail-qmtpd 738
+SHA256 a08efbbb95ece23b9721ee047dc689645f51ef507698a72a2f7e7e235c1f29af files/run-qmail-qmtpd 738
+MD5 3fe644e0189d0d01f6b5484bf8cbfe6b files/run-qmail-qmtpd-log 217
+RMD160 22918f838ddf345d903f18aa0210402118182055 files/run-qmail-qmtpd-log 217
+SHA256 43ec3cd8c30d48b5e2828053e64376d3ae7e41ef572644df8381a414974aacdc files/run-qmail-qmtpd-log 217
+MD5 04cc647eca692b584b5e1b41a62cb2a0 files/run-qmail-send 167
+RMD160 73ec541ce4c3a122c07d6a923d8c5a1dc38bcbc2 files/run-qmail-send 167
+SHA256 9ae1c0eee074da85b78d1dbe9eafcc29364170fcc4036a9d0eb2488841e06fa4 files/run-qmail-send 167
+MD5 2fac730d1783fbf995ef00d28359d7f5 files/run-qmail-send-log 217
+RMD160 f3b47d34cd67057b82bacbdf5d8fd100ad89a8bb files/run-qmail-send-log 217
+SHA256 a59a794052180bfd91d5e2d65637e531b8168c6bb1fd323ae5d3c7ef695baec1 files/run-qmail-send-log 217
+MD5 af5f3a19afd82e01b2e846b364a6700f files/run-qmail-smtpd 738
+RMD160 80138f491766d19bcd8b403e0c039c925fa48399 files/run-qmail-smtpd 738
+SHA256 6b0ccfea16f7c1fb355dae0bd6a851558773d1b77b77e94c226ff36e8008fc5c files/run-qmail-smtpd 738
+MD5 2a68a3ec17bcbb82030dfd22b2eda415 files/run-qmail-smtpd-log 217
+RMD160 4bb62d79b6b4cfa2dbcd42a4dba1e9b2093a867f files/run-qmail-smtpd-log 217
+SHA256 3b70f551dc005ef305add91ab3d5456f94566573c21918b142b1d630b9959f19 files/run-qmail-smtpd-log 217
+MD5 eefc5d5da652403ad8bc900ec8d1c1a1 files/tcp.pop3.sample 517
+RMD160 a518f0ac6c03a546ae032613d6aef6a298290419 files/tcp.pop3.sample 517
+SHA256 3f04ad47c10e7466ea9bd18b38bd809066734fb9616858bf75bb95e18e28253c files/tcp.pop3.sample 517
+MD5 1b6de3a03925b8036ad711249c281ad9 files/tcp.qmqp.sample 571
+RMD160 1c8b66938e2d803a3d302f53e8046cc754153d49 files/tcp.qmqp.sample 571
+SHA256 17dc778b0ad88b42f3f15f2bc94d3448b65bd5f436c5f21a92d0012be827cecc files/tcp.qmqp.sample 571
+MD5 236eb15657100fcae1828d2ab834971d files/tcp.qmtp.sample 997
+RMD160 f50e35d5f6b3cfb2e13891dfeb4d3930276e2c05 files/tcp.qmtp.sample 997
+SHA256 1c6ab973b069b5e0d14246affad8d46760cd379272e2ce470b5673029ddd8ab4 files/tcp.qmtp.sample 997
+MD5 ab8e1f0ae6b685ef461847c8c4a15a94 files/tcp.smtp.sample 3585
+RMD160 9f6e1d529e40a1ba06e8eb5e85135321334627c0 files/tcp.smtp.sample 3585
+SHA256 4f6e2ccfef548c2bfee249299335fa9c9b47e06be84eb8bb8ba564b45868c9ad files/tcp.smtp.sample 3585
+MD5 1f12f659d2cf9550971387cb78c2f0af metadata.xml 278
+RMD160 be877359df23e815e5acd94ecc97df2560671fa7 metadata.xml 278
+SHA256 0d8d56eeab2c34a34acb9f558c9198d843e4666bdbe061f6ec87ab4396a75d2a metadata.xml 278
+MD5 b871b01bb7b3776320076ceed951791a netqmail-1.05.ebuild 10522
+RMD160 d94c813308d4ecdf14d5381e5212763f8a346401 netqmail-1.05.ebuild 10522
+SHA256 22972a65c4c11d7bb5e47dc34c72dc12e8d0bd69aef5cffe6ac282d8eb2c956e netqmail-1.05.ebuild 10522
diff --git a/mail-mta/netqmail/files/99qmail b/mail-mta/netqmail/files/99qmail
new file mode 100644
index 000000000000..d9d929e4892b
--- /dev/null
+++ b/mail-mta/netqmail/files/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/mail-mta/netqmail/files/conf-common b/mail-mta/netqmail/files/conf-common
new file mode 100644
index 000000000000..613193cc9773
--- /dev/null
+++ b/mail-mta/netqmail/files/conf-common
@@ -0,0 +1,67 @@
+#!/bin/bash
+# Common Configuration file for all qmail daemons
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/conf-common,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+# Qmail User IDS to run daemons as
+QMAILDUID=$(id -u qmaild)
+NOFILESGID=$(id -g qmaild)
+QMAILLUID=$(id -u qmaill)
+
+# 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"
+
+# This tells tcpserver where to file the rules cdb file
+[[ -d /etc/tcprules.d/ ]] && \
+ TCPSERVER_RULESCDB=/etc/tcprules.d/tcp.qmail-${SERVICE}.cdb
+[[ ! -f "${TCPSERVER_RULESCDB}" ]] && \
+ TCPSERVER_RULESCDB=/etc/tcp.${SERVICE}.cdb
+
+# 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 16000000"
+
+# We don't have anything to set QMAILQUEUE to at the moment, so we leave it
+# alone. Generally it is best to add this in your appropriate (usually SMTP)
+# cdb files at /etc/tcprules.d/tcp.qmail-*.cdb instead of on a global basis, as
+# otherwise outgoing mail will be checked (because qmail-queue is used for most
+# parts of qmail). You can also enable this per-server by just placing it into
+# the other configuration files by placing the line there instead. Please note
+# that the export part is important.
+#export QMAILQUEUE=""
+
+# tcpserver maximum concurrency, defaults to 40 in tcpserver
+# this controls the maximum number of incoming connections that it will accept
+if [[ -e ${QMAIL_CONTROLDIR}/concurrencyincoming ]]
+then
+ MAXCONN=$(head -n 1 ${QMAIL_CONTROLDIR}/concurrencyincoming)
+else
+ MAXCONN=40
+fi
+
+# logging directives
+LOG_OPTS="t" # 't' is for timestamp
+LOG_MAXSIZE=2500000 # defalts to '99999' if empty
+LOG_MAXCOUNT=10 # defaults to '10' if empty
+
+# build LOG_OPTS from this
+[[ -n "${LOG_MAXSIZE}" ]] && \
+ LOG_OPTS="${LOG_OPTS} s${LOG_MAXSIZE}"
+[[ -n "${LOG_MAXCOUNT}" ]] && \
+ LOG_OPTS="${LOG_OPTS} n${LOG_MAXCOUNT}"
+
+# directory to log to
+LOG_DEST=/var/log/qmail/qmail-${SERVICE}d
+
+# BIG FAT WARNING:
+# If you disable this by uncommenting it you will turn _off_ the configuration
+# sanity check do so at your own risk!
+#QMAIL_DISABLE_SANITY_CHECK=1
diff --git a/mail-mta/netqmail/files/conf-pop3d b/mail-mta/netqmail/files/conf-pop3d
new file mode 100644
index 000000000000..4d9cfdd1665d
--- /dev/null
+++ b/mail-mta/netqmail/files/conf-pop3d
@@ -0,0 +1,29 @@
+# Configuration file for qmail-pop3d
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/conf-pop3d,v 1.1 2006/02/12 18:42:33 hansmi 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"
+
+# The name of the maildir in each user's directory.
+# This should be the same thing that defaultdelivery points to
+QMAIL_MAILDIR=".maildir"
diff --git a/mail-mta/netqmail/files/conf-qmqpd b/mail-mta/netqmail/files/conf-qmqpd
new file mode 100644
index 000000000000..b3622411dc3a
--- /dev/null
+++ b/mail-mta/netqmail/files/conf-qmqpd
@@ -0,0 +1,15 @@
+# Configuration file for qmail-qmqpd
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/conf-qmqpd,v 1.1 2006/02/12 18:42:33 hansmi 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/mail-mta/netqmail/files/conf-qmtpd b/mail-mta/netqmail/files/conf-qmtpd
new file mode 100644
index 000000000000..7116efc29672
--- /dev/null
+++ b/mail-mta/netqmail/files/conf-qmtpd
@@ -0,0 +1,18 @@
+# Configuration file for qmail-qmtpd
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/conf-qmtpd,v 1.1 2006/02/12 18:42:33 hansmi 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/mail-mta/netqmail/files/conf-send b/mail-mta/netqmail/files/conf-send
new file mode 100644
index 000000000000..74b2e8c8d94b
--- /dev/null
+++ b/mail-mta/netqmail/files/conf-send
@@ -0,0 +1,6 @@
+# Configuration file for qmail-send
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/conf-send,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+# directory to log to
+# override conf-common on this
+LOG_DEST=/var/log/qmail/qmail-send
diff --git a/mail-mta/netqmail/files/conf-smtpd b/mail-mta/netqmail/files/conf-smtpd
new file mode 100644
index 000000000000..cfbdad49a52d
--- /dev/null
+++ b/mail-mta/netqmail/files/conf-smtpd
@@ -0,0 +1,51 @@
+# Configuration file for qmail-smtpd
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/conf-smtpd,v 1.1 2006/02/12 18:42:33 hansmi 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"
+
+# fixcrio inserts missing CRs at the ends of lines. See:
+# http://cr.yp.to/ucspi-tcp/fixcrio.html
+# http://cr.yp.to/docs/smtplf.html
+# DO NOT enable this when you are using SSL/TLS (USE=ssl)!
+#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} fixcrio"
+
+# 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
+
+# WARNING: If you've installed qmail with USE=noauthcram, and you want to use
+# the following programs, you proably need to install them.
+
+# Example using cmd5checkpw
+# See the manpage for cmd5checkpw for details on the passwords
+#QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw"
+
+# Example for checkpassword-pam (emerge checkpassword-pam)
+# Don't forget to make /usr/bin/checkpassword-pam sticky (see README.auth)
+#QMAIL_SMTP_CHECKPASSWORD="/usr/bin/checkpassword-pam -s system-auth"
+
+[[ -n "${QMAIL_SMTP_CHECKPASSWORD}" ]] && {
+ [[ -z "${QMAIL_SMTP_POST}" ]] && QMAIL_SMTP_POST=/bin/true
+ QMAIL_SMTP_POST="${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}"
+}
diff --git a/mail-mta/netqmail/files/digest-netqmail-1.05 b/mail-mta/netqmail/files/digest-netqmail-1.05
new file mode 100644
index 000000000000..04cf6374140c
--- /dev/null
+++ b/mail-mta/netqmail/files/digest-netqmail-1.05
@@ -0,0 +1,9 @@
+MD5 39b6f70f65056472ff97ab40c1dba7b4 big-todo.103.patch 5546
+RMD160 a16a429796d869b8217e42b7ddb607c95d9bbcd8 big-todo.103.patch 5546
+SHA256 afa0a249e3271badd442f0bdae39997d9fe536157d8a0d62b6706f3dfcd11a72 big-todo.103.patch 5546
+MD5 ecbd06a11022e61e5a4dda38c78c950e netqmail-1.05-tls-smtpauth-20060105.patch 147837
+RMD160 18a3edd3ea7e7a8e4d6cadbd3c0bd5e8cb041caa netqmail-1.05-tls-smtpauth-20060105.patch 147837
+SHA256 326af9647e752e158f7672ca3fb592fe23c5f44502ddfcd6b5b6bc6c7ecf4c27 netqmail-1.05-tls-smtpauth-20060105.patch 147837
+MD5 4c03848af9d37e281f3b82cc59230d9b netqmail-1.05.tar.gz 252264
+RMD160 e5bd8557c58a2686233449254b146e74389a7652 netqmail-1.05.tar.gz 252264
+SHA256 59788abf252e2da224542c1c8b727311335c61d990f24f4edf28f6eb5483f676 netqmail-1.05.tar.gz 252264
diff --git a/mail-mta/netqmail/files/dot-qmail b/mail-mta/netqmail/files/dot-qmail
new file mode 100644
index 000000000000..81a15fc5c50c
--- /dev/null
+++ b/mail-mta/netqmail/files/dot-qmail
@@ -0,0 +1,3 @@
+# Uncomment the next line for .forward support
+#|dot-forward .forward
+./.maildir/
diff --git a/mail-mta/netqmail/files/mkservercert b/mail-mta/netqmail/files/mkservercert
new file mode 100644
index 000000000000..a0b771aeb5c2
--- /dev/null
+++ b/mail-mta/netqmail/files/mkservercert
@@ -0,0 +1,55 @@
+#!/bin/bash
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/mkservercert,v 1.1 2006/02/12 18:42:33 hansmi 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/mail-mta/netqmail/files/qmail-config-system b/mail-mta/netqmail/files/qmail-config-system
new file mode 100644
index 000000000000..345e1d000960
--- /dev/null
+++ b/mail-mta/netqmail/files/qmail-config-system
@@ -0,0 +1,72 @@
+#!/bin/bash
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/qmail-config-system,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+# This is a configuration system to make using and controlling the interesting
+# parts of the qmail behavior simple. The only variable that needs to be set
+# before running this is $SERVICE.
+
+# this is to inherit QMAIL_CONTROLDIR
+. /etc/profile
+
+# now run
+# grab the common configuration
+[[ -s ${QMAIL_CONTROLDIR}/conf-common ]] && \
+ . ${QMAIL_CONTROLDIR}/conf-common
+
+# grab the per-service configuration
+[[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ]] && \
+ . ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+
+# special case for qmail-send
+[[ "${SERVICE}" = send && -s ${QMAIL_CONTROLDIR}/conf-send ]] && \
+ . ${QMAIL_CONTROLDIR}/conf-send
+
+# you may want to disable this at some point, so I give you the choice here
+if [[ -z "${QMAIL_DISABLE_SANITY_CHECK}" ]]
+then
+ # This is intended solely to stop qmail eating up all your hard disk space with logs
+
+ CONFIG_SANITY_GOOD=
+
+ # check simple stuff first
+ if [[ -z "${QMAILDUID}" || -z "${NOFILESGID}" || -z "${SERVICE}" || -z "${QMAILLUID}" ]]
+ then
+ echo "SERVICE(${SERVICE}), QMAILDUID(${QMAILDUID}), NOFILESGID(${NOFILESGID}) or "\
+ "QMAILLUID(${QMAILLUID}) is unset in $0"
+ CONFIG_SANITY_GOOD=0
+ fi
+
+ if [[ -z "${LOG_OPTS}" || -z "${LOG_DEST}" ]]
+ then
+ echo "LOG_OPTS: ${LOG_OPTS}"
+ echo "LOG_DEST: ${LOG_DEST}"
+ echo "Error in logging setup!"
+ CONFIG_SANITY_GOOD=0
+ fi
+
+ if [[ "${SERVICE}" = smtp &&
+ ! -f ${QMAIL_CONTROLDIR}/rcpthosts &&
+ -z "${QMAIL_DISABLE_SANITY_CHECK}" ]]
+ then
+ echo "No /var/qmail/control/rcpthosts!"
+ echo "Refusing to start SMTP listener because it'll create an open relay"
+ CONFIG_SANITY_GOOD=0
+ fi
+
+ if [[ "${SERVICE}" != send && ! -f "${TCPSERVER_RULESCDB}" ]]
+ then
+ echo "No CDB file found (${TCPSERVER_RULESCDB})"
+ CONFIG_SANITY_GOOD=0
+ fi
+
+ if [[ -n "${CONFIG_SANITY_GOOD}" ]]
+ then
+ echo "Some error detected in ${SERVICE}, sleeping for 90 seconds for safety"
+ sleep 90s
+ exit 1
+ fi
+else
+ echo "Failed to find sanity checker!"
+ sleep 30s
+ exit 1
+fi
diff --git a/mail-mta/netqmail/files/qmail-genrsacert.sh b/mail-mta/netqmail/files/qmail-genrsacert.sh
new file mode 100644
index 000000000000..04ecda9136cf
--- /dev/null
+++ b/mail-mta/netqmail/files/qmail-genrsacert.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/qmail-genrsacert.sh,v 1.1 2006/02/12 18:42:33 hansmi 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.
+
+confdir=${ROOT}/var/qmail/control
+
+# the key should be 0600
+# which is readable by qmaild only!
+umaskvalue="0077"
+uid="qmaild"
+gid="qmail"
+
+umask ${umaskvalue}
+
+# If you want to renice this process, uncomment the following line:
+# renice +15 "$$"
+
+# This is a list with bits of the generated keys. They should
+# be a power of 2 ideally and must be more than 64.
+keys="512 1024"
+
+for bits in ${keys}
+do
+ pemfile="${confdir}/rsa${bits}.pem"
+ tmpfile="${confdir}/rsa${bits}.pem.tmp"
+
+ # 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} || exit 1
+
+ dhfile="${confdir}/dh${bits}.pem"
+ dtmpfile="${confdir}/dh${bits}.pem.tmp"
+
+ /usr/bin/openssl dhparam -2 -out ${dtmpfile} ${bits} 2>/dev/null && \
+ /bin/chown ${uid}:${gid} ${dtmpfile} && \
+ /bin/mv -f ${dtmpfile} ${dhfile} || exit 1
+done
diff --git a/mail-mta/netqmail/files/run-qmail-pop3d b/mail-mta/netqmail/files/run-qmail-pop3d
new file mode 100644
index 000000000000..d166e6fdbd3d
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-pop3d
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's POP3 daemon
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-pop3d,v 1.1 2006/02/12 18:42:33 hansmi 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
+# modifications can be made possible via the configuration files.
+
+SERVICE=pop3
+. /var/qmail/bin/qmail-config-system && \
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x ${TCPSERVER_RULESCDB} \
+ -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 ${QMAIL_MAILDIR} 2>&1
diff --git a/mail-mta/netqmail/files/run-qmail-pop3d-log b/mail-mta/netqmail/files/run-qmail-pop3d-log
new file mode 100644
index 000000000000..3befb5b1a71a
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-pop3d-log
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's POP3 daemon (logging)
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-pop3d-log,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+SERVICE=pop3
+. /var/qmail/bin/qmail-config-system && \
+eval exec /usr/bin/setuidgid qmaill /usr/bin/multilog ${LOG_OPTS} ${LOG_DEST}
diff --git a/mail-mta/netqmail/files/run-qmail-qmqpd b/mail-mta/netqmail/files/run-qmail-qmqpd
new file mode 100644
index 000000000000..19ff028f9283
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-qmqpd
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's QMQP daemon
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-qmqpd,v 1.1 2006/02/12 18:42:33 hansmi 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
+# modifications can be made possible via the configuration files.
+
+SERVICE=qmqp
+. /var/qmail/bin/qmail-config-system && \
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x ${TCPSERVER_RULESCDB} \
+ -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/mail-mta/netqmail/files/run-qmail-qmqpd-log b/mail-mta/netqmail/files/run-qmail-qmqpd-log
new file mode 100644
index 000000000000..6167d92f1a0b
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-qmqpd-log
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's QMQP daemon (logging)
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-qmqpd-log,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+SERVICE=qmqp
+. /var/qmail/bin/qmail-config-system && \
+eval exec /usr/bin/setuidgid qmaill /usr/bin/multilog ${LOG_OPTS} ${LOG_DEST}
diff --git a/mail-mta/netqmail/files/run-qmail-qmtpd b/mail-mta/netqmail/files/run-qmail-qmtpd
new file mode 100644
index 000000000000..71c520744f53
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-qmtpd
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's QMTP daemon
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-qmtpd,v 1.1 2006/02/12 18:42:33 hansmi 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
+# modifications can be made possible via the configuration files.
+
+SERVICE=qmtp
+. /var/qmail/bin/qmail-config-system && \
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x ${TCPSERVER_RULESCDB} \
+ -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/mail-mta/netqmail/files/run-qmail-qmtpd-log b/mail-mta/netqmail/files/run-qmail-qmtpd-log
new file mode 100644
index 000000000000..a8871c22e767
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-qmtpd-log
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's QMTP daemon (logging)
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-qmtpd-log,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+SERVICE=qmtp
+. /var/qmail/bin/qmail-config-system && \
+eval exec /usr/bin/setuidgid qmaill /usr/bin/multilog ${LOG_OPTS} ${LOG_DEST}
diff --git a/mail-mta/netqmail/files/run-qmail-send b/mail-mta/netqmail/files/run-qmail-send
new file mode 100644
index 000000000000..ccf5797a08de
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-send
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Init script for qmail-send
+# Copied from LWQ
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-send,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+exec env - PATH="/var/qmail/bin:$PATH" \
+ qmail-start "`cat /var/qmail/control/defaultdelivery`"
diff --git a/mail-mta/netqmail/files/run-qmail-send-log b/mail-mta/netqmail/files/run-qmail-send-log
new file mode 100644
index 000000000000..d1fa08a7971c
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-send-log
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's send daemon (logging)
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-send-log,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+SERVICE=send
+. /var/qmail/bin/qmail-config-system && \
+eval exec /usr/bin/setuidgid qmaill /usr/bin/multilog ${LOG_OPTS} ${LOG_DEST}
diff --git a/mail-mta/netqmail/files/run-qmail-smtpd b/mail-mta/netqmail/files/run-qmail-smtpd
new file mode 100644
index 000000000000..2be9c8cabf02
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-smtpd
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's SMTP daemon
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-smtpd,v 1.1 2006/02/12 18:42:33 hansmi 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
+# modifications can be made possible via the configuration files.
+
+SERVICE=smtp
+. /var/qmail/bin/qmail-config-system && \
+exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver ${TCPSERVER_OPTS} -x ${TCPSERVER_RULESCDB} \
+ -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/mail-mta/netqmail/files/run-qmail-smtpd-log b/mail-mta/netqmail/files/run-qmail-smtpd-log
new file mode 100644
index 000000000000..f45f714ba6f5
--- /dev/null
+++ b/mail-mta/netqmail/files/run-qmail-smtpd-log
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Gentoo Startup script for qmail's SMTP daemon (logging)
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/run-qmail-smtpd-log,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+SERVICE=smtp
+. /var/qmail/bin/qmail-config-system && \
+eval exec /usr/bin/setuidgid qmaill /usr/bin/multilog ${LOG_OPTS} ${LOG_DEST}
diff --git a/mail-mta/netqmail/files/servercert.cnf b/mail-mta/netqmail/files/servercert.cnf
new file mode 100644
index 000000000000..735445eacc87
--- /dev/null
+++ b/mail-mta/netqmail/files/servercert.cnf
@@ -0,0 +1,35 @@
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/files/servercert.cnf,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+# This is the openssl config file to generate keys for qmail
+
+[ 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/mail-mta/netqmail/files/tcp.pop3.sample b/mail-mta/netqmail/files/tcp.pop3.sample
new file mode 100644
index 000000000000..d6a0f69245a7
--- /dev/null
+++ b/mail-mta/netqmail/files/tcp.pop3.sample
@@ -0,0 +1,12 @@
+# 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
+
+# For the full documentation on the format of this file,
+# see http://cr.yp.to/ucspi-tcp/tcprules.html
+
+#----------------------------------------------------------------
+
+# 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 IP addresses here to block
+# them out.
+:allow
diff --git a/mail-mta/netqmail/files/tcp.qmqp.sample b/mail-mta/netqmail/files/tcp.qmqp.sample
new file mode 100644
index 000000000000..83d715df1bdb
--- /dev/null
+++ b/mail-mta/netqmail/files/tcp.qmqp.sample
@@ -0,0 +1,14 @@
+# 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
+
+# For the full documentation on the format of this file,
+# see http://cr.yp.to/ucspi-tcp/tcprules.html
+
+#----------------------------------------------------------------
+
+# 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/mail-mta/netqmail/files/tcp.qmtp.sample b/mail-mta/netqmail/files/tcp.qmtp.sample
new file mode 100644
index 000000000000..ab8101590808
--- /dev/null
+++ b/mail-mta/netqmail/files/tcp.qmtp.sample
@@ -0,0 +1,23 @@
+# 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
+
+# For the full documentation on the format of this file,
+# see http://cr.yp.to/ucspi-tcp/tcprules.html
+
+#----------------------------------------------------------------
+
+# 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
+
+# If you are using qmail-scanner, this line here is the correct one to use
+# instead (comment out the above ':allow' line FIRST) and applies that script
+# to any mail coming in that is not from a host allowed to relay. You can
+# change the value of the variable to any other value you desire to use custom
+# scripts for example.
+#:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
diff --git a/mail-mta/netqmail/files/tcp.smtp.sample b/mail-mta/netqmail/files/tcp.smtp.sample
new file mode 100644
index 000000000000..bc386ad91c3c
--- /dev/null
+++ b/mail-mta/netqmail/files/tcp.smtp.sample
@@ -0,0 +1,79 @@
+# 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
+
+# For the full documentation on the format of this file,
+# see http://cr.yp.to/ucspi-tcp/tcprules.html
+
+#-----------------------------------------------------------------
+# Short description of the rules
+
+# If you set 'allow', this means that our mail server will allow the specified
+# IP address 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 address range to make a TCP connection to our server.
+
+# If you set RELAYCLIENT="", this means that the listed IP address range is
+# allowed to relay mail through our server.
+
+# If you don't set RELAYCLIENT="", this means that the listed IP address range
+# will not be able to relay mail through our server.
+
+# If you set RBLSMTPD="", this means that the listed IP address ranges will not
+# be checked against any of the RBL databases.
+
+# If you set RBLSMTPD="some text here", this means that an RBL lookup won't 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 won't be
+# performed, but the mail will be rejected with the specified text as a 5xx
+# permanent 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).
+
+#-----------------------------------------------------------------
+# Bypass open relay checking for these IP addresses:
+
+# These IP addresses are ones that we have setup so that they aren't 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=""
+
+#-----------------------------------------------------------------
+# Do not allow these IP addresses to send e-mails to us:
+
+#1.2.3.:allow,RBLSMTPD="-Connections refused due to spam from domain.tld"
+#4.5.6.7:allow,RBLSMTPD="-Connections refused due to spam from domain2.tld"
+#8.9.10.11-100:allow,RBLSMTPD="-Connections from this IP have been banned"
+
+#-----------------------------------------------------------------
+# Allow these IP addresses to relay mail trough our server
+
+# IP addresses from our LAN are allowed to relay, and we won't bother doing any
+# RBL checking.
+#192.168.1.: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 e-mails:
+
+# Everyone else can make connections to our server, but not allowed to relay.
+# RBL lookups are performed.
+:allow
+
+# If you are using qmail-scanner, this line here is the correct one to use
+# instead (comment out the above ':allow' line FIRST) and applies that script
+# to any mail coming in that is not from a host allowed to relay. You can
+# change the value of the variable to any other value you desire to use custom
+# scripts for example.
+#:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
diff --git a/mail-mta/netqmail/metadata.xml b/mail-mta/netqmail/metadata.xml
new file mode 100644
index 000000000000..e4b2b959b949
--- /dev/null
+++ b/mail-mta/netqmail/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qmail</herd>
+ <maintainer>
+ <email>hansmi@gentoo.org</email>
+ <name>Michael Hanselmann</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/mail-mta/netqmail/netqmail-1.05.ebuild b/mail-mta/netqmail/netqmail-1.05.ebuild
new file mode 100644
index 000000000000..b676adba53fc
--- /dev/null
+++ b/mail-mta/netqmail/netqmail-1.05.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/netqmail-1.05.ebuild,v 1.1 2006/02/12 18:42:33 hansmi Exp $
+
+inherit eutils toolchain-funcs fixheadtails flag-o-matic
+
+DESCRIPTION="qmail -- a secure, reliable, efficient, simple message transfer agent"
+HOMEPAGE="
+ http://cr.yp.to/qmail.html
+ http://www.qmail.org/
+"
+SRC_URI="
+ mirror://qmail/netqmail-${PV}.tar.gz
+ !vanilla? (
+ ssl? ( http://shupp.org/patches/netqmail-1.05-tls-smtpauth-20060105.patch )
+ highvolume? ( mirror://qmail/big-todo.103.patch )
+ )
+"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~ppc"
+IUSE="vanilla ssl highvolume gencertdaily"
+RESTRICT="userpriv usersandbox test"
+
+DEPEND="
+ sys-apps/groff
+ net-mail/queue-repair
+ ssl? ( dev-libs/openssl )
+"
+RDEPEND="
+ !virtual/mta
+ sys-apps/ucspi-tcp
+ sys-process/daemontools
+ net-mail/dot-forward
+ ${DEPEND}
+"
+PROVIDE="
+ virtual/mta
+ virtual/mda
+"
+
+# Important: QMAIL_CONF_SPLIT should always be a prime number!
+MY_CONF_SPLIT="${QMAIL_CONF_SPLIT:-23}"
+
+MY_S="${S}/netqmail-${PV}"
+TCPRULES_DIR=/etc/tcprules.d
+
+if use gencertdaily; then
+ CRON_FOLDER=cron.daily
+else
+ CRON_FOLDER=cron.hourly
+fi
+
+src_unpack() {
+ unpack netqmail-${PV}.tar.gz
+ cd "${S}"
+
+ ./collate.sh || die "patching failed"
+
+ cd "${MY_S}"
+
+ if ! use vanilla; then
+ use ssl && \
+ epatch ${DISTDIR}/netqmail-1.05-tls-smtpauth-20060105.patch
+
+ if use highvolume; then
+ epatch ${DISTDIR}/big-todo.103.patch
+ fi
+ fi
+
+ if [[ -n "${QMAIL_PATCH_DIR}" ]]
+ then
+ echo
+ ewarn "You enabled custom patches from ${QMAIL_PATCH_DIR}."
+ ewarn "Be warned that you won't get any support when using "
+ ewarn "when this feature. You're on your own from now."
+ ebeep
+ EPATCH_SOURCE=${QMAIL_PATCH_DIR} epatch
+ echo
+ fi
+
+ is_prime ${MY_CONF_SPLIT} || die 'QMAIL_CONF_SPLIT is not a prime number.'
+ einfo "Using conf-split value of ${MY_CONF_SPLIT}."
+
+ ht_fix_file Makefile*
+ append-ldflags $(bindnow-flags)
+
+ echo -n "$(tc-getCC) ${CFLAGS}" > "${MY_S}/conf-cc"
+ echo -n "$(tc-getCC) ${LDFLAGS}" > "${MY_S}/conf-ld"
+ echo -n "${MY_CONF_SPLIT}" > "${MY_S}/conf-split"
+}
+
+src_compile() {
+ cd "${MY_S}"
+ emake it man || die "make failed"
+}
+
+src_install() {
+ cd "${MY_S}"
+
+ einfo "Setting up directory hierarchy ..."
+
+ diropts -m 755 -o root -g qmail
+ dodir /var/qmail/{,bin,boot,control}
+
+ 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
+
+ insinto /var/qmail/bin
+
+ insopts -o qmailq -g qmail -m 4711
+ doins qmail-queue
+
+ insopts -o root -g qmail -m 700
+ doins qmail-{lspawn,start,newu,newmrh}
+
+ insopts -o root -g qmail -m 711
+ doins qmail-{getpw,local,remote,rspawn,clean,send,pw2u} splogger
+
+ insopts -o root -g qmail -m 755
+ doins bouncesaying condredirect config-fast datemail elq \
+ except forward maildir2mbox maildirmake maildirwatch \
+ mailsubj pinq predate preline qail qbiff \
+ qmail-{inject,pop3d,popup,qmqpc,qmqpd,qmtpd,qread} \
+ qmail-{qstat,showctl,smtpd,tcpok,tcpto} \
+ qreceipt qsmhook sendmail tcp-env
+
+ einfo "Installing manpages"
+ into /usr
+ doman *.[1-8]
+
+ dodoc BLURB* CHANGES FAQ INSTALL* PIC* README* REMOVE* SECURITY \
+ SENDMAIL SYSDEPS TARGETS TEST* THANKS* THOUGHTS TODO* \
+ UPGRADE VERSION*
+
+ # use the correct maildirmake
+ # the courier-imap one has some extensions that are nicer
+ [[ -e /usr/bin/maildirmake ]] && \
+ MAILDIRMAKE="/usr/bin/maildirmake" || \
+ MAILDIRMAKE="${D}/var/qmail/bin/maildirmake"
+
+ einfo "Adding env.d entry for qmail"
+ dodir /etc/env.d
+ insinto /etc/env.d
+ doins ${FILESDIR}/99qmail
+
+ 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
+ keepdir /var/qmail/alias/.maildir/{cur,new,tmp}
+
+ for i in /var/qmail/alias/.qmail-{mailer-daemon,postmaster,root}
+ do
+ if [[ ! -f ${ROOT}${i} ]]; then
+ touch ${D}${i}
+ fowners 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}/dot-qmail .qmail.sample
+ fperms 644 /etc/skel/.qmail.sample
+ ${MAILDIRMAKE} ${D}/etc/skel/.maildir
+ 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}
+ fperms +t /var/qmail/supervise/qmail-${i}{,/log}
+ insinto /var/qmail/supervise/qmail-${i}
+ newins ${FILESDIR}/run-qmail-${i} run
+ insinto /var/qmail/supervise/qmail-${i}/log
+ newins ${FILESDIR}/run-qmail-${i}-log run
+ diropts -m 755 -o qmaill
+ keepdir /var/log/qmail/qmail-${i}
+ done
+
+ dodir ${TCPRULES_DIR}
+ insinto ${TCPRULES_DIR}
+ for i in smtp qmtp qmqp pop3; do
+ newins ${FILESDIR}/tcp.${i}.sample tcp.qmail-${i}
+ done
+
+ einfo "Installing some stock configuration files"
+ insinto /var/qmail/control
+ insopts -o root -g root -m 644
+ doins ${FILESDIR}/conf-{common,send,qmtpd,qmqpd,pop3d}
+ newins ${FILESDIR}/conf-smtpd conf-smtpd
+ newins ${FILESDIR}/dot-qmail defaultdelivery
+ use ssl && \
+ doins ${FILESDIR}/servercert.cnf
+
+ einfo "Configuration sanity checker and launcher"
+ into /var/qmail
+ insopts -o root -g root -m 644
+ dobin ${FILESDIR}/qmail-config-system
+
+ if use ssl; then
+ einfo "SSL Certificate creation script"
+ dobin ${FILESDIR}/mkservercert
+ einfo "RSA key generation cronjob"
+ insinto /etc/${CRON_FOLDER}
+ doins ${FILESDIR}/qmail-genrsacert.sh
+ chmod +x ${D}/etc/${CRON_FOLDER}/qmail-genrsacert.sh
+
+ # for some files
+ keepdir /var/qmail/control/tlshosts/
+ 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 "every mail was 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!
+ f=tcp.qmail-${i}
+ src=${ROOT}${TCPRULES_DIR}/${f}
+ cdb=${ROOT}${TCPRULES_DIR}/${f}.cdb
+ tmp=${ROOT}${TCPRULES_DIR}/.${f}.tmp
+ [[ -e ${src} ]] && tcprules ${cdb} ${tmp} < ${src}
+ done
+}
+
+pkg_postinst() {
+ einfo "Setting up the message queue hierarchy ..."
+ /usr/bin/queue-repair.py \
+ --create --split "${MY_CONF_SPLIT}" \
+ $(use highvolume && echo '--bigtodo' || echo '--no-bigtodo') \
+ ${ROOT}/var/qmail >/dev/null || \
+ die 'queue-repair failed'
+
+ rootmailfixup
+ buildtcprules
+
+ # for good measure
+ env-update
+
+ einfo "To setup qmail to run out-of-the-box on your system, run:"
+ einfo "emerge --config =${PF}"
+ echo
+ einfo "To start qmail at boot you have to add svscan to your startup"
+ 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"
+ echo
+ einfo "To start the pop3 server as well, create the following link:"
+ einfo "ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d"
+ echo
+ einfo "Additionally, the QMTP and QMQP protocols are supported, "
+ einfo "and can be started as:"
+ einfo "ln -s /var/qmail/supervise/qmail-qmtpd /service/qmail-qmtpd"
+ einfo "ln -s /var/qmail/supervise/qmail-qmqpd /service/qmail-qmqpd"
+ echo
+ einfo "Additionally, if you wish to run qmail right now, you should "
+ einfo "run this before anything else:"
+ einfo "source /etc/profile"
+ echo
+ einfo "If you are looking for documentation, check those links:"
+ einfo "http://www.gentoo.org/doc/en/qmail-howto.xml"
+ einfo " -- qmail/vpopmail Virtual Mail Hosting System Guide"
+ einfo "http://www.lifewithqmail.com/"
+ einfo " -- Life with qmail"
+}
+
+pkg_preinst() {
+ mkdir -p ${TCPRULES_DIR}
+ for proto in smtp qmtp qmqp pop3; do
+ for ext in '' .cdb; do
+ old="/etc/tcp.${proto}${ext}"
+ new="${TCPRULES_DIR}/tcp.qmail-${proto}${ext}"
+ fail=0
+ if [[ -f "$old" && ! -f "$new" ]]; then
+ einfo "Moving $old to $new"
+ cp $old $new || fail=1
+ else
+ fail=1
+ fi
+ if [[ "${fail}" = 1 && -f ${old} ]]; then
+ eerror "Error moving $old to $new, be sure to check the"
+ eerror "configuration! You may have already moved the files,"
+ eerror "in which case you can delete $old"
+ fi
+ done
+ done
+}
+
+# Candidate for eclass
+pkg_setup() {
+ # keep in sync with mini-qmail pkg
+ einfo "Creating groups and users"
+ enewgroup qmail 201
+ enewuser alias 200 -1 /var/qmail/alias 200
+ enewuser qmaild 201 -1 /var/qmail 200
+ enewuser qmaill 202 -1 /var/qmail 200
+ enewuser qmailp 203 -1 /var/qmail 200
+ enewuser qmailq 204 -1 /var/qmail 201
+ enewuser qmailr 205 -1 /var/qmail 201
+ enewuser qmails 206 -1 /var/qmail 201
+}
+
+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}${TCPRULES_DIR}/tcp.qmail-${proto}"
+ egrep -q "${myline}" ${f} || echo "${myline}" >>${f}
+ done
+ done
+
+ buildtcprules
+
+ if use ssl; then
+ ebegin "Generating RSA keys for SSL/TLS, this can take some time"
+ ${ROOT}/etc/${CRON_FOLDER}/qmail-genrsacert.sh
+ eend $?
+ einfo "Creating a self-signed ssl-certificate:"
+ ${ROOT}/var/qmail/bin/mkservercert
+ einfo "If you want to have a properly signed certificate "
+ einfo "instead, do the following:"
+ # space at the end of the string because of the current implementation
+ # of einfo
+ 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
+}
+
+# --- TODO: The following code can be moved to prime.eclass --
+# Original Author: Michael Hanselmann <hansmi@gentoo.org>
+# Purpose: Functions for prime numbers
+
+# Prints a list of primes between min and max inclusive
+#
+# Note: this functions gets very slow when used with large numbers.
+#
+# Syntax: primes <min> <max>
+primes() {
+ local min=${1} max=${2}
+ local result= primelist=2 i p
+
+ [[ ${min} -le 2 ]] && result="${result} 2"
+
+ for ((i = 3; i <= max; i += 2))
+ do
+ for p in ${primelist}
+ do
+ [[ $[i % p] == 0 || $[p * p] -gt ${i} ]] && \
+ break
+ done
+ if [[ $[i % p] != 0 ]]
+ then
+ primelist="${primelist} ${i}"
+ [[ ${i} -ge ${min} ]] && \
+ result="${result} ${i}"
+ fi
+ done
+
+ echo ${result}
+}
+
+# Checks wether a number is a prime number
+#
+# Syntax: is_prime <number>
+is_prime() {
+ local number=${1} i
+ for i in $(primes ${number} ${number})
+ do
+ [[ ${i} == ${number} ]] && return 0
+ done
+ return 1
+}
+# --- end of prime.eclass ---