opensmtpd: 6.0.3p1 -> 6.4.0p1
This commit is contained in:
parent
591ba7335b
commit
58f701ab74
|
@ -137,6 +137,14 @@
|
||||||
make sure to update your configuration if you want to keep <literal>proglodyte-wasm</literal>
|
make sure to update your configuration if you want to keep <literal>proglodyte-wasm</literal>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
OpenSMTPD has been upgraded to version 6.4.0p1. This release makes
|
||||||
|
backwards-incompatible changes to the configuration file format. See
|
||||||
|
<command>man smtpd.conf</command> for more information on the new file
|
||||||
|
format.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,12 @@ import ./make-test.nix {
|
||||||
extraServerArgs = [ "-v" ];
|
extraServerArgs = [ "-v" ];
|
||||||
serverConfiguration = ''
|
serverConfiguration = ''
|
||||||
listen on 0.0.0.0
|
listen on 0.0.0.0
|
||||||
|
action do_relay relay
|
||||||
# DO NOT DO THIS IN PRODUCTION!
|
# DO NOT DO THIS IN PRODUCTION!
|
||||||
# Setting up authentication requires a certificate which is painful in
|
# Setting up authentication requires a certificate which is painful in
|
||||||
# a test environment, but THIS WOULD BE DANGEROUS OUTSIDE OF A
|
# a test environment, but THIS WOULD BE DANGEROUS OUTSIDE OF A
|
||||||
# WELL-CONTROLLED ENVIRONMENT!
|
# WELL-CONTROLLED ENVIRONMENT!
|
||||||
accept from any for any relay
|
match from any for any action do_relay
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -41,8 +42,9 @@ import ./make-test.nix {
|
||||||
extraServerArgs = [ "-v" ];
|
extraServerArgs = [ "-v" ];
|
||||||
serverConfiguration = ''
|
serverConfiguration = ''
|
||||||
listen on 0.0.0.0
|
listen on 0.0.0.0
|
||||||
accept from any for local deliver to mda \
|
action dovecot_deliver mda \
|
||||||
"${pkgs.dovecot}/libexec/dovecot/deliver -d %{user.username}"
|
"${pkgs.dovecot}/libexec/dovecot/deliver -d %{user.username}"
|
||||||
|
match from any for local action dovecot_deliver
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.dovecot2 = {
|
services.dovecot2 = {
|
||||||
|
|
|
@ -1,43 +1,33 @@
|
||||||
{ stdenv, lib, fetchurl, fetchpatch, autoconf, automake, libtool, bison
|
{ stdenv, lib, fetchurl, fetchpatch, autoconf, automake, libtool, bison
|
||||||
, libasr, libevent, zlib, openssl, db, pam
|
, libasr, libevent, zlib, libressl, db, pam
|
||||||
|
|
||||||
# opensmtpd requires root for no reason to encrypt passwords, this patch fixes it
|
|
||||||
# see also https://github.com/OpenSMTPD/OpenSMTPD/issues/678
|
|
||||||
, unpriviledged_smtpctl_encrypt ? true
|
|
||||||
|
|
||||||
# Deprecated: use the subaddressing-delimiter in the config file going forward
|
|
||||||
, tag_char ? null
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
if (tag_char != null)
|
stdenv.mkDerivation rec {
|
||||||
then throw "opensmtpd: the tag_char argument is deprecated as it can now be specified at runtime via the 'subaddressing-delimiter' option of the configuration file"
|
|
||||||
else stdenv.mkDerivation rec {
|
|
||||||
name = "opensmtpd-${version}";
|
name = "opensmtpd-${version}";
|
||||||
version = "6.0.3p1";
|
version = "6.4.0p1";
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake libtool bison ];
|
nativeBuildInputs = [ autoconf automake libtool bison ];
|
||||||
buildInputs = [ libasr libevent zlib openssl db pam ];
|
buildInputs = [ libasr libevent zlib libressl db pam ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.opensmtpd.org/archives/${name}.tar.gz";
|
url = "https://www.opensmtpd.org/archives/${name}.tar.gz";
|
||||||
sha256 = "291881862888655565e8bbe3cfb743310f5dc0edb6fd28a889a9a547ad767a81";
|
sha256 = "1qxxhnlsmpfh9v4azgl0634955r085gsic1c66jdll21bd5w2mq8";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./proc_path.diff
|
./proc_path.diff
|
||||||
(fetchpatch {
|
./fix-build.diff # See https://github.com/OpenSMTPD/OpenSMTPD/pull/884
|
||||||
url = "https://github.com/OpenSMTPD/OpenSMTPD/commit/725ba4fa2ddf23bbcd1ff9ec92e86bbfaa6825c8.diff";
|
|
||||||
sha256 = "19rla0b2r53jpdiz25fcza29c2msz6j6paivxhp9jcy1xl457dqa";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = with builtins; with lib;
|
# See https://github.com/OpenSMTPD/OpenSMTPD/issues/885 for the `sh bootstrap`
|
||||||
optionalString unpriviledged_smtpctl_encrypt ''
|
# requirement
|
||||||
substituteInPlace smtpd/smtpctl.c --replace \
|
postPatch = ''
|
||||||
'if (geteuid())' \
|
substituteInPlace smtpd/parse.y \
|
||||||
'if (geteuid() != 0 && !(argc > 1 && !strcmp(argv[1], "encrypt")))'
|
--replace "/usr/libexec/" "$out/libexec/opensmtpd/"
|
||||||
substituteInPlace mk/smtpctl/Makefile.in --replace "chmod 2555" "chmod 0555"
|
substituteInPlace mk/smtpctl/Makefile.am --replace "chgrp" "true"
|
||||||
'';
|
substituteInPlace mk/smtpctl/Makefile.am --replace "chmod 2555" "chmod 0555"
|
||||||
|
sh bootstrap
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
|
@ -54,6 +44,9 @@ else stdenv.mkDerivation rec {
|
||||||
"--with-table-db"
|
"--with-table-db"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# See https://github.com/OpenSMTPD/OpenSMTPD/pull/884
|
||||||
|
makeFlags = [ "CFLAGS=-ffunction-sections" "LDFLAGS=-Wl,--gc-sections" ];
|
||||||
|
|
||||||
installFlags = [
|
installFlags = [
|
||||||
"sysconfdir=\${out}/etc"
|
"sysconfdir=\${out}/etc"
|
||||||
"localstatedir=\${TMPDIR}"
|
"localstatedir=\${TMPDIR}"
|
||||||
|
@ -67,6 +60,6 @@ else stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
license = licenses.isc;
|
license = licenses.isc;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ rickynils obadz ];
|
maintainers = with maintainers; [ rickynils obadz ekleog ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
12
pkgs/servers/mail/opensmtpd/fix-build.diff
Normal file
12
pkgs/servers/mail/opensmtpd/fix-build.diff
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/mk/smtpctl/Makefile.am b/mk/smtpctl/Makefile.am
|
||||||
|
index 5af0b713..f0fce735 100644
|
||||||
|
--- a/mk/smtpctl/Makefile.am
|
||||||
|
+++ b/mk/smtpctl/Makefile.am
|
||||||
|
@@ -4,6 +4,7 @@ sbin_PROGRAMS= smtpctl
|
||||||
|
|
||||||
|
smtpctl_SOURCES= $(smtpd_srcdir)/enqueue.c
|
||||||
|
smtpctl_SOURCES+= $(smtpd_srcdir)/parser.c
|
||||||
|
+smtpctl_SOURCES+= $(smtpd_srcdir)/config.c
|
||||||
|
smtpctl_SOURCES+= $(smtpd_srcdir)/log.c
|
||||||
|
smtpctl_SOURCES+= $(smtpd_srcdir)/envelope.c
|
||||||
|
smtpctl_SOURCES+= $(smtpd_srcdir)/queue_backend.c
|
Loading…
Reference in a new issue