From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7EE0E138334 for ; Sun, 27 Oct 2019 19:24:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 834BFE08FE; Sun, 27 Oct 2019 19:24:42 +0000 (UTC) Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0CCACE08F4 for ; Sun, 27 Oct 2019 19:24:41 +0000 (UTC) Received: (qmail 1781 invoked from network); 27 Oct 2019 19:19:53 -0000 Received: from dslc-082-083-019-014.pools.arcor-ip.net ([::ffff:82.83.19.14]:52702 HELO daneel.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.36dev) with (DHE-RSA-AES256-GCM-SHA384 encrypted) ESMTPSA for ; Sun, 27 Oct 2019 20:19:53 +0100 From: Rolf Eike Beer To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] qmail.eclass: hide qmail-pop3 behind a use flag Date: Sun, 27 Oct 2019 20:24:31 +0100 Message-ID: <2122180.UaZveaQmRR@daneel.sf-tec.de> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1902104.2sBz4mIrYU"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-Archives-Salt: f7eba72f-8ced-438a-90a1-9bbe4cd9727d X-Archives-Hash: 7c6e06b10d40d8f7f9a2564d8c41e319 --nextPart1902104.2sBz4mIrYU Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Other solutions offer much more features and better security, so do not install this by default. Keep it for the moment for those who explicitely want it. diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass index b6ef483aa82..5a30461704e 100644 --- a/eclass/qmail.eclass +++ b/eclass/qmail.eclass @@ -169,11 +169,13 @@ qmail_full_install() { einfo "Installing all qmail software" insopts -o root -g qmail -m 755 doins bouncesaying condredirect config-fast except preline qbiff \ - qmail-{pop3d,qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \ + qmail-{qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \ qreceipt qsmhook tcp-env + use pop3 && doins qmail-pop3d insopts -o root -g qmail -m 711 - doins qmail-{clean,getpw,local,popup,pw2u,remote,rspawn,send} splogger + doins qmail-{clean,getpw,local,pw2u,remote,rspawn,send} splogger + use pop3 && doins qmail-popup insopts -o root -g qmail -m 700 doins qmail-{lspawn,newmrh,newu,start} @@ -261,7 +263,13 @@ qmail_tcprules_install() { insopts -o root -g "$GROUP_ROOT" -m 0644 doins "${GENQMAIL_S}"/tcprules/Makefile.qmail doins "${GENQMAIL_S}"/tcprules/tcp.qmail-* - use ssl || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd + use ssl && use pop3 || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd +} + +qmail_supervise_install_one() { + dosupervise ${i} + diropts -o qmaill -g "$GROUP_ROOT" -m 755 + keepdir /var/log/qmail/${i} } qmail_supervise_install() { @@ -269,16 +277,13 @@ qmail_supervise_install() { cd "${GENQMAIL_S}"/supervise - for i in qmail-{send,smtpd,qmtpd,qmqpd,pop3d}; do - dosupervise ${i} - diropts -o qmaill -g "$GROUP_ROOT" -m 755 - keepdir /var/log/qmail/${i} + for i in qmail-{send,smtpd,qmtpd,qmqpd}; do + qmail_supervise_install_one ${i} done - if use ssl; then - dosupervise qmail-pop3sd - diropts -o qmaill -g "$GROUP_ROOT" -m 755 - keepdir /var/log/qmail/qmail-pop3sd + if use pop3; then + qmail_supervise_install_one qmail-pop3d + use ssl && qmail_supervise_install_one qmail-pop3sd fi declare -F qmail_supervise_install_hook >/dev/null && \ @@ -375,7 +380,9 @@ qmail_rootmail_fixup() { qmail_tcprules_fixup() { mkdir -p "${TCPRULES_DIR}" - for f in {smtp,qmtp,qmqp,pop3}{,.cdb}; do + local POP_FILES= + use pop3 && POP_FILES="pop3 pop3.cdb" + for f in {smtp,qmtp,qmqp}{,.cdb} ${POP_FILES}; do old="/etc/tcp.${f}" new="${TCPRULES_DIR}/tcp.qmail-${f}" fail=0 @@ -417,13 +424,15 @@ qmail_supervise_config_notice() { elog "ln -s ${SUPERVISE_DIR}/qmail-send /service/qmail-send" elog "ln -s ${SUPERVISE_DIR}/qmail-smtpd /service/qmail-smtpd" elog - elog "To start the pop3 server as well, create the following link:" - elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d" - elog - if use ssl; then - elog "To start the pop3s server as well, create the following link:" - elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd /service/qmail-pop3sd" + if use pop3; then + elog "To start the pop3 server as well, create the following link:" + elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d" elog + if use ssl; then + elog "To start the pop3s server as well, create the following link:" + elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd /service/qmail-pop3sd" + elog + fi fi elog "Additionally, the QMTP and QMQP protocols are supported, " elog "and can be started as:" --nextPart1902104.2sBz4mIrYU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSaYVDeqwKa3fTXNeNcpIk+abn8TgUCXbXu7wAKCRBcpIk+abn8 TspqAJ9TuzFm06dQMTsX5c84p+dTHh2FngCfYd2EguUAAyR+pNsb6qDdn3zhvXM= =FuuE -----END PGP SIGNATURE----- --nextPart1902104.2sBz4mIrYU--