-/* $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 <gilles@poolp.org>
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;