opensmtpd-extras: drop in favor of standalone filters (#376913)

This commit is contained in:
Wolfgang Walther
2025-04-28 11:46:47 +00:00
committed by GitHub
15 changed files with 368 additions and 121 deletions
+4
View File
@@ -54,6 +54,10 @@
The hook can be disabled by providing `dontCheckForBrokenSymlinks = true;` as an argument to `mkDerivation`.
For more information, [check the docs](https://nixos.org/manual/nixpkgs/unstable/#no-broken-symlinks.sh) or [see this PR](https://github.com/NixOS/nixpkgs/pull/370750).
- `opensmtpd-extras` has been deprecated by upstream and is not compatible with
OpenSMTPD 7.6.0 or later. The package has been removed in favor of a set of new
`opensmtpd-table-*` packages.
- The hand written `perlPackages.SearchXapian` bindings have been dropped in favor of the (mostly compatible)
`perlPackages.Xapian`.
+4 -4
View File
@@ -76,8 +76,8 @@ in
description = ''
Packages to search for filters, tables, queues, and schedulers.
Add OpenSMTPD-extras here if you want to use the filters, etc. from
that package.
Add packages here if you want to use them as as such, for example
from the opensmtpd-table-* packages.
'';
};
};
@@ -132,14 +132,14 @@ in
procEnv = pkgs.buildEnv {
name = "opensmtpd-procs";
paths = [ cfg.package ] ++ cfg.procPackages;
pathsToLink = [ "/libexec/opensmtpd" ];
pathsToLink = [ "/libexec/smtpd" ];
};
in
{
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig.ExecStart = "${cfg.package}/sbin/smtpd -d -f ${conf} ${args}";
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/smtpd";
};
};
}
@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
libevent,
libressl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-ldap";
version = "1.0";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-ldap";
tag = finalAttrs.version;
hash = "sha256-dfwvgFYBED3GyZ347JSNIyiik133GYLT6p+XkIIm//w=";
};
strictDeps = true;
buildInputs = [
libevent
libressl
];
nativeBuildInputs = [
autoconf
automake
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "ldap table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-ldap/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
libmysqlclient,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-mysql";
version = "1.2.1";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-mysql";
tag = finalAttrs.version;
hash = "sha256-0N1fuYJvJKAoOJMH2bX0pdvAqb26w/6JSuv6ycnRZHU=";
};
strictDeps = true;
buildInputs = [
libmysqlclient
];
nativeBuildInputs = [
autoconf
automake
libmysqlclient
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "ldap table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-mysql/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-passwd";
version = "1.0.2";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-passwd";
tag = finalAttrs.version;
hash = "sha256-veE7PADO8KAMEnMrDc9V/xbVMqwF3rUoYPmpQSIJw9o=";
};
strictDeps = true;
nativeBuildInputs = [
autoconf
automake
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "passwd table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-passwd/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
libpq,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-postgres";
version = "1.1.1";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-postgres";
tag = finalAttrs.version;
hash = "sha256-CGtqCQnsUvgsBIJOVXphkisp3Iij+oW88w7Y1njusx8=";
};
strictDeps = true;
buildInputs = [
libpq
];
nativeBuildInputs = [
autoconf
automake
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "ldap table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-postgres/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
hiredis,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-redis";
version = "1.0.1";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-redis";
tag = finalAttrs.version;
hash = "sha256-eS/jzran7/j3xrFuEqTLam0pokD/LBl4v2s/1ferCqk=";
};
strictDeps = true;
buildInputs = [
hiredis
];
nativeBuildInputs = [
autoconf
automake
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
env.NIX_CFLAGS_COMPILE = "-I${hiredis}/include/hiredis";
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "ldap table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-redis/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-socketmap";
version = "1.1.1";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-socketmap";
tag = finalAttrs.version;
hash = "sha256-YTV0ijD264C7JAiB5ZfuCZhAmkLN0GSNl1vkZ3i3aRo=";
};
strictDeps = true;
nativeBuildInputs = [
autoconf
automake
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "ldap table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-socketmap/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
sqlite,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "opensmtpd-table-sqlite";
version = "1.0.1";
src = fetchFromGitHub {
owner = "OpenSMTPD";
repo = "table-sqlite";
tag = finalAttrs.version;
hash = "sha256-Y5AveTo+Ol6cMcxOW3/GMZZD+17HiQdQ4Vg5WHPjKgA=";
};
strictDeps = true;
buildInputs = [
sqlite
];
nativeBuildInputs = [
autoconf
automake
];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-path-socket=/run"
"--with-path-pidfile=/run"
];
preConfigure = ''
sh bootstrap
'';
meta = {
homepage = "https://www.opensmtpd.org/";
description = "ldap table for the OpenSMTPD mail server";
changelog = "https://github.com/OpenSMTPD/table-sqlite/releases/tag/${finalAttrs.version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
pks
];
};
})
-113
View File
@@ -1,113 +0,0 @@
{
lib,
stdenv,
fetchurl,
openssl,
libevent,
libasr,
ncurses,
pkg-config,
lua5,
perl,
libmysqlclient,
libpq,
sqlite,
hiredis,
enableLua ? true,
enablePerl ? true,
enableMysql ? true,
enablePostgres ? true,
enableSqlite ? true,
enableRedis ? true,
}:
stdenv.mkDerivation rec {
pname = "opensmtpd-extras";
version = "6.7.1";
src = fetchurl {
url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
sha256 = "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
libevent
libasr
lua5
perl
libmysqlclient
libpq
sqlite
hiredis
];
configureFlags =
[
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-privsep-user=smtpd"
"--with-libevent-dir=${libevent.dev}"
"--with-filter-clamav"
"--with-filter-dkim-signer"
"--with-filter-dnsbl"
"--with-filter-monkey"
"--with-filter-pause"
"--with-filter-regex"
"--with-filter-spamassassin"
"--with-filter-stub"
"--with-filter-trace"
"--with-filter-void"
"--with-queue-null"
"--with-queue-ram"
"--with-queue-stub"
"--with-table-ldap"
"--with-table-socketmap"
"--with-table-passwd"
"--with-table-stub"
"--with-scheduler-ram"
"--with-scheduler-stub"
]
++ lib.optionals enableLua [
"--with-lua=${pkg-config}"
"--with-filter-lua"
]
++ lib.optionals enablePerl [
"--with-perl=${perl}"
"--with-filter-perl"
]
++ lib.optionals enableMysql [
"--with-table-mysql"
]
++ lib.optionals enablePostgres [
"--with-table-postgres"
]
++ lib.optionals enableSqlite [
"--with-table-sqlite"
]
++ lib.optionals enableRedis [
"--with-table-redis"
];
env.NIX_CFLAGS_COMPILE =
lib.optionalString enableRedis "-I${hiredis}/include/hiredis -lhiredis"
+ lib.optionalString enableMysql " -L${libmysqlclient}/lib/mysql";
meta = with lib; {
homepage = "https://www.opensmtpd.org/";
description = "Extra plugins for the OpenSMTPD mail server";
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [
ekleog
];
};
}
+1
View File
@@ -1350,6 +1350,7 @@ mapAliases {
openlens = throw "Lens Closed its source code, package obsolete/stale - consider lens as replacement"; # Added 2024-09-04
openlp = throw "openlp has been removed for now because the outdated version depended on insecure and removed packages and it needs help to upgrade and maintain it; see https://github.com/NixOS/nixpkgs/pull/314882"; # Added 2024-07-29
openmpt123 = throw "'openmpt123' has been renamed to/replaced by 'libopenmpt'"; # Converted to throw 2024-10-17
opensmtpd-extras = throw "opensmtpd-extras has been removed in favor of separate opensmtpd-table-* packages"; # Added 2025-01-26
openssl_3_0 = openssl_3; # Added 2022-06-27
opensycl = lib.warnOnInstantiate "'opensycl' has been renamed to 'adaptivecpp'" adaptivecpp; # Added 2024-12-04
opensyclWithRocm = lib.warnOnInstantiate "'opensyclWithRocm' has been renamed to 'adaptivecppWithRocm'" adaptivecppWithRocm; # Added 2024-12-04
-4
View File
@@ -12092,10 +12092,6 @@ with pkgs;
modules = [ ];
};
opensmtpd = callPackage ../servers/mail/opensmtpd { };
opensmtpd-extras = callPackage ../servers/mail/opensmtpd/extras.nix { };
opensmtpd-filter-rspamd = callPackage ../servers/mail/opensmtpd/filter-rspamd.nix { };
system-sendmail = lowPrio (callPackage ../servers/mail/system-sendmail { });
# PulseAudio daemons