Fix incorrect status code for expired mails resulting in a misleading
authoreric <eric@openbsd.org>
Mon, 2 Aug 2021 12:33:34 +0000 (12:33 +0000)
committereric <eric@openbsd.org>
Mon, 2 Aug 2021 12:33:34 +0000 (12:33 +0000)
bounce report.

From Erik Brens

usr.sbin/smtpd/queue.c

index 32c2212..e79e3f0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: queue.c,v 1.193 2021/06/14 17:58:16 eric Exp $        */
+/*     $OpenBSD: queue.c,v 1.194 2021/08/02 12:33:34 eric Exp $        */
 
 /*
  * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -199,7 +199,7 @@ queue_imsg(struct mproc *p, struct imsg *imsg)
 
                bounce.type = B_FAILED;
                envelope_set_errormsg(&evp, "Envelope expired");
-               envelope_set_esc_class(&evp, ESC_STATUS_TEMPFAIL);
+               envelope_set_esc_class(&evp, ESC_STATUS_PERMFAIL);
                envelope_set_esc_code(&evp, ESC_DELIVERY_TIME_EXPIRED);
                queue_bounce(&evp, &bounce);
                queue_log(&evp, "Expire", "Envelope expired");