diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-04-12 12:33:44 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-04-12 12:33:44 +0000 |
commit | 2ff52594a534350dc80c08c5d92691444d7343bb (patch) | |
tree | 7a7bc022dfd7490e2c623ea9bcd5800b2d49a150 | |
parent | a930341d8bf6d0c22c7d16a0522d26e771948a7d (diff) |
when an error occurs while delivering a message with an empty envelope as a
sender, do not try to generate a mailer daemon message for it.
fixes a crash experienced by sthen@ that I could reproduce
-rw-r--r-- | usr.sbin/smtpd/queue_shared.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/queue_shared.c b/usr.sbin/smtpd/queue_shared.c index ccee9e13363..7f0c6478fe5 100644 --- a/usr.sbin/smtpd/queue_shared.c +++ b/usr.sbin/smtpd/queue_shared.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue_shared.c,v 1.15 2009/03/09 11:29:52 jacekm Exp $ */ +/* $OpenBSD: queue_shared.c,v 1.16 2009/04/12 12:33:43 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -373,7 +373,8 @@ queue_message_update(struct message *messagep) messagep->retry++; if (messagep->status & S_MESSAGE_PERMFAILURE) { - if (messagep->type & T_DAEMON_MESSAGE) + if (messagep->type & T_DAEMON_MESSAGE || + (messagep->sender.user[0] == '\0' && messagep->sender.domain[0] == '\0')) queue_remove_envelope(messagep); else { messagep->id = queue_generate_id(); |