diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-08-06 14:32:35 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-08-06 14:32:35 +0000 |
commit | f32484ba9d7d14a17687020bdcc98d2e3d42a940 (patch) | |
tree | 11135807959ba4174ebce5d8a842de0e12e62322 /usr.sbin/smtpd | |
parent | b01b4ae8cca90bdcf508812f02e0403c69d03f5b (diff) |
when a message in queue expires, generate a bounce before we remove it
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/runner.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c index 2bc1a58fded..fb8acd5aa96 100644 --- a/usr.sbin/smtpd/runner.c +++ b/usr.sbin/smtpd/runner.c @@ -1,4 +1,4 @@ -/* $OpenBSD: runner.c,v 1.56 2009/08/06 14:12:48 gilles Exp $ */ +/* $OpenBSD: runner.c,v 1.57 2009/08/06 14:32:34 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -801,6 +801,9 @@ runner_message_schedule(struct message *messagep, time_t tm) /* Batch has been in the queue for too long and expired */ if (tm - messagep->creation >= SMTPD_QUEUE_EXPIRY) { + message_set_errormsg(messagep, "message expired after sitting in queue for %d days", + SMTPD_QUEUE_EXPIRY / 60 / 60 / 24); + bounce_record_message(messagep); queue_remove_envelope(messagep); return 0; } |