diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
| commit | c82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch) | |
| tree | 56d864b5a5c6c145edd96178ae219a8f90e191a6 /opt/opensmtpd | |
| download | ports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz | |
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'opt/opensmtpd')
| -rw-r--r-- | opt/opensmtpd/.footprint | 60 | ||||
| -rw-r--r-- | opt/opensmtpd/.signature | 6 | ||||
| -rw-r--r-- | opt/opensmtpd/MAKEPKG | 125 |
3 files changed, 191 insertions, 0 deletions
diff --git a/opt/opensmtpd/.footprint b/opt/opensmtpd/.footprint new file mode 100644 index 0000000..2d1900b --- /dev/null +++ b/opt/opensmtpd/.footprint @@ -0,0 +1,60 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/mail/ +-rw-r--r-- root/root etc/mail/aliases +-rw-r--r-- root/root etc/mail/smtpd.conf +drwxr-xr-x root/root etc/sv/ +drwxr-xr-x root/root etc/sv/smtpd/ +-rwxr-xr-x root/root etc/sv/smtpd/run +drwxr-xr-x root/root etc/sv/smtpd/log/ +-rwxr-xr-x root/root etc/sv/smtpd/log/run +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/smtp +-r-xr-sr-x root/root usr/bin/smtpctl +-rwxr-xr-x root/root usr/bin/smtpd +lrwxrwxrwx root/root usr/bin/sendmail -> smtpctl +drwxr-xr-x root/root usr/lib/ +lrwxrwxrwx root/root usr/lib/sendmail -> /usr/bin/smtpctl +drwxr-xr-x root/root usr/libexec/ +drwxr-xr-x root/root usr/libexec/opensmtpd/ +-rwxr-xr-x root/root usr/libexec/opensmtpd/encrypt +-r-sr-xr-x root/root usr/libexec/opensmtpd/lockspool +-rwxr-xr-x root/root usr/libexec/opensmtpd/mail.lmtp +-rwxr-xr-x root/root usr/libexec/opensmtpd/mail.local +-rwxr-xr-x root/root usr/libexec/opensmtpd/mail.maildir +-rwxr-xr-x root/root usr/libexec/opensmtpd/mail.mboxfile +-rwxr-xr-x root/root usr/libexec/opensmtpd/mail.mda +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/lockspool.1.gz +-rw-r--r-- root/root usr/share/man/man1/smtp.1.gz +drwxr-xr-x root/root usr/share/man/man5/ +-rw-r--r-- root/root usr/share/man/man5/aliases.5.gz +-rw-r--r-- root/root usr/share/man/man5/forward.5.gz +-rw-r--r-- root/root usr/share/man/man5/smtpd.conf.5.gz +-rw-r--r-- root/root usr/share/man/man5/table.5.gz +drwxr-xr-x root/root usr/share/man/man7/ +-rw-r--r-- root/root usr/share/man/man7/smtpd-filters.7.gz +-rw-r--r-- root/root usr/share/man/man7/smtpd-tables.7.gz +drwxr-xr-x root/root usr/share/man/man8/ +-rw-r--r-- root/root usr/share/man/man8/mail.lmtp.8.gz +-rw-r--r-- root/root usr/share/man/man8/mail.local.8.gz +-rw-r--r-- root/root usr/share/man/man8/mail.maildir.8.gz +-rw-r--r-- root/root usr/share/man/man8/mail.mboxfile.8.gz +-rw-r--r-- root/root usr/share/man/man8/mail.mda.8.gz +-rw-r--r-- root/root usr/share/man/man8/makemap.8.gz +-rw-r--r-- root/root usr/share/man/man8/newaliases.8.gz +-rw-r--r-- root/root usr/share/man/man8/sendmail.8.gz +-rw-r--r-- root/root usr/share/man/man8/smtpctl.8.gz +-rw-r--r-- root/root usr/share/man/man8/smtpd.8.gz +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwxr-xr-x root/root var/lib/pkg/ +drwxr-xr-x root/root var/lib/pkg/meta/ +-rw-r--r-- root/root var/lib/pkg/meta/opensmtpd +drwxr-xr-x root/root var/spool/ +drwx--x--x root/root var/spool/smtpd/ +drwxrwx--- root/root var/spool/smtpd/offline/ +drwx------ root/root var/spool/smtpd/purge/ +drwx------ root/root var/spool/smtpd/queue/ diff --git a/opt/opensmtpd/.signature b/opt/opensmtpd/.signature new file mode 100644 index 0000000..696624a --- /dev/null +++ b/opt/opensmtpd/.signature @@ -0,0 +1,6 @@ +RWTZ9IduCSQ/mEsDbKjmh7wT+mCF8J60aNhOmEow4OU0AqX7UMWvck+kaZ9KTg3TskUsNvOgCaZnGxtR5oPIp16bt8PEhwUCMAs= + +SHA256 (MAKEPKG) = b963867f62220ca9f7890df3716e90ee1998903072db7f6cc18a19b89b01094b +SHA256 (.footprint) = 90f46dc91bfa22446e79d1addb6df8d2a973acacb43fb7e86d0fa988716db7e4 +SHA256 (opensmtpd-7.9.0p0.tar.gz) = 74e640de18a8ea63ef43ba2ddb1a6ad1eb82cce2e600b94e98cb551bb2a724c4 +SHA256 (opensmtpd#7.9.0p0-2.pkg.tar.gz) = a8ca4f53b3bc9d18a6b448325e21717e1906842b0f88cb062c9e08ca7a244118 diff --git a/opt/opensmtpd/MAKEPKG b/opt/opensmtpd/MAKEPKG new file mode 100644 index 0000000..c8ac4ee --- /dev/null +++ b/opt/opensmtpd/MAKEPKG @@ -0,0 +1,125 @@ +#!/bin/mkpkg +# description: Free implementation of the SMTP protocol +# url: https://www.opensmtpd.org/ + +name=opensmtpd +version=7.9.0p0 +release=2 +depends=(libressl libevent zlib musl-fts) +makedeps=(bison) +groups=( + _smtpd:user:_smtpd:/nonexistent:755:915:915 + _smtpq:user:_smtpq:/nonexistent:755:916:916 +) +services=(smtpd) +permissions=( + /etc/mail/smtpd.conf:root:_smtpd:640 + /var/spool/smtpd:root:root:711 + /var/spool/smtpd/queue:_smtpq:root:700 + /var/spool/smtpd/offline:root:_smtpq:770 + /var/spool/smtpd/purge:_smtpq:root:700 +) +source=(https://www.opensmtpd.org/archives/$name-$version.tar.gz) +sha256sums=( + "74e640de18a8ea63ef43ba2ddb1a6ad1eb82cce2e600b94e98cb551bb2a724c4" +) + +build() { + cd $name-$version + + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/mail \ + --localstatedir=/var \ + --with-path-empty=/var/empty \ + --with-path-socket=/run \ + --with-path-CAfile=/etc/ssl/cert.pem \ + --with-user-smtpd=_smtpd \ + --with-user-queue=_smtpq \ + --with-group-queue=_smtpq \ + --with-mantype=man \ + --with-libssl=/usr \ + --with-libevent=/usr + + make + make DESTDIR=$PKG install + + # Clean docs + rm -rf $PKG/usr/share/doc + + # Symlink sendmail compatibility + install -d $PKG/usr/bin + [ -e $PKG/usr/bin/sendmail ] || ln -sf smtpctl $PKG/usr/bin/sendmail + install -d $PKG/usr/lib + ln -sf /usr/bin/smtpctl $PKG/usr/lib/sendmail + + # Spool directory layout (queue/offline/purge created by smtpd at runtime, + # but pre-create for permissions= to set ownership on install) + install -d -m 711 $PKG/var/spool/smtpd + install -d -m 700 $PKG/var/spool/smtpd/queue + install -d -m 770 $PKG/var/spool/smtpd/offline + install -d -m 700 $PKG/var/spool/smtpd/purge + + # Mail aliases default + install -d $PKG/etc/mail +} + +post_build() { + # Minimal smtpd.conf — outbound only initially, no inbound listener. + # Receives local mail (from cron, scripts, etc.) and forwards to smarthost + # if needed, or accepts on localhost for sendmail-compat. + printf '%s\n' \ + '# OpenSMTPD configuration — see smtpd.conf(5)' \ + '' \ + 'table aliases file:/etc/mail/aliases' \ + '' \ + '# Listen only on loopback for local submissions' \ + 'listen on lo' \ + '' \ + '# Local delivery to system users (Maildir under ~/Maildir)' \ + 'action "local_mail" maildir "~/Maildir" alias <aliases>' \ + '' \ + '# Outbound relay (direct MX delivery)' \ + 'action "outbound" relay' \ + '' \ + 'match from local for local action "local_mail"' \ + 'match from local for any action "outbound"' \ + > $PKG/etc/mail/smtpd.conf + + # Stub aliases file + printf '%s\n' \ + '# /etc/mail/aliases — see aliases(5)' \ + 'postmaster: root' \ + 'root: root' \ + > $PKG/etc/mail/aliases + + # runit service + install -d $PKG/etc/sv/smtpd/log + + printf '%s\n' \ + '#!/bin/sh' \ + 'exec 2>&1' \ + '' \ + '# Validate config before launching' \ + 'smtpd -n || exit 1' \ + '' \ + 'exec smtpd -d' \ + > $PKG/etc/sv/smtpd/run + + printf '%s\n' \ + '#!/bin/sh' \ + 'mkdir -p /var/log/smtpd' \ + 'exec svlogd -tt /var/log/smtpd' \ + > $PKG/etc/sv/smtpd/log/run + + chmod 755 $PKG/etc/sv/smtpd/run + chmod 755 $PKG/etc/sv/smtpd/log/run +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh |
