Import Debian patch 4.84.2-2+deb8u3
[hcoop/debian/exim4.git] / debian / patches / 89_01_only_warn_on_nonempty_environment.diff
1 Description: Don't issue env warning if env is empty
2 keep_environment needs to be mentioned in the runtime config.
3 Setting add_environment isn't enough to suppress the warning.
4
5 (cherry picked from commit 8e58ed807c77febfde61d3cf47928302f93cc99c)
6 Origin: upstream
7
8 --- exim4-4.84.2.orig/src/readconf.c
9 +++ exim4-4.84.2/src/readconf.c
10 @@ -3418,10 +3418,10 @@ if (gnutls_require_kx || gnutls_require_
11 " are obsolete\n");
12 #endif /*SUPPORT_TLS*/
13
14 -if ((!add_environment || *add_environment == '\0') && !keep_environment)
15 +if (!keep_environment && environ && *environ)
16 log_write(0, LOG_MAIN,
17 - "WARNING: purging the environment.\n"
18 - " Suggested action: use keep_environment and add_environment.\n");
19 + "Warning: purging the environment.\n"
20 + " Suggested action: use keep_environment.");
21 }
22
23
24 --- exim4-4.84.2.orig/doc/spec.txt
25 +++ exim4-4.84.2/doc/spec.txt
26 @@ -13516,8 +13516,10 @@ having FOO_HOME in your keep_environment
27 You may work around this using a regular expression that does not match the
28 macro name: ^[F]OO_HOME$.
29
30 -Current versions of Exim issue a warning during startupif you do not mention
31 -keep_environment or add_environment in your runtime configuration file.
32 +Current versions of Exim issue a warning during startup if you do not mention
33 +keep_environment in your runtime configuration file and if there is
34 +anything in your environment. Future versions may not issue that warning
35 +anymore.
36
37 +--------------+---------+----------+-----------+
38 |keep_malformed|Use: main|Type: time|Default: 4d|