summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2021-04-26 16:16:49 +0200
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2021-05-27 21:31:00 +0200
commitfef3133001a719b8dc8809f6bf50780f750a3e09 (patch)
treeda4fd61893f2b8f088a9c3d69316137303736d51
parent84227d174eec333d01ff494695bea0febf11575e (diff)
downloadexim4-fef3133001a719b8dc8809f6bf50780f750a3e09.tar.gz
rewrite: revert to unchecked result of parse_extract_address()
Now it breaks 471, and overlong addresses won't make it into the rewrite process, as they are handled as empty. (cherry picked from commit 506286c62b8786a926dafb5bb05d3103492b86bc)
-rw-r--r--src/src/rewrite.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/src/rewrite.c b/src/src/rewrite.c
index f40c73c51..6a6da47df 100644
--- a/src/src/rewrite.c
+++ b/src/src/rewrite.c
@@ -488,18 +488,34 @@ while (*s)
/* There isn't much we can do for syntactic disasters at this stage.
Pro tem (possibly for ever) ignore them.
- If we got nothing, they there was any sort of error: non-parsable address,
+ If we got nothing, then there was any sort of error: non-parsable address,
empty address, overlong addres. Sometimes the result matters, sometimes not.
It seems this function is called for *any* header we see. */
if (!recipient)
{
+#if 0
+ /* FIXME:
+ This was(!) an attempt tho handle empty rewrits, but seemingly it
+ needs more effort to decide if the returned empty address matters.
+ Now this will now break test 471 again.
+
+ 471 fails now because it uses an overlong address, for wich parse_extract_address()
+ returns an empty address (which was not expected).
+
+ Checking the output and exit if rewrite_rules or routed_old are present
+ isn't a good idea either: It's enough to have *any* rewrite rule
+ in the configuration plus "To: undisclosed recpients:;" to exit(), which
+ is not what we want.
+ */
+
if (rewrite_rules || routed_old)
{
log_write(0, LOG_MAIN, "rewrite: %s", errmess);
exim_exit(EXIT_FAILURE);
}
+#endif
loop_reset_point = store_reset(loop_reset_point);
continue;
}