diff options
author | obadz <obadz-git@obadz.com> | 2018-05-18 22:15:07 +0100 |
---|---|---|
committer | obadz <obadz-git@obadz.com> | 2018-06-07 20:29:43 +0100 |
commit | 6081f514b68ef4146e959bf6ec34f4d5b5740534 (patch) | |
tree | a65b835978248d2c3fcc6d2f8563ee082e180545 /pkgs/servers/mail/opensmtpd | |
parent | 23f2dfd9f5a24a62efdf2805a7fb01d0008ef178 (diff) |
opensmtpd: 6.0.2p1 -> 6.0.3p1
Diffstat (limited to 'pkgs/servers/mail/opensmtpd')
-rw-r--r-- | pkgs/servers/mail/opensmtpd/default.nix | 13 | ||||
-rw-r--r-- | pkgs/servers/mail/opensmtpd/proc_path.diff | 37 |
2 files changed, 12 insertions, 38 deletions
diff --git a/pkgs/servers/mail/opensmtpd/default.nix b/pkgs/servers/mail/opensmtpd/default.nix index d2667597c627..e562fdc88a6c 100644 --- a/pkgs/servers/mail/opensmtpd/default.nix +++ b/pkgs/servers/mail/opensmtpd/default.nix @@ -5,28 +5,27 @@ # 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 { +if (tag_char != null) +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}"; - 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 ]; postPatch = with builtins; with lib; - optionalString (isString tag_char) '' - sed -i -e "s,TAG_CHAR.*'+',TAG_CHAR '${tag_char}'," smtpd/smtpd-defines.h - '' + optionalString unpriviledged_smtpctl_encrypt '' substituteInPlace smtpd/smtpctl.c --replace \ 'if (geteuid())' \ diff --git a/pkgs/servers/mail/opensmtpd/proc_path.diff b/pkgs/servers/mail/opensmtpd/proc_path.diff index 9306685e365e..5e1cfd004299 100644 --- a/pkgs/servers/mail/opensmtpd/proc_path.diff +++ b/pkgs/servers/mail/opensmtpd/proc_path.diff @@ -1,33 +1,8 @@ -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; @@ -35,7 +10,7 @@ index afc8891..9b0a80f 100644 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,10 +25,10 @@ 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]; @@ -61,7 +36,7 @@ index 21ee237..95b5164 100644 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); |