add opensmtpd

This commit is contained in:
Alexander Miroshnichenko 2020-01-06 12:29:37 +03:00
parent ed39e6ab34
commit c67881c214
Signed by: alex
GPG Key ID: E93720C6C73A77F4
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
}

3
net-libs/libasr/Manifest Normal file
View File

@ -0,0 +1,3 @@
DIST libasr-1.0.3.tar.gz 657592 BLAKE2B 7f65f27d247ebc4b29f5ef5bf84c61fc67f809bb4398d0a6cfcaa88c8faae878079b1d9d9b76fcd28493b248f7123816f0cf6e75f44687fba6b6c924159ee0e7 SHA512 1d4e1125665a7b911119f65aab391189712abf10b783f07d58b4988689f2da80d7afd79bf3511659770f231d3e303dec55467da0b7db272eb12d5aa06e60df72
EBUILD libasr-1.0.3.ebuild 481 BLAKE2B 5b95519650a7d065f90874e7ba2808cad696fa56b41de6845af25d2169b876f2ce05433078a53715fcbfc288e262067414670b2fe887b5e9c5e13910bc3bee38 SHA512 331153b3a8839f9af72d907dea189b0aac1b3ead15e3dc76b193080e1ad6cc4c8d29bf454d80b1669824fdff0686994e9630ab27f94cc20f39ad2be0d823cacd
MISC metadata.xml 331 BLAKE2B fb0ff46381f7fa14f0fd15ffda08e378a5a88e9771ce464ad813e4c8cf7d2146ca45b2c2cc8c13756bdae2413758f7cba2c68cf4752405359f311eca700c7fbb SHA512 dedfef00a1e0f26438a1e0fbc9b53fc64566bd6def05260410d21aa3ff941ef0c5c9dbc205b3516052b0409943acbfb431e4702c87d1c94e9950ab9492f68850

View File

@ -0,0 +1,23 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils autotools
DESCRIPTION="Async Resolver Library from OpenBSD/OpenSMTPD"
HOMEPAGE="https://github.com/OpenSMTPD/libasr"
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=""
DEPEND="dev-libs/libbsd"
RDEPEND="${DEPEND}"
src_prepare(){
default
eautoreconf
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>zx2c4@gentoo.org</email>
<name>Jason A. Donenfeld</name>
</maintainer>
<upstream>
<remote-id type="github">OpenSMTPD/libasr</remote-id>
</upstream>
</pkgmetadata>