diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2018-05-31 11:56:11 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2018-05-31 11:56:11 +0000 |
commit | 95b68ef82d6ae198be261ea3c231d2a904db94f8 (patch) | |
tree | f27030d0291ed3fa721f75e98793da06dfeadd3e /usr.sbin/smtpd | |
parent | 501347e07f9f1f42c8d96f1645906a4a6cf844e0 (diff) |
simplify
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/mta.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index 47f5df6fc54..853973fc715 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.211 2018/05/29 20:43:07 eric Exp $ */ +/* $OpenBSD: mta.c,v 1.212 2018/05/31 11:56:10 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -667,17 +667,14 @@ mta_handle_envelope(struct envelope *evp, const char *smarthost) sizeof(evp->agent.mta.relay.hostname)); } - if (smarthost) { - if (text_to_relayhost(&evp->agent.mta.relay, smarthost) == 0) { - log_warnx("warn: Failed to parse smarthost %s", - smarthost); - m_create(p_queue, IMSG_MTA_DELIVERY_TEMPFAIL, 0, 0, -1); - m_add_evpid(p_queue, evp->id); - m_add_string(p_queue, "Cannot parse smarthost"); - m_add_int(p_queue, ESC_OTHER_STATUS); - m_close(p_queue); - return; - } + if (smarthost && !text_to_relayhost(&evp->agent.mta.relay, smarthost)) { + log_warnx("warn: Failed to parse smarthost %s", smarthost); + m_create(p_queue, IMSG_MTA_DELIVERY_TEMPFAIL, 0, 0, -1); + m_add_evpid(p_queue, evp->id); + m_add_string(p_queue, "Cannot parse smarthost"); + m_add_int(p_queue, ESC_OTHER_STATUS); + m_close(p_queue); + return; } relay = mta_relay(evp); |