From: Tobias Geerinckx-Rice <me@tobias.gr>
To: 34706@debbugs.gnu.org
Subject: [bug#34706] [PATCH] gnu: Add opensmtpd-next.
Date: Sat, 2 Mar 2019 01:51:35 +0100 [thread overview]
Message-ID: <20190302005135.12346-1-me@tobias.gr> (raw)
* gnu/packages/mail.scm (opensmtpd-next): New public variable.
---
Sent from my Guix System running OpenSMTPd 6.4.1p2.
gnu/packages/mail.scm | 69 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 90bd79ae3c..1d2c033274 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2045,6 +2045,75 @@ e-mails with other systems speaking the SMTP protocol.")
(license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
public-domain isc license:openssl))))
+;; OpenSMTPd 6.4 introduced a new and incompatible configuration file format.
+;; Use a different name, for now, to avoid auto-upgrades and broken mail boxes.
+;; OPENSMTP-CONFIGURATION in (gnu services mail) will also need an overhaul.
+(define-public opensmtpd-next
+ (package
+ (name "opensmtpd-next")
+ (version "6.4.1p2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.opensmtpd.org/archives/"
+ "opensmtpd-" version ".tar.gz"))
+ (sha256
+ (base32 "0cppqlx4fk6l8rbim5symh2fm1kzshf421256g596j6c9f9q96xn"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("bdb" ,bdb)
+ ("libressl" ,libressl)
+ ("libevent" ,libevent)
+ ("libasr" ,libasr)
+ ("linux-pam" ,linux-pam)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("bison" ,bison)
+ ("groff" ,groff))) ; for man pages
+ (arguments
+ `(#:configure-flags
+ (list "--localstatedir=/var"
+ ;; This is the default only if it exists at build time; it doesn't.
+ "--with-path-socket=/var/run"
+ "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
+ "--with-user-smtpd=smtpd"
+ "--with-user-queue=smtpq" "--with-group-queue=smtpq"
+ "--with-auth-pam"
+ "--with-table-db")
+ #:phases
+ (modify-phases %standard-phases
+ ;; Fix some incorrectly hard-coded external tool file names.
+ (add-after 'unpack 'patch-FHS-file-names
+ (lambda _
+ (substitute* "smtpd/smtpctl.c"
+ ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
+ (("/bin/cat") (which "cat")))
+ (substitute* "smtpd/mda_unpriv.c"
+ (("/bin/sh") (which "sh")))
+ #t))
+ ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
+ ;; the local submission subsystem. To accomodate systems that require
+ ;; historical interfaces such as sendmail, newaliases or makemap, the
+ ;; smtpctl utility can operate in compatibility mode if called with the
+ ;; historical name.
+ (add-after 'install 'install-compability-links
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (sbin (string-append out "/sbin/")))
+ (for-each (lambda (command)
+ (symlink "smtpctl" (string-append sbin command)))
+ (list "makemap" "sendmail" "send-mail"
+ "newaliases" "mailq")))
+ #t)))))
+ (synopsis "Lightweight SMTP daemon")
+ (description
+ "OpenSMTPD is an implementation of the server-side SMTP protocol, with
+some additional standard extensions. It allows ordinary machines to exchange
+e-mails with other systems speaking the SMTP protocol.")
+ (home-page "https://www.opensmtpd.org")
+ (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
+ public-domain isc license:openssl))))
+
(define-public opensmtpd-extras
(package
(name "opensmtpd-extras")
--
2.20.1
next reply other threads:[~2019-03-02 1:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-02 0:51 Tobias Geerinckx-Rice [this message]
2019-03-10 13:57 ` bug#34706: [PATCH] gnu: Add opensmtpd-next Tobias Geerinckx-Rice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190302005135.12346-1-me@tobias.gr \
--to=me@tobias.gr \
--cc=34706@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).