summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hanselmann <hansmi@gentoo.org>2006-06-17 00:29:36 +0000
committerMichael Hanselmann <hansmi@gentoo.org>2006-06-17 00:29:36 +0000
commit87522e41c7aad3b9483fc886b6f7f615cb20daa3 (patch)
tree7fbe9701e579918084ef03ed55a3ebc030531e75 /mail-mta
parentAdded support for noauthcram USE flag, bug #137015. (diff)
downloadhistorical-87522e41c7aad3b9483fc886b6f7f615cb20daa3.tar.gz
historical-87522e41c7aad3b9483fc886b6f7f615cb20daa3.tar.bz2
historical-87522e41c7aad3b9483fc886b6f7f615cb20daa3.zip
Added support for noauthcram USE flag, bug #137015.
Package-Manager: portage-2.1
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/netqmail/Manifest22
-rw-r--r--mail-mta/netqmail/files/digest-netqmail-1.05-r212
-rw-r--r--mail-mta/netqmail/netqmail-1.05-r2.ebuild452
3 files changed, 11 insertions, 475 deletions
diff --git a/mail-mta/netqmail/Manifest b/mail-mta/netqmail/Manifest
index 1dc9226fc7be..8960b5b0480f 100644
--- a/mail-mta/netqmail/Manifest
+++ b/mail-mta/netqmail/Manifest
@@ -110,25 +110,25 @@ DIST big-todo.103.patch 5546 RMD160 a16a429796d869b8217e42b7ddb607c95d9bbcd8 SHA
DIST netqmail-1.05-tls-smtpauth-20060105.patch 147837 RMD160 18a3edd3ea7e7a8e4d6cadbd3c0bd5e8cb041caa SHA1 1a0fb2367504a4c0f2196e13f753437f47d4b621 SHA256 326af9647e752e158f7672ca3fb592fe23c5f44502ddfcd6b5b6bc6c7ecf4c27
DIST netqmail-1.05.tar.gz 252264 RMD160 e5bd8557c58a2686233449254b146e74389a7652 SHA1 fe4cbe97bd2f18a5ca1b36e4fbbd6c524256a829 SHA256 59788abf252e2da224542c1c8b727311335c61d990f24f4edf28f6eb5483f676
DIST qmail-spp-0.42.tar.gz 18689 RMD160 5511722c52346692488a63bca53106d580a004c7 SHA1 76a94051b017dd331d8c791e466bb2a936ceba41 SHA256 1518e7e82d10fbbb8ecc520f51daf503edeb9c3a9fb935be65a8185e7b53808d
-EBUILD netqmail-1.05-r2.ebuild 12454 RMD160 5e72de73b54ec2d9f97c05714dc326bb90076d5c SHA1 898cfdf3d954f4e50ec64474c7f8388bc98bac9b SHA256 1ac8759db16b0b88cd3d514e1d5b6258f57ab416900123f69bdd3dfa36fc2631
-MD5 267e25438e84a9b84782dfa36c91bd3e netqmail-1.05-r2.ebuild 12454
-RMD160 5e72de73b54ec2d9f97c05714dc326bb90076d5c netqmail-1.05-r2.ebuild 12454
-SHA256 1ac8759db16b0b88cd3d514e1d5b6258f57ab416900123f69bdd3dfa36fc2631 netqmail-1.05-r2.ebuild 12454
EBUILD netqmail-1.05-r3.ebuild 12613 RMD160 53b47357493f4d7601b7b57e3427797b06185b30 SHA1 e2992a16eac20996d95825bb4f644a50ded1c67d SHA256 b593a8920fdc23a83832cda84212cec538ccf96f542e551c886215cd5651ac57
MD5 1d2716c127cd3506b1b4fb0cbeb4a28a netqmail-1.05-r3.ebuild 12613
RMD160 53b47357493f4d7601b7b57e3427797b06185b30 netqmail-1.05-r3.ebuild 12613
SHA256 b593a8920fdc23a83832cda84212cec538ccf96f542e551c886215cd5651ac57 netqmail-1.05-r3.ebuild 12613
-MISC ChangeLog 2138 RMD160 0f3cd306c4c091f46b367c7207f645d0888fe7f7 SHA1 e6af300903ae52e8134feff22c18baa75e151240 SHA256 1ddcdb27a9fc358bcba3e8fc52d5fd11f9de9b767d4b39534895fd7fcb922968
-MD5 484e63e6d97c7694f99fe9704f6507b1 ChangeLog 2138
-RMD160 0f3cd306c4c091f46b367c7207f645d0888fe7f7 ChangeLog 2138
-SHA256 1ddcdb27a9fc358bcba3e8fc52d5fd11f9de9b767d4b39534895fd7fcb922968 ChangeLog 2138
+EBUILD netqmail-1.05-r4.ebuild 12973 RMD160 cd8f03134db25455ca17e0abc0906f42005e566b SHA1 959fdd334907ad55a49d0f784ff781da9695dfc9 SHA256 d0e1ba86a8fad706fdc2d82617f25c76e6d16a637b1882f4044dd737805b151b
+MD5 089664480b74c026fd09bcbda523317c netqmail-1.05-r4.ebuild 12973
+RMD160 cd8f03134db25455ca17e0abc0906f42005e566b netqmail-1.05-r4.ebuild 12973
+SHA256 d0e1ba86a8fad706fdc2d82617f25c76e6d16a637b1882f4044dd737805b151b netqmail-1.05-r4.ebuild 12973
+MISC ChangeLog 2431 RMD160 59c9022793daa13df33fdcfc262a220156a80d1d SHA1 6556673737bcde4650e30cf83fbc01cb2b0d0eb3 SHA256 9835241f189e14ca3ef5a8423b2924c8edbbb0e630886192339686b56ecffc4f
+MD5 dcec0053c6fa4821ecfb689120dd1133 ChangeLog 2431
+RMD160 59c9022793daa13df33fdcfc262a220156a80d1d ChangeLog 2431
+SHA256 9835241f189e14ca3ef5a8423b2924c8edbbb0e630886192339686b56ecffc4f ChangeLog 2431
MISC metadata.xml 278 RMD160 be877359df23e815e5acd94ecc97df2560671fa7 SHA1 2ea5039fde031f70169844e9ff5bcd4a20e32666 SHA256 0d8d56eeab2c34a34acb9f558c9198d843e4666bdbe061f6ec87ab4396a75d2a
MD5 1f12f659d2cf9550971387cb78c2f0af metadata.xml 278
RMD160 be877359df23e815e5acd94ecc97df2560671fa7 metadata.xml 278
SHA256 0d8d56eeab2c34a34acb9f558c9198d843e4666bdbe061f6ec87ab4396a75d2a metadata.xml 278
-MD5 b3f63b32fd284e450fa4c057fd563f8b files/digest-netqmail-1.05-r2 1015
-RMD160 225c6860fbfcaf81c448c51d02aff3bd73fa1a44 files/digest-netqmail-1.05-r2 1015
-SHA256 a36f48dee042213e5b7ac5f480422db5bbec2f1d6fa5cf1b623a213d5def387e files/digest-netqmail-1.05-r2 1015
MD5 b3f63b32fd284e450fa4c057fd563f8b files/digest-netqmail-1.05-r3 1015
RMD160 225c6860fbfcaf81c448c51d02aff3bd73fa1a44 files/digest-netqmail-1.05-r3 1015
SHA256 a36f48dee042213e5b7ac5f480422db5bbec2f1d6fa5cf1b623a213d5def387e files/digest-netqmail-1.05-r3 1015
+MD5 b3f63b32fd284e450fa4c057fd563f8b files/digest-netqmail-1.05-r4 1015
+RMD160 225c6860fbfcaf81c448c51d02aff3bd73fa1a44 files/digest-netqmail-1.05-r4 1015
+SHA256 a36f48dee042213e5b7ac5f480422db5bbec2f1d6fa5cf1b623a213d5def387e files/digest-netqmail-1.05-r4 1015
diff --git a/mail-mta/netqmail/files/digest-netqmail-1.05-r2 b/mail-mta/netqmail/files/digest-netqmail-1.05-r2
deleted file mode 100644
index 4b66db348c5a..000000000000
--- a/mail-mta/netqmail/files/digest-netqmail-1.05-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-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
-MD5 384372f60ba2c1071601d0fea1f221ec qmail-spp-0.42.tar.gz 18689
-RMD160 5511722c52346692488a63bca53106d580a004c7 qmail-spp-0.42.tar.gz 18689
-SHA256 1518e7e82d10fbbb8ecc520f51daf503edeb9c3a9fb935be65a8185e7b53808d qmail-spp-0.42.tar.gz 18689
diff --git a/mail-mta/netqmail/netqmail-1.05-r2.ebuild b/mail-mta/netqmail/netqmail-1.05-r2.ebuild
deleted file mode 100644
index 81813ebe996a..000000000000
--- a/mail-mta/netqmail/netqmail-1.05-r2.ebuild
+++ /dev/null
@@ -1,452 +0,0 @@
-# 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-r2.ebuild,v 1.1 2006/05/06 18:09:50 hansmi 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://cr.yp.to/qmail.html
- http://www.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="as-is"
-SLOT="0"
-KEYWORDS="~ppc ~sparc ~x86"
-IUSE="gencertdaily highvolume ssl vanilla qmail-spp"
-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}"
-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}" ]]
- 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_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)
-
- 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"
- 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 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
-
- einfo "To setup qmail to run out-of-the-box on your system, run:"
- einfo "emerge --config =${CATEGORY}/${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 ---