summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2023-03-04 22:55:01 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2023-03-05 12:49:22 +0000
commitcfeaa009b9b407d8b404438afbf4c5d85d61e8c1 (patch)
tree59b2be51b82f952c755210a8ce0850d02336a0b3
parentc5722bc5a8df130f4733ca3c4398ae51cc7842e0 (diff)
Truncate overlong lines in DSNs. Bug 2979
-rw-r--r--src/src/deliver.c5
-rw-r--r--test/stdout/06352
2 files changed, 6 insertions, 1 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index d0e6d1c2e..9b77b3619 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -5370,6 +5370,11 @@ while (*s)
fprintf(f, "\n "); /* sic (because space follows) */
count = 0;
}
+ else if (count > 254) /* arbitrary limit */
+ {
+ fprintf(f, "[truncated]");
+ do s++; while (*s && !(*s == '\\' && s[1] == '\n'));
+ }
}
}
diff --git a/test/stdout/0635 b/test/stdout/0635
index b4bfe581f..3d494c0c5 100644
--- a/test/stdout/0635
+++ b/test/stdout/0635
@@ -52,7 +52,7 @@ recipients. This is a permanent error. The following address(es) failed:
host 127.0.0.1 [127.0.0.1]
SMTP error from remote mail server after RCPT TO:<fred@undeliverable.org>:
550-no mate
- 550-123456789 100 123456789 a really long line to blow the limits 123456789 123456789 123456789 123456789 200 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 300 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 400 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 500 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 600 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 700 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 800 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 900 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1000 123456789 12
+ 550-123456789 100 123456789 a really long line to blow the limits 123456789 123456789 123456789 123456789 200 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 300 123456789 123456789 123456789 1[truncated]
--NNNNNNNNNN-eximdsn-MMMMMMMMMM
Content-type: message/delivery-status