Portage is a package management system used by Gentoo Linux
# ChangeLog for mail-mta/netqmail
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/ChangeLog,v 1.46 2008/08/23 01:58:02 cardoe Exp $
23 Aug 2008; Doug Goldstein
add GLEP 56 USE flag desc from use.local.desc
*netqmail-1.06 (06 Apr 2008)
06 Apr 2008; Benedikt Böhm
metadata.xml, +netqmail-1.06.ebuild:
version bump; conversion to qmail.eclass; fixes #123897, #137207
27 Feb 2008; Tupone Alfredo
files/tcp.smtp.sample:
Fix tcp.smtp & tcp.qmtp instruction for qmail-scanner. Bug #211672 by Martin
Mokrejs
31 Jan 2008; Michael Hanselmann
Remove myself as maintainer.
03 Dec 2007; Robin H. Johnson
netqmail-1.05-r4.ebuild, netqmail-1.05-r8.ebuild:
DJB has relicensed qmail to the public domain, see
http://cr.yp.to/qmail/dist.html
30 Jun 2007; Raúl Porcel
alpha stable wrt #169591
19 May 2007; Daniel Gryniewicz
Marked stable on amd64 for bug #169591
12 May 2007; Markus Rothe
Stable on ppc64; bug #169591
08 May 2007; Raúl Porcel
ia64 stable wrt #169591
07 May 2007; Michael Hanselmann
netqmail-1.05-r8.ebuild:
Stable on hppa, ppc, sparc, x86. Fixes problem with OpenSSL 0.9.8e.
*netqmail-1.05-r8 (27 Apr 2007)
27 Apr 2007; Michael Hanselmann
-files/1.05-r7-sslfix.diff, -netqmail-1.05-r7.ebuild,
+netqmail-1.05-r8.ebuild:
Bump SMTP-AUTH/TLS composite patch to 20070417. This makes my own patch
obsolete.
10 Apr 2007; Michael Hanselmann
netqmail-1.05-r7.ebuild:
Don't set -DTLS.
10 Apr 2007; Michael Hanselmann
netqmail-1.05-r4.ebuild, netqmail-1.05-r7.ebuild:
Fix bug 173884 by using doenvd.
06 Apr 2007; Michael Hanselmann
netqmail-1.05-r7.ebuild:
Apply 1.05-r7-sslfix.diff only when SSL is enabled.
*netqmail-1.05-r7 (06 Apr 2007)
05 Apr 2007; Michael Hanselmann
+files/1.05-r7-sslfix.diff, -netqmail-1.05-r6.ebuild,
+netqmail-1.05-r7.ebuild:
Try to fix bug 169591 by adding a patch.
*netqmail-1.05-r6 (04 Apr 2007)
04 Apr 2007; Michael Hanselmann
-netqmail-1.05-r5.ebuild, +netqmail-1.05-r6.ebuild:
SSL patch version bump to 20070321.
18 Mar 2007; Marius Mauch
netqmail-1.05-r5.ebuild:
Replacing einfo with elog
17 Feb 2007; Michael Hanselmann
netqmail-1.05-r4.ebuild, netqmail-1.05-r5.ebuild:
Remove incorrect usage of ${ROOT}, fixes bug 167285.
*netqmail-1.05-r5 (11 Feb 2007)
11 Feb 2007; Michael Hanselmann
+netqmail-1.05-r5.ebuild:
Fix Bug #165981 by using sed voodoo to patch conf-{cc,ld}.
15 Jan 2007; Michael Hanselmann
netqmail-1.05-r4.ebuild:
Stable on mips. See bug #155137.
12 Dec 2006; Bryan Østergaard
netqmail-1.05-r4.ebuild:
Stable on Alpha + ia64, bug 155137.
23 Nov 2006;
stable on amd64
21 Oct 2006; Michael Hanselmann
netqmail-1.05-r4.ebuild:
Stable on hppa, ppc64, sparc.
19 Oct 2006; Bryan Østergaard
netqmail-1.05-r4.ebuild:
Add ~ia64 keyword, bug 145528.
29 Sep 2006; Thomas Cort
Added ~alpha keyword wrt Bug #145528.
10 Sep 2006; Michael Hanselmann
netqmail-1.05-r4.ebuild:
Added to ~mips. See bug #145528.
01 Sep 2006; Rene Nussbaumer
netqmail-1.05-r4.ebuild:
Added to ~hppa. See bug #145528.
31 Aug 2006; Thomas Cort
Added ~amd64 keyword wrt Bug #145528.
30 Aug 2006; Markus Rothe
Added ~ppc64
10 Aug 2006; Michael Hanselmann
netqmail-1.05-r4.ebuild:
Fixed QMAIL_PATCH_DIR implementation, reported by Pedro Venda.
01 Jul 2006; Michael Hanselmann
+files/tcprules.d-Makefile.qmail, netqmail-1.05-r4.ebuild:
Add Makefile.qmail. Stable on ppc, x86.
17 Jun 2006; Michael Hanselmann
-netqmail-1.05-r3.ebuild, netqmail-1.05-r4.ebuild:
Remove unneeded restrictions, bug #136445. Removed old version.
*netqmail-1.05-r4 (17 Jun 2006)
17 Jun 2006; Michael Hanselmann
-netqmail-1.05-r2.ebuild, +netqmail-1.05-r4.ebuild:
Added support for noauthcram USE flag, bug #137015.
*netqmail-1.05-r3 (11 Jun 2006)
11 Jun 2006; Michael Hanselmann
+netqmail-1.05-r3.ebuild:
Added support for mailwrapper.
30 May 2006; Michael Hanselmann
-netqmail-1.05-r1.ebuild:
Remove old version.
06 May 2006; Michael Hanselmann
files/qmail-genrsacert.sh:
Ignore output of renice command.
*netqmail-1.05-r2 (06 May 2006)
06 May 2006; Michael Hanselmann
+netqmail-1.05-r2.ebuild:
Added support for qmail-spp.
28 Apr 2006; Michael Hanselmann
Remove old ebuild.
27 Apr 2006; Michael Hanselmann
netqmail-1.05-r1.ebuild:
Fix configuration instruction as pointed out in bug 131160.
*netqmail-1.05-r1 (27 Apr 2006)
27 Apr 2006; Michael Hanselmann
+netqmail-1.05-r1.ebuild:
Fix TLS support.
01 Mar 2006; Michael Hanselmann
Added to ~sparc.
13 Feb 2006; Michael Hanselmann
Added to ~x86. Tested by Frank Schmitt.
*netqmail-1.05 (12 Feb 2006)
12 Feb 2006; Michael Hanselmann
+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.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
AUX 1.06-exit.patch 551 RMD160 4e37d5e052d949ce682691141a835e209de302a5 SHA1 9de0b915ab9bda742aabece4288538e4ff6b00c9 SHA256 400ab4719d145e29b08d266b38766b80d894d5473e4c4f3b5e436916a36a4333
AUX 99qmail 137 RMD160 bb1d8b76562c60df05b1e10811d479ca24fdad48 SHA1 d370193dd2be29226fecd399c3bef93aec0011b8 SHA256 b721c405ab3a13803c4647b98a3c0ffbdfb450e4a0f9e5476c1633470b0d6e50
AUX conf-common 2375 RMD160 d91ae642ba445e73232339f83e6664a2b311ec47 SHA1 49fed2319b8a91651f185a68832045d8be053beb SHA256 c51efbf910e000659ce38c0fa6c1647bad966a9e53a3a3f58d5049c7fec4c126
AUX conf-pop3d 1205 RMD160 041ee68f4681a963550ea7a96600236057ba5df6 SHA1 36f2e571d0c8a6c2880753df574993c68fed0b28 SHA256 92100277f9858cd65711fcae9662ef72d40a769b84f2ed9814e2062102836d76
AUX conf-qmqpd 463 RMD160 0270dc1ae6e9ca18b9ed1451d24207a780f22d8f SHA1 3e7e86de8e5f19395fb2ce0182be81a91fd00e53 SHA256 98ffb06e09db4329cbfb722446e18e9a127c4043b93cbbd9406cdf2c9841f381
AUX conf-qmtpd 555 RMD160 f8dd25475f07d8396a9685a4c9f33f945be98c85 SHA1 59e81f927121054e96552fe67e7869603a51279b SHA256 c46f2d4f0819f87a6f2e49d6d3499381f2aab36edd116a2ee20bd14cb0cb64d6
AUX conf-send 233 RMD160 acf0cb4879d20408d71db0cde93145b4bc7c3967 SHA1 f86e974d85bf3044412117ff2765d76d8f114bf1 SHA256 c4fcf9e1d82a2bcc95e943aa5f81c91cc14813c1bd9a55aec62b9e2506c50af6
AUX conf-smtpd 2069 RMD160 cb39b3486e2b7626bdfca047909b0a77a028acb7 SHA1 3a6b104d10c2437f90e0fc3a9f4ebd5ff82653f0 SHA256 b887d8d903f5a6c809fdf2ac548d7e7ba3fd2975a94c189fb0940a3c8872c966
AUX dot-qmail 82 RMD160 0576de46f687b2c9041fd48948a050ae82f2242e SHA1 ebdeb1c03a30654d7a7fae06cc4c9f53694905c8 SHA256 ceed2e098092a550d66778241149439871f5518ff2c71dc53ce05308b1a63a06
AUX mailer.conf 179 RMD160 32cee87ccbf2e090d04977e7bbdb87cb705feba6 SHA1 eca04dd1f6309442e8e41380f331fdcfe70529e7 SHA256 7f248612dc9bb4ca3f901d6a50b4ffb452deb1eb543da33bca89ed776c95cf23
AUX mkservercert 1444 RMD160 54a43b148a4f75e9f98a4748d89f641dfbc5bf4d SHA1 f2a1dfcd4951c7d1986d905ae2fe48c5131f793b SHA256 17d5f1f6122b9ef2b31af1b5d2c259601168cd1b09b75645dca634486f799d04
AUX qmail-config-system 2085 RMD160 5365264148b8fe5bf7a04e645fd3dadfa2fc3ae8 SHA1 1f4f39e90955cf8ab23745d86da4f5d06c84a910 SHA256 d77a3b498ac2fd88f839edf7b725208446dafa54a396113ffdfbd77d9e34ac38
AUX qmail-genrsacert.sh 1483 RMD160 eeaa4122136a149b0738a55df2bf0b0d6e405ba0 SHA1 ec85ff476e7503abf0d7dc8d403ea966636accd5 SHA256 8887a6ad9f288ffe3240a50bb6fc4d188799afd15d28ce5018d0f9e2a346a748
AUX run-qmail-pop3d 909 RMD160 c5b6af7e31f2e4446a03a7fb41c17a89f74b8302 SHA1 5d581799f712be34ebcc02f435ce3bedb9f7eb92 SHA256 1362b1c5e1125b70841992728eacc8fe14dc0e29c9198967c6c9a970ff0c1b27
AUX run-qmail-pop3d-log 322 RMD160 c8e371e4585d33250b8d0833d36ab31e3ef65688 SHA1 0e458d129b8030aed0fccb60b141ecf32018dbe6 SHA256 894ccd51aedffd6ac9dfc1dfd1d1d23ea23793557aa16313cb241fc2c3394ad9
AUX run-qmail-qmqpd 839 RMD160 ebc3c76fc86224642afb15703b812378ba6e03e3 SHA1 9913ce5267fb7f97740385d35910aba4202d6162 SHA256 d368c3f6ff85f41b537da19fbc4d0a5889f497c3e7f31687ee710406d8f235de
AUX run-qmail-qmqpd-log 322 RMD160 59e26864d1f0d91338c9185a4e6a9f2461f1c1c1 SHA1 f1bd6525c5679a39b3d010cbd0b0e661897826e6 SHA256 f13b40db98ef633bf9f1d6796f47826744c62ead62ead3d31eeb31f7a22e4d5e
AUX run-qmail-qmtpd 839 RMD160 e8c1f2f65f170ec3524b511e726ebd3897cf7132 SHA1 36c167b090c08ee11c265a5b6f67d2090ebb5347 SHA256 8fc04dfe3e5e1ffb1beef4790d087222f84404a29dcf4e3203707bd764e386cd
AUX run-qmail-qmtpd-log 322 RMD160 02fbe88335d775c42f1f00e8b922cce31bf6d341 SHA1 3dbdac8a5b29127ee9136ad51448ae0958822cba SHA256 b98e8e112823458eb006bfb9543ea884410e27a97be0a240ad110ab1d4d72e52
AUX run-qmail-send 267 RMD160 93757b9d1a1b971a0531a44e9ed2fd7109eb0720 SHA1 40e05e7d4e2ffae531983b4694c5a328144f8c93 SHA256 03c1cadb582d9810064a848424caf9fd35590260ca517dc1447d3722174aca07
AUX run-qmail-send-log 321 RMD160 0c2b9316973fc0e63d98d1b97e94ce18569a3809 SHA1 c23e371d7ea4564fa8c453222a80f1a5891f6ddb SHA256 3977df622fae12b1f4f0fbd9695ccfdfc0063882d6d76fb2b2678351c60713ab
AUX run-qmail-smtpd 839 RMD160 47cb9d50f5dc0654ddd6a4d4244e2e3a562a03e4 SHA1 a4443a249a710ed44a9cd6cc2a38b24dc2ecbbc2 SHA256 fda1d42ad010acb316694ce6827286b3daf7bac248ced93847e97cece8ffb12f
AUX run-qmail-smtpd-log 322 RMD160 975ca41bd0eb61174ad73278ec20b8527e69fb3f SHA1 8681da6f035f6222d2407e3f52c2d10291cc2d37 SHA256 c213418ca663ef28260e982f4250d0906ac3ca7991e8380b46b96ff48277cb8c
AUX servercert.cnf 1008 RMD160 63f70e9dbc23be7609bf5a5ba5c72c0592d42cad SHA1 8244dd421b47073a7483b70cab139f9e5e600993 SHA256 da0282f96e6dfd886d565c0793975ef0f1114cd59c2f8e310b7b3e7c57d8330c
AUX tcp.pop3.sample 517 RMD160 a518f0ac6c03a546ae032613d6aef6a298290419 SHA1 86ca8c304d18b4959c491b74e444eb28227f0381 SHA256 3f04ad47c10e7466ea9bd18b38bd809066734fb9616858bf75bb95e18e28253c
AUX tcp.qmqp.sample 571 RMD160 1c8b66938e2d803a3d302f53e8046cc754153d49 SHA1 c6309da68b65db411a7243d635e18719f8070ce3 SHA256 17dc778b0ad88b42f3f15f2bc94d3448b65bd5f436c5f21a92d0012be827cecc
AUX tcp.qmtp.sample 994 RMD160 54cff0d4a0355e6a043388c95d5c3320e70116ed SHA1 55e890e28b00171be406469fd25e65ea6c7d78b0 SHA256 d5c63cdb489a4675c58d13cd3dd977b874bffcada17861eae149960cb394932c
AUX tcp.smtp.sample 3582 RMD160 ee13640487ce1660969ea53760ec86eb12083887 SHA1 e629f07c1e19a1448a8dbc76a180e81a099ce372 SHA256 93a85748d29a997a208c557d059682cfac74bc532cd5efc561afdc02b2925d10
AUX tcprules.d-Makefile.qmail 132 RMD160 275cf670b111f0673be05c5bb6362943af34e1f2 SHA1 176f82b43e224b8d8aae22bc9bb458b263d17325 SHA256 505e202a5a28a036669e51d3fb51d3c02a3a35d76764c5e3f4fa0c43564a89d6
DIST big-todo.103.patch 5546 RMD160 a16a429796d869b8217e42b7ddb607c95d9bbcd8 SHA1 ba5c3923ff972a4f3ddd5ae1519938a4716612d1 SHA256 afa0a249e3271badd442f0bdae39997d9fe536157d8a0d62b6706f3dfcd11a72
DIST genqmail-20080406.tar.bz2 10252 RMD160 e6b2982447dbe3e92407435831469fba49fe3c9d SHA1 e825bc226d181105e8723360208d8c3f98142025 SHA256 501ca2120c7619569bd9ac3e0035cb0022bfd0cdc9c720b5c43c9e3a4eb07ce8
DIST netqmail-1.05-tls-smtpauth-20060105.patch 147837 RMD160 18a3edd3ea7e7a8e4d6cadbd3c0bd5e8cb041caa SHA1 1a0fb2367504a4c0f2196e13f753437f47d4b621 SHA256 326af9647e752e158f7672ca3fb592fe23c5f44502ddfcd6b5b6bc6c7ecf4c27
DIST netqmail-1.05-tls-smtpauth-20070417.patch 67942 RMD160 81a00e06fa67a4073b1a5bf5195fbbac675cd46b SHA1 d24cb13cf1371044fc2dfe20471478f59b5524e5 SHA256 573de07d57ac6941a42dda645079213cf36fcbb7f3a8c254b8447709e5e5cd60
DIST netqmail-1.05.tar.gz 252264 RMD160 e5bd8557c58a2686233449254b146e74389a7652 SHA1 fe4cbe97bd2f18a5ca1b36e4fbbd6c524256a829 SHA256 59788abf252e2da224542c1c8b727311335c61d990f24f4edf28f6eb5483f676
DIST netqmail-1.06.tar.gz 260941 RMD160 d31598afa862abb35bc1feb8d038ab619b5a17a2 SHA1 9ee9a603e2ad3d8e1d34b900e19b7a5d275f538b SHA256 8e7d98d15211fc9f9c28109e942e2268f42a6672d68df92a42f2afa90ff00532
DIST qmail-spp-0.42.tar.gz 18689 RMD160 5511722c52346692488a63bca53106d580a004c7 SHA1 76a94051b017dd331d8c791e466bb2a936ceba41 SHA256 1518e7e82d10fbbb8ecc520f51daf503edeb9c3a9fb935be65a8185e7b53808d
EBUILD netqmail-1.05-r4.ebuild 13065 RMD160 33165c43b34129289e2d8826bb2c974754b520bb SHA1 2420f7103d3be0f9ffca7e733ec8b876578bda47 SHA256 ee774b0d2fb1f63b0be9c015debba19d8ea0a5ee458028589a804cfa7fb391b2
EBUILD netqmail-1.05-r8.ebuild 13659 RMD160 7755297ca3d6fcdabb76d8b7b27d58169d04f468 SHA1 2381a6b7faf0207193dcaaf83445d802de5ccd42 SHA256 477da6e45564259e29e39dc0700d43de75a4b1c9404a8cc8558e56a2c7cac62b
EBUILD netqmail-1.06.ebuild 3330 RMD160 88122ed7837dd31d84640585faca09c671d801d2 SHA1 7dfefec42ac2331d4f01e16c8cf91564809d5fea SHA256 76e08ef0ef8fb823c219db37bf594a644ded317330fbc228fed2b1b92617825e
MISC ChangeLog 6786 RMD160 c2273da394e64f88bf50eeab67c1b1d1cdfb51f5 SHA1 65d7d2db4bb52745d777ce1ed8eb94a9bd999961 SHA256 000938a4fe869451f5f01f3bb21e4c9dcfbdcfe466e4292500346d7e13468ae4
MISC metadata.xml 471 RMD160 653d7a9d0cb70c4cc2a919d173d3c8a7699047fb SHA1 7a36aa646de5d31f8c2d521917cd7989c4531050 SHA256 e6459541b665becde89ffe335f74359b4d5c9ef320fa19bff02afd7ced4305bd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkivbqsACgkQoeSe8B0zEfwd+QCfaOMpeIK3DNbYUni9ECSg1kCo
klUAnizOt88Cd6kPpTXPM1+W9BazTZEY
=5qdB
-----END PGP SIGNATURE-----
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/netqmail-1.05-r4.ebuild,v 1.22 2007/12/03 21:36:57 robbat2 Exp $
inherit eutils toolchain-funcs fixheadtails flag-o-matic
TLS_AUTH_PATCH=20060105
QMAIL_SPP_PATCH=0.42
DESCRIPTION="qmail -- a secure, reliable, efficient, simple message transfer agent"
HOMEPAGE="
http://netqmail.org/
http://cr.yp.to/qmail.html
http://qmail.org/
"
SRC_URI="
mirror://qmail/netqmail-${PV}.tar.gz
!vanilla? (
ssl? ( http://shupp.org/patches/netqmail-${PV}-tls-smtpauth-${TLS_AUTH_PATCH}.patch )
highvolume? ( mirror://qmail/big-todo.103.patch )
qmail-spp? ( mirror://sourceforge/qmail-spp/qmail-spp-${QMAIL_SPP_PATCH}.tar.gz )
)
"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
IUSE="gencertdaily highvolume mailwrapper noauthcram qmail-spp ssl vanilla"
RESTRICT="test"
DEPEND="
!mail-mta/qmail
sys-apps/groff
net-mail/queue-repair
ssl? ( dev-libs/openssl )
"
RDEPEND="
mailwrapper? ( net-mail/mailwrapper )
!mailwrapper? ( !virtual/mta )
sys-apps/ucspi-tcp
sys-process/daemontools
net-mail/dot-forward
!noauthcram? (
|| ( >=net-mail/checkpassword-0.90 >=net-mail/checkpassword-pam-0.99 )
>=net-mail/cmd5checkpw-0.30
)
${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}"
QMAIL_SPP_S="${WORKDIR}/qmail-spp-${QMAIL_SPP_PATCH}"
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
use qmail-spp && \
unpack qmail-spp-${QMAIL_SPP_PATCH}.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
if use qmail-spp; then
if use ssl; then
epatch ${QMAIL_SPP_S}/qmail-spp-smtpauth-tls-20060105.diff
else
epatch ${QMAIL_SPP_S}/netqmail-spp.diff
fi
fi
fi
if [[ -n "${QMAIL_PATCH_DIR}" && -d "${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 "this feature. You're on your own from now!"
ebeep
epatch "${QMAIL_PATCH_DIR}/"*
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}."
# Fix bug #33818 but for netqmail (Bug 137015)
if use noauthcram; then
einfo "Disabling CRAM_MD5 support"
sed -e 's,^#define CRAM_MD5$,/*&*/,' -i ${MY_S}/qmail-smtpd.c
else
einfo "Enabled CRAM_MD5 support"
fi
ht_fix_file Makefile*
append-ldflags $(bindnow-flags)
use ssl && append-flags -DTLS
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"
insopts -m 644
doenvd ${FILESDIR}/99qmail
einfo "Creating sendmail replacement ..."
diropts -m 755
dodir /usr/sbin /usr/lib
if use mailwrapper
then
insinto /etc/mail
doins ${FILESDIR}/mailer.conf
else
dosym /var/qmail/bin/sendmail /usr/sbin/sendmail
dosym /var/qmail/bin/sendmail /usr/lib/sendmail
fi
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 ${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}
newins ${FILESDIR}/tcprules.d-Makefile.qmail Makefile.qmail
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 qmail-spp; then
einfo "Installing files for qmail-spp"
insinto /var/qmail/control/
doins ${QMAIL_SPP_S}/samples/smtpplugins
keepdir /var/qmail/plugins/
fi
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
elog "To setup qmail to run out-of-the-box on your system, run:"
elog "emerge --config =${CATEGORY}/${PF}"
elog
elog "To start qmail at boot you have to add svscan to your startup"
elog "and create the following links:"
elog "ln -s /var/qmail/supervise/qmail-send /service/qmail-send"
elog "ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd"
elog
elog "To start the pop3 server as well, create the following link:"
elog "ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d"
elog
elog "Additionally, the QMTP and QMQP protocols are supported, "
elog "and can be started as:"
elog "ln -s /var/qmail/supervise/qmail-qmtpd /service/qmail-qmtpd"
elog "ln -s /var/qmail/supervise/qmail-qmqpd /service/qmail-qmqpd"
elog
elog "Additionally, if you wish to run qmail right now, you should "
elog "run this before anything else:"
elog "source /etc/profile"
elog
elog "If you are looking for documentation, check those links:"
elog "http://www.gentoo.org/doc/en/qmail-howto.xml"
elog " -- qmail/vpopmail Virtual Mail Hosting System Guide"
elog "http://www.lifewithqmail.com/"
elog " -- 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
# 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
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
is_prime() {
local number=${1} i
for i in $(primes ${number} ${number})
do
[[ ${i} == ${number} ]] && return 0
done
return 1
}
# --- end of prime.eclass ---
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/netqmail-1.05-r8.ebuild,v 1.8 2007/12/03 21:36:57 robbat2 Exp $
inherit eutils toolchain-funcs fixheadtails flag-o-matic
TLS_AUTH_PATCH=20070417
QMAIL_SPP_PATCH=0.42
DESCRIPTION="qmail -- a secure, reliable, efficient, simple message transfer agent"
HOMEPAGE="
http://netqmail.org/
http://cr.yp.to/qmail.html
http://qmail.org/
"
SRC_URI="
mirror://qmail/netqmail-${PV}.tar.gz
!vanilla? (
ssl? ( http://shupp.org/patches/netqmail-${PV}-tls-smtpauth-${TLS_AUTH_PATCH}.patch )
highvolume? ( mirror://qmail/big-todo.103.patch )
qmail-spp? ( mirror://sourceforge/qmail-spp/qmail-spp-${QMAIL_SPP_PATCH}.tar.gz )
)
"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
IUSE="gencertdaily highvolume mailwrapper noauthcram qmail-spp ssl vanilla"
RESTRICT="test"
DEPEND="
!mail-mta/qmail
sys-apps/groff
net-mail/queue-repair
ssl? ( dev-libs/openssl )
"
RDEPEND="
mailwrapper? ( net-mail/mailwrapper )
!mailwrapper? ( !virtual/mta )
sys-apps/ucspi-tcp
sys-process/daemontools
net-mail/dot-forward
!noauthcram? (
|| ( >=net-mail/checkpassword-0.90 >=net-mail/checkpassword-pam-0.99 )
>=net-mail/cmd5checkpw-0.30
)
${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}"
QMAIL_SPP_S="${WORKDIR}/qmail-spp-${QMAIL_SPP_PATCH}"
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
use qmail-spp && \
unpack qmail-spp-${QMAIL_SPP_PATCH}.tar.gz
cd "${S}"
./collate.sh || die "patching failed"
cd "${MY_S}"
if ! use vanilla; then
use ssl && epatch ${DISTDIR}/netqmail-${PV}-tls-smtpauth-${TLS_AUTH_PATCH}.patch
if use highvolume; then
epatch ${DISTDIR}/big-todo.103.patch
fi
if use qmail-spp; then
if use ssl; then
epatch ${QMAIL_SPP_S}/qmail-spp-smtpauth-tls-20060105.diff
else
epatch ${QMAIL_SPP_S}/netqmail-spp.diff
fi
fi
fi
if [[ -n "${QMAIL_PATCH_DIR}" && -d "${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 "this feature. You're on your own from now!"
ebeep
epatch "${QMAIL_PATCH_DIR}/"*
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}."
# Fix bug #33818 but for netqmail (Bug 137015)
if use noauthcram; then
einfo "Disabling CRAM_MD5 support"
sed -e 's,^#define CRAM_MD5$,/*&*/,' -i ${MY_S}/qmail-smtpd.c
else
einfo "Enabled CRAM_MD5 support"
fi
ht_fix_file Makefile*
append-ldflags $(bindnow-flags)
# -DTLS is now set by the SSL/TLS patch
#use ssl && append-flags -DTLS
# The following commands patch the conf-{cc,ld} files to use the user's
# specified CFLAGS and LDFLAGS. These rather complex commands are needed
# because a user supplied patch might apply changes to these files, too.
# Fixes Bug #165981.
echo "$(head -n 1 "${MY_S}/conf-cc" | sed -e "s#^g\?cc\s\+\(-O2\)\?#$(tc-getCC) #")" \
"${CFLAGS}" > "${MY_S}/conf-cc.tmp" &&
mv "${MY_S}/conf-cc.tmp" "${MY_S}/conf-cc" || die 'Patching conf-cc failed.'
echo "$(head -n 1 "${MY_S}/conf-ld" | sed -e "s#^g\?cc\s\+\(-s\)\?#$(tc-getCC) #")" \
"${LDLAGS}" > "${MY_S}/conf-ld.tmp" &&
mv "${MY_S}/conf-ld.tmp" "${MY_S}/conf-ld" || die 'Patching conf-ld failed.'
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"
insopts -m 644
doenvd ${FILESDIR}/99qmail
einfo "Creating sendmail replacement ..."
diropts -m 755
dodir /usr/sbin /usr/lib
if use mailwrapper
then
insinto /etc/mail
doins ${FILESDIR}/mailer.conf
else
dosym /var/qmail/bin/sendmail /usr/sbin/sendmail
dosym /var/qmail/bin/sendmail /usr/lib/sendmail
fi
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 ${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}
newins ${FILESDIR}/tcprules.d-Makefile.qmail Makefile.qmail
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 qmail-spp; then
einfo "Installing files for qmail-spp"
insinto /var/qmail/control/
doins ${QMAIL_SPP_S}/samples/smtpplugins
keepdir /var/qmail/plugins/
fi
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
elog "Previously the qmail ebuilds created /root/.maildir/ but not"
elog "every mail was delivered there. If the directory does not"
elog "contain any mail, please delete it and run:"
elog "${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
elog "To setup qmail to run out-of-the-box on your system, run:"
elog "emerge --config =${CATEGORY}/${PF}"
elog
elog "To start qmail at boot you have to add svscan to your startup"
elog "and create the following links:"
elog "ln -s /var/qmail/supervise/qmail-send /service/qmail-send"
elog "ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd"
elog
elog "To start the pop3 server as well, create the following link:"
elog "ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d"
elog
elog "Additionally, the QMTP and QMQP protocols are supported, "
elog "and can be started as:"
elog "ln -s /var/qmail/supervise/qmail-qmtpd /service/qmail-qmtpd"
elog "ln -s /var/qmail/supervise/qmail-qmqpd /service/qmail-qmqpd"
elog
elog "Additionally, if you wish to run qmail right now, you should "
elog "run this before anything else:"
elog "source /etc/profile"
elog
elog "If you are looking for documentation, check those links:"
elog "http://www.gentoo.org/doc/en/qmail-howto.xml"
elog " -- qmail/vpopmail Virtual Mail Hosting System Guide"
elog "http://www.lifewithqmail.com/"
elog " -- 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
# 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
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
is_prime() {
local number=${1} i
for i in $(primes ${number} ${number})
do
[[ ${i} == ${number} ]] && return 0
done
return 1
}
# --- end of prime.eclass ---
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/netqmail-1.06.ebuild,v 1.1 2008/04/06 17:16:39 hollow Exp $
GENQMAIL_PV=20080406
QMAIL_SPP_PV=0.42
QMAIL_TLS_PV=20070417
QMAIL_TLS_F=${PN}-1.05-tls-smtpauth-${QMAIL_TLS_PV}.patch
QMAIL_BIGTODO_PV=103
QMAIL_BIGTODO_F=big-todo.${QMAIL_BIGTODO_PV}.patch
inherit eutils qmail
DESCRIPTION="qmail -- a secure, reliable, efficient, simple message transfer agent"
HOMEPAGE="
http://netqmail.org
http://cr.yp.to/qmail.html
http://qmail.org
"
SRC_URI="mirror://qmail/${P}.tar.gz
http://dev.gentoo.org/~hollow/distfiles/${GENQMAIL_F}
!vanilla? (
highvolume? ( mirror://qmail/${QMAIL_BIGTODO_F} )
qmail-spp? ( mirror://sourceforge/qmail-spp/${QMAIL_SPP_F} )
ssl? ( http://shupp.org/patches/${QMAIL_TLS_F} )
)
"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="authcram gencertdaily highvolume mailwrapper qmail-spp ssl vanilla"
RESTRICT="test"
DEPEND="
!mail-mta/qmail
net-mail/queue-repair
ssl? ( dev-libs/openssl )
"
RDEPEND="
mailwrapper? ( net-mail/mailwrapper )
!mailwrapper? ( !virtual/mta )
>=sys-apps/ucspi-tcp-0.88-r17
ssl? ( >=sys-apps/ucspi-ssl-0.70-r1 )
>=sys-process/daemontools-0.76-r6
>=net-mail/dot-forward-0.71-r3
virtual/checkpassword
authcram? ( >=net-mail/cmd5checkpw-0.30 )
${DEPEND}
"
PROVIDE="
virtual/mta
virtual/mda
"
pkg_setup() {
if [[ -n "${QMAIL_PATCH_DIR}" ]]; then
eerror
eerror "The QMAIL_PATCH_DIR variable for custom patches"
eerror "has been removed from ${PN}. If you need custom patches"
eerror "you should create a copy of this ebuild in an overlay."
eerror
die "QMAIL_PATCH_DIR is not supported anymore"
fi
qmail_create_users
}
src_unpack() {
genqmail_src_unpack
use qmail-spp && qmail_spp_src_unpack
unpack ${P}.tar.gz
cd "${S}"
epatch "${FILESDIR}"/${PV}-exit.patch
ht_fix_file Makefile*
if ! use vanilla; then
use ssl && epatch "${DISTDIR}"/${QMAIL_TLS_F}
use highvolume && epatch "${DISTDIR}"/${QMAIL_BIGTODO_F}
if use qmail-spp; then
if use ssl; then
epatch "${QMAIL_SPP_S}"/qmail-spp-smtpauth-tls-20060105.diff
else
epatch "${QMAIL_SPP_S}"/netqmail-spp.diff
fi
fi
fi
qmail_src_postunpack
# Fix bug #33818 but for netqmail (Bug 137015)
if ! use authcram; then
einfo "Disabled CRAM_MD5 support"
sed -e 's,^#define CRAM_MD5$,/*&*/,' -i "${S}"/qmail-smtpd.c
else
einfo "Enabled CRAM_MD5 support"
fi
}
src_compile() {
qmail_src_compile
use qmail-spp && qmail_spp_src_compile
}
src_install() {
qmail_src_install
}
pkg_postinst() {
qmail_queue_setup
qmail_rootmail_fixup
qmail_tcprules_build
# for good measure
env-update
qmail_config_notice
qmail_supervise_config_notice
elog
elog "If you are looking for documentation, check those links:"
elog "http://www.gentoo.org/doc/en/qmail-howto.xml"
elog " -- qmail/vpopmail Virtual Mail Hosting System Guide"
elog "http://www.lifewithqmail.com/"
elog " -- Life with qmail"
elog
}
pkg_preinst() {
qmail_tcprules_fixup
}
pkg_config() {
# avoid some weird locale problems
export LC_ALL=C
qmail_config_fast
qmail_tcprules_config
qmail_tcprules_build
use ssl && qmail_ssl_generate
}