Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e942479be49c
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4f9f2cbb40d3
Choose a head ref
  • 3 commits
  • 2 files changed
  • 3 contributors

Commits on Jun 18, 2018

  1. opensmtpd: 6.0.2p1 -> 6.0.3p1

    obadz authored and Ekleog committed Jun 18, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    Ekleog Léo Gaspard
    Copy the full SHA
    a6903c9 View commit details
  2. opensmtpd: fix interaction with dovecot-2.3.1

    This has been merged upstream with
        OpenSMTPD/OpenSMTPD#847
    Ekleog committed Jun 18, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    Ekleog Léo Gaspard
    Copy the full SHA
    2fe2f47 View commit details
  3. Merge pull request #42168 from Ekleog/opensmtpd-dovecot-fix-backport

    Opensmtpd dovecot fix backport
    xeji authored Jun 18, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4f9f2cb View commit details
Showing with 17 additions and 36 deletions.
  1. +11 −5 pkgs/servers/mail/opensmtpd/default.nix
  2. +6 −31 pkgs/servers/mail/opensmtpd/proc_path.diff
16 changes: 11 additions & 5 deletions pkgs/servers/mail/opensmtpd/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
{ stdenv, lib, fetchurl, autoconf, automake, libtool, bison
{ stdenv, lib, fetchurl, fetchpatch, autoconf, automake, libtool, bison
, libasr, libevent, zlib, openssl, 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

# This enables you to override the '+' character which typically separates the user from the tag in user+tag@domain.tld
# Deprecated: use the subaddressing-delimiter in the config file going forward
, tag_char ? null
}:

stdenv.mkDerivation rec {
name = "opensmtpd-${version}";
version = "6.0.2p1";
version = "6.0.3p1";

nativeBuildInputs = [ autoconf automake libtool bison ];
buildInputs = [ libasr libevent zlib openssl db pam ];

src = fetchurl {
url = "https://www.opensmtpd.org/archives/${name}.tar.gz";
sha256 = "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a";
sha256 = "291881862888655565e8bbe3cfb743310f5dc0edb6fd28a889a9a547ad767a81";
};

patches = [ ./proc_path.diff ];
patches = [
./proc_path.diff
(fetchpatch {
url = "https://github.com/OpenSMTPD/OpenSMTPD/commit/725ba4fa2ddf23bbcd1ff9ec92e86bbfaa6825c8.diff";
sha256 = "19rla0b2r53jpdiz25fcza29c2msz6j6paivxhp9jcy1xl457dqa";
})
];

postPatch = with builtins; with lib;
optionalString (isString tag_char) ''
37 changes: 6 additions & 31 deletions pkgs/servers/mail/opensmtpd/proc_path.diff
Original file line number Diff line number Diff line change
@@ -1,41 +1,16 @@
diff --git a/smtpd/parse.y b/smtpd/parse.y
index ab02719..c1c77d9 100644
--- a/smtpd/parse.y
+++ b/smtpd/parse.y
@@ -2534,13 +2534,19 @@ create_filter_proc(char *name, char *prog)
{
struct filter_conf *f;
char *path;
+ const char *proc_path;

if (dict_get(&conf->sc_filters, name)) {
yyerror("filter \"%s\" already defined", name);
return (NULL);
}

- if (asprintf(&path, "%s/filter-%s", PATH_LIBEXEC, prog) == -1) {
+ proc_path = getenv("OPENSMTPD_PROC_PATH");
+ if (proc_path == NULL) {
+ proc_path = PATH_LIBEXEC;
+ }
+
+ if (asprintf(&path, "%s/filter-%s", proc_path, prog) == -1) {
yyerror("filter \"%s\" asprintf failed", name);
return (0);
}
diff --git a/smtpd/smtpd.c b/smtpd/smtpd.c
index afc8891..9b0a80f 100644
index e049f07c..a1bd03a0 100644
--- a/smtpd/smtpd.c
+++ b/smtpd/smtpd.c
@@ -795,6 +795,7 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
@@ -1157,6 +1157,7 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
char path[PATH_MAX];
char name[PATH_MAX];
char *arg;
+ char *proc_path;

if (strlcpy(name, conf, sizeof(name)) >= sizeof(name)) {
log_warnx("warn: %s-proc: conf too long", key);
@@ -805,7 +806,12 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
@@ -1167,7 +1168,12 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
if (arg)
*arg++ = '\0';

@@ -50,18 +25,18 @@ index afc8891..9b0a80f 100644
log_warn("warn: %s-proc: exec path too long", key);
return (-1);
diff --git a/smtpd/table.c b/smtpd/table.c
index 21ee237..95b5164 100644
index 9cfdfb99..24dfcca4 100644
--- a/smtpd/table.c
+++ b/smtpd/table.c
@@ -193,6 +193,7 @@ table_create(const char *backend, const char *name, const char *tag,
@@ -201,6 +201,7 @@ table_create(const char *backend, const char *name, const char *tag,
struct table_backend *tb;
char buf[LINE_MAX];
char path[LINE_MAX];
+ const char *proc_path;
size_t n;
struct stat sb;

@@ -207,11 +208,16 @@ table_create(const char *backend, const char *name, const char *tag,
@@ -215,11 +216,16 @@ table_create(const char *backend, const char *name, const char *tag,
if (name && table_find(name, NULL))
fatalx("table_create: table \"%s\" already defined", name);