diff --git a/doc/release-notes/rl-2505.section.md b/doc/release-notes/rl-2505.section.md index 1caa77cf86f8..233af95efc83 100644 --- a/doc/release-notes/rl-2505.section.md +++ b/doc/release-notes/rl-2505.section.md @@ -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`. diff --git a/nixos/modules/services/mail/opensmtpd.nix b/nixos/modules/services/mail/opensmtpd.nix index 2fc628a64aeb..9db7d78b7cad 100644 --- a/nixos/modules/services/mail/opensmtpd.nix +++ b/nixos/modules/services/mail/opensmtpd.nix @@ -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"; }; }; } diff --git a/pkgs/servers/mail/opensmtpd/filter-rspamd.nix b/pkgs/by-name/op/opensmtpd-filter-rspamd/package.nix similarity index 100% rename from pkgs/servers/mail/opensmtpd/filter-rspamd.nix rename to pkgs/by-name/op/opensmtpd-filter-rspamd/package.nix diff --git a/pkgs/by-name/op/opensmtpd-table-ldap/package.nix b/pkgs/by-name/op/opensmtpd-table-ldap/package.nix new file mode 100644 index 000000000000..ac81d8d4a7d2 --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-ldap/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/by-name/op/opensmtpd-table-mysql/package.nix b/pkgs/by-name/op/opensmtpd-table-mysql/package.nix new file mode 100644 index 000000000000..c1bd227783b0 --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-mysql/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/by-name/op/opensmtpd-table-passwd/package.nix b/pkgs/by-name/op/opensmtpd-table-passwd/package.nix new file mode 100644 index 000000000000..3a068ad41867 --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-passwd/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/by-name/op/opensmtpd-table-postgres/package.nix b/pkgs/by-name/op/opensmtpd-table-postgres/package.nix new file mode 100644 index 000000000000..3e62a3cb7eb7 --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-postgres/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/by-name/op/opensmtpd-table-redis/package.nix b/pkgs/by-name/op/opensmtpd-table-redis/package.nix new file mode 100644 index 000000000000..e4f1cb775a9d --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-redis/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/by-name/op/opensmtpd-table-socketmap/package.nix b/pkgs/by-name/op/opensmtpd-table-socketmap/package.nix new file mode 100644 index 000000000000..e3346765857c --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-socketmap/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/by-name/op/opensmtpd-table-sqlite/package.nix b/pkgs/by-name/op/opensmtpd-table-sqlite/package.nix new file mode 100644 index 000000000000..a85f91f48f17 --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-sqlite/package.nix @@ -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 + ]; + }; +}) diff --git a/pkgs/servers/mail/opensmtpd/default.nix b/pkgs/by-name/op/opensmtpd/package.nix similarity index 100% rename from pkgs/servers/mail/opensmtpd/default.nix rename to pkgs/by-name/op/opensmtpd/package.nix diff --git a/pkgs/servers/mail/opensmtpd/proc_path.diff b/pkgs/by-name/op/opensmtpd/proc_path.diff similarity index 100% rename from pkgs/servers/mail/opensmtpd/proc_path.diff rename to pkgs/by-name/op/opensmtpd/proc_path.diff diff --git a/pkgs/servers/mail/opensmtpd/extras.nix b/pkgs/servers/mail/opensmtpd/extras.nix deleted file mode 100644 index 8f09e5803fa8..000000000000 --- a/pkgs/servers/mail/opensmtpd/extras.nix +++ /dev/null @@ -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 - ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index f049642f73f3..4092bcd1c6aa 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3b570708639c..bb5d067c88fd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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