diff options
author | Sunil Nimmagadda <sunil@cvs.openbsd.org> | 2016-02-03 05:57:10 +0000 |
---|---|---|
committer | Sunil Nimmagadda <sunil@cvs.openbsd.org> | 2016-02-03 05:57:10 +0000 |
commit | 350353d001cf7d2de9de1aa34968089ba6043236 (patch) | |
tree | 435cf7160223ca621b6da12d87455fdd6b11a65e /usr.sbin/smtpd | |
parent | 9d9767721264ca64b0cad2f9359a5f98671edf19 (diff) |
Use "esc_class" to classify bounce type instead of "errorline" as
we no longer prepend status code to "errorline". Fixes mismatch
between DSN's subject line and its content.
Ok jung@ gilles@ millert@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/bounce.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c index 38ab5b5aac8..8635b8777ba 100644 --- a/usr.sbin/smtpd/bounce.c +++ b/usr.sbin/smtpd/bounce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bounce.c,v 1.71 2015/12/24 16:54:37 mmcc Exp $ */ +/* $OpenBSD: bounce.c,v 1.72 2016/02/03 05:57:09 sunil Exp $ */ /* * Copyright (c) 2009 Gilles Chehade <gilles@poolp.org> @@ -149,12 +149,16 @@ bounce_add(uint64_t evpid) key.bounce = evp.agent.bounce; key.smtpname = evp.smtpname; - if (evp.errorline[0] == '4') + switch (evp.esc_class) { + case ESC_STATUS_OK: + key.bounce.type = B_DSN; + break; + case ESC_STATUS_TEMPFAIL: key.bounce.type = B_WARNING; - else if (evp.errorline[0] == '5') + break; + default: key.bounce.type = B_ERROR; - else - key.bounce.type = B_DSN; + } key.bounce.dsn_ret = evp.dsn_ret; key.bounce.expire = evp.expire; |