From 30221c9e0b551b3a479e337d5c50d3bb3e23dba4 Mon Sep 17 00:00:00 2001 From: chrisz Date: Thu, 4 May 2023 12:43:44 +0000 Subject: [PATCH] Be more economical with returning bodys in bounce messages according to rfc3461 4.3 OK millert@ --- usr.sbin/smtpd/bounce.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c index 6028cbc5193..84fd035f0c0 100644 --- a/usr.sbin/smtpd/bounce.c +++ b/usr.sbin/smtpd/bounce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bounce.c,v 1.87 2023/02/08 08:20:54 tb Exp $ */ +/* $OpenBSD: bounce.c,v 1.88 2023/05/04 12:43:44 chrisz Exp $ */ /* * Copyright (c) 2009 Gilles Chehade @@ -538,8 +538,8 @@ bounce_next(struct bounce_session *s) if ((len = getline(&line, &sz, s->msgfp)) == -1) break; if (len == 1 && line[0] == '\n' && /* end of headers */ - s->msg->bounce.type == B_DELIVERED && - s->msg->bounce.dsn_ret == DSN_RETHDRS) { + (s->msg->bounce.type != B_FAILED || + s->msg->bounce.dsn_ret != DSN_RETFULL)) { free(line); fclose(s->msgfp); s->msgfp = NULL; -- 2.20.1