summaryrefslogtreecommitdiffstats
path: root/src/bounce
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:41:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:41:51 +0000
commit3e160e27e4686620d16477a9ea9cf00141e52ce7 (patch)
tree884561d26afa36d7653aa4dc43410e1ae479d43e /src/bounce
parentAdding upstream version 3.8.6. (diff)
downloadpostfix-3e160e27e4686620d16477a9ea9cf00141e52ce7.tar.xz
postfix-3e160e27e4686620d16477a9ea9cf00141e52ce7.zip
Adding upstream version 3.9.0.upstream/3.9.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bounce')
-rw-r--r--src/bounce/bounce_notify_util.c13
-rw-r--r--src/bounce/with-msgid-with-filter-no-thread.ref2
-rw-r--r--src/bounce/with-msgid-with-filter-with-thread.ref2
3 files changed, 7 insertions, 10 deletions
diff --git a/src/bounce/bounce_notify_util.c b/src/bounce/bounce_notify_util.c
index 781a525..2482359 100644
--- a/src/bounce/bounce_notify_util.c
+++ b/src/bounce/bounce_notify_util.c
@@ -773,15 +773,14 @@ int bounce_header_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
post_mail_fprintf(bounce, "X-%s-Queue-ID: %s",
bounce_info->mail_name, bounce_info->queue_id);
-#define IS_UTF8_ADDRESS(str, len) \
- ((str)[0] != 0 && !allascii(str) && valid_utf8_string((str), (len)))
+#define IS_UTF8_ADDRESS(str) \
+ ((str)[0] != 0 && !allascii(str) && valid_utf8_stringz(str))
/* Fix 20140708: use "utf-8" or "rfc822" as appropriate. */
if (VSTRING_LEN(bounce_info->sender) > 0)
post_mail_fprintf(bounce, "X-%s-Sender: %s; %s",
bounce_info->mail_name, bounce_info->smtputf8
- && IS_UTF8_ADDRESS(STR(bounce_info->sender),
- VSTRING_LEN(bounce_info->sender)) ?
+ && IS_UTF8_ADDRESS(STR(bounce_info->sender)) ?
"utf-8" : "rfc822", STR(bounce_info->sender));
if (bounce_info->arrival_time > 0)
post_mail_fprintf(bounce, "Arrival-Date: %s",
@@ -800,8 +799,7 @@ int bounce_recipient_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
/* Fix 20140708: Don't send "utf-8" type with non-UTF8 address. */
post_mail_fprintf(bounce, "Final-Recipient: %s; %s",
bounce_info->smtputf8
- && IS_UTF8_ADDRESS(rcpt->address,
- strlen(rcpt->address)) ?
+ && IS_UTF8_ADDRESS(rcpt->address) ?
"utf-8" : "rfc822", rcpt->address);
/*
@@ -829,8 +827,7 @@ int bounce_recipient_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
/* Fix 20140708: Don't send "utf-8" type with non-UTF8 address. */
post_mail_fprintf(bounce, "Original-Recipient: %s; %s",
bounce_info->smtputf8
- && IS_UTF8_ADDRESS(rcpt->orig_addr,
- strlen(rcpt->orig_addr)) ?
+ && IS_UTF8_ADDRESS(rcpt->orig_addr) ?
"utf-8" : "rfc822", rcpt->orig_addr);
}
post_mail_fprintf(bounce, "Action: %s",
diff --git a/src/bounce/with-msgid-with-filter-no-thread.ref b/src/bounce/with-msgid-with-filter-no-thread.ref
index fa30ddf..adcd507 100644
--- a/src/bounce/with-msgid-with-filter-no-thread.ref
+++ b/src/bounce/with-msgid-with-filter-no-thread.ref
@@ -24,7 +24,7 @@ Reporting-MTA: dns; mail.example
Original-Envelope-Id: TEST-ENVID
X-Postfix-Queue-ID: msgid
X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sat, 5 Dec 2020 13:31:48 -0500 (EST)
+Arrival-Date: Sat, 05 Dec 2020 13:31:48 -0500 (EST)
Final-Recipient: rfc822; rcpt-address
Original-Recipient: rfc822; rcpt-orig_addr
diff --git a/src/bounce/with-msgid-with-filter-with-thread.ref b/src/bounce/with-msgid-with-filter-with-thread.ref
index 14d3373..ec3de87 100644
--- a/src/bounce/with-msgid-with-filter-with-thread.ref
+++ b/src/bounce/with-msgid-with-filter-with-thread.ref
@@ -26,7 +26,7 @@ Reporting-MTA: dns; mail.example
Original-Envelope-Id: TEST-ENVID
X-Postfix-Queue-ID: msgid
X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sat, 5 Dec 2020 13:31:48 -0500 (EST)
+Arrival-Date: Sat, 05 Dec 2020 13:31:48 -0500 (EST)
Final-Recipient: rfc822; rcpt-address
Original-Recipient: rfc822; rcpt-orig_addr