From 79331488de4f35cbcc9704337c87f4e0740d6de4 Mon Sep 17 00:00:00 2001 From: Jacek Masiulaniec Date: Fri, 4 Sep 2009 18:50:44 +0000 Subject: Fix scheduling of bounces that could not be delivered. ok gilles@ --- usr.sbin/smtpd/bounce.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.sbin/smtpd/bounce.c') diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c index 9e8e8b0b1c4..968bdd82e88 100644 --- a/usr.sbin/smtpd/bounce.c +++ b/usr.sbin/smtpd/bounce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bounce.c,v 1.6 2009/08/27 11:37:30 jacekm Exp $ */ +/* $OpenBSD: bounce.c,v 1.7 2009/09/04 18:50:43 jacekm Exp $ */ /* * Copyright (c) 2009 Gilles Chehade @@ -138,7 +138,11 @@ bounce_event(int fd, short event, void *p) break; case CLIENT_ERROR: message_set_errormsg(&cc->m, "SMTP error: %s", ep); - message_reset_flags(&cc->m); + if (*ep == '5') + cc->m.status = S_MESSAGE_PERMFAILURE; + else + cc->m.status = S_MESSAGE_TEMPFAILURE; + queue_message_update(&cc->m); break; } client_close(cc->sp); -- cgit v1.2.3