add opensmtpd

This commit is contained in:
2020-01-06 12:29:37 +03:00
parent ed39e6ab34
commit c67881c214
9 changed files with 159 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
AUX smtpd.initd 231 BLAKE2B a4991c9226daa2289cb20238dcee0dad8b4ff83474327649b61c7394e46fc929c7792b885f58bf76769567ad2058134b97e5019b508e2edec108a4bafb9cc2b4 SHA512 e4c8386bd7e8d8171172aa181305a55ca67cba6d4c82d77d8846e1bd3301dd9d118bb39dad6c144677f050194de813e4d83e06ea6dd591d4f07da8c4a1edde37
AUX smtpd.pam 147 BLAKE2B 1706fe27cf53621428f563af146d1197dfc59133dda79fe08141ec4ca9b240880ef63da3f27e4fb8b653af4ae413ca42cdeb343e1f4e737b7e6258c0d338223d SHA512 d0574cc732138fefffe3ca78da2d689f0849de70dfd65204c99a98a58b2165eb46b23a1c32b356ea2eaf8abd56a4929c7419b29cec1d6b284e344680bab24086
AUX smtpd.service 138 BLAKE2B c76db1847110622621701cdf1fdb764d26bf28b86a25adf9ae8e0ba15838a2a9ddc677f54f5d5fe191591b2bd5c7f20067fc00b6679f448e25371e27f231589d SHA512 b70b173ac275b871d78bac0e55b2e0c8d8a6538c7f2c4dc86fe67fb37a1ee942e0442353b338b286759618299f51b144396251db13f82c9afa035dcaae11a258
AUX smtpd.socket 114 BLAKE2B e684727be39592dce128cc0ab02f8e5bc4510591dcb2c170b49c120e84319b53e10eae275bc6a26ed8c9d51e53a21e41c551f18afd2441602cefc4e93344d50c SHA512 fbbccb4aab80a4a4612609e590965940642321119a65359cf2490530f81d55706a0105309d321a624d40348f12776724d2cf6b8bf29ea24391e60ef8b8bc8ba2
DIST opensmtpd-6.6.1p1.tar.gz 776538 BLAKE2B 58eba39a43c2f9bf0772bf91545b54e9dc2aa33b232a8188ac21912ec4fe7ada1e90eac68d9aab21fbdf904ca93b0056c8039edb685be3ad8aa8f2be3913af79 SHA512 8861c2b3d8560217750482694b007e43226033f31c13efa3e705e8d70a172ee30784ba335587ffc5c27fb356f765c696be7b9055c26bf2cd720cd0aa960861ad
EBUILD opensmtpd-6.6.1_p1.ebuild 2064 BLAKE2B a341885b88f26e99eab28569f0cddd6260c5a41616f7f456e9e94021ccded79cdb4363d5a460c38e9d79855781687f8a4f8d44cc3c41b2028c51d898c690ba80 SHA512 f9927c61ccff8b6e25e1173abcd78f25b42d79fc9480b5f439c827fe80777e511ec43015cffce64ff9ad08e42968f159172153791bbf6e1a92fa00332d184a1b

View File

@@ -0,0 +1,11 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
command="smtpd"
pidfile="/run/smtpd.pid"
description="SMTP daemon from OpenBSD"
depend() {
need net
}

View File

@@ -0,0 +1,4 @@
auth required pam_nologin.so
auth include system-auth
account include system-auth
session include system-auth

View File

@@ -0,0 +1,10 @@
[Unit]
Description=OpenSMTPD
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/smtpd
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,8 @@
[Unit]
Description=OpenSMTPD Socket
[Socket]
ListenStream=/var/run/smtpd.sock
[Install]
WantedBy=sockets.target

View File

@@ -0,0 +1,83 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit multilib user flag-o-matic eutils pam toolchain-funcs autotools systemd
DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD"
HOMEPAGE="https://www.opensmtpd.org"
SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz"
LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="pam +mta"
DEPEND=">=dev-libs/libressl-3
elibc_musl? ( sys-libs/fts-standalone )
sys-libs/zlib
pam? ( sys-libs/pam )
sys-libs/db:=
dev-libs/libevent
app-misc/ca-certificates
net-mail/mailbase
net-libs/libasr
!mail-mta/courier
!mail-mta/esmtp
!mail-mta/exim
!mail-mta/mini-qmail
!mail-mta/msmtp[mta]
!mail-mta/netqmail
!mail-mta/nullmailer
!mail-mta/postfix
!mail-mta/qmail-ldap
!mail-mta/sendmail
!mail-mta/ssmtp[mta]
"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${P/_}
src_configure() {
tc-export AR
AR="$(which "$AR")" econf \
--with-table-db \
--with-user-smtpd=smtpd \
--with-user-queue=smtpq \
--with-group-queue=smtpq \
--with-path-socket=/run \
--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
--sysconfdir=/etc/opensmtpd \
$(use_with pam auth-pam)
}
src_install() {
default
newinitd "${FILESDIR}"/smtpd.initd smtpd
systemd_dounit "${FILESDIR}"/smtpd.{service,socket}
use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd
dosym /usr/sbin/smtpctl /usr/sbin/makemap
dosym /usr/sbin/smtpctl /usr/sbin/newaliases
if use mta ; then
dodir /usr/sbin
dosym /usr/sbin/smtpctl /usr/sbin/sendmail
dosym /usr/sbin/smtpctl /usr/bin/sendmail
dosym /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail
fi
}
pkg_preinst() {
enewgroup smtpd 25
enewuser smtpd 25 -1 /var/empty smtpd
enewgroup smtpq 252
enewuser smtpq 252 -1 /var/empty smtpq
}
pkg_postinst() {
einfo
einfo "Plugins for SQLite, MySQL, PostgreSQL, LDAP, socketmaps,"
einfo "Redis, and many other useful addons and filters are"
einfo "available in the mail-filter/opensmtpd-extras package."
einfo
}