diff options
author | Gilles Chehade <gilles@poolp.org> | 2019-01-03 17:08:21 +0100 |
---|---|---|
committer | Gilles Chehade <gilles@poolp.org> | 2019-01-03 17:08:21 +0100 |
commit | 012b962961fd3204afe8585e8a534f12fda5760d (patch) | |
tree | f817fb7c84eb1745b305ebed7526b9db45866023 | |
parent | Merge branch 'master' into portable (diff) | |
parent | sync (diff) | |
download | OpenSMTPD-012b962961fd3204afe8585e8a534f12fda5760d.tar.xz OpenSMTPD-012b962961fd3204afe8585e8a534f12fda5760d.zip |
Merge branch 'master' into portable
-rw-r--r-- | smtpd/smtp_session.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/smtpd/smtp_session.c b/smtpd/smtp_session.c index 7934ae82..917273b1 100644 --- a/smtpd/smtp_session.c +++ b/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.383 2018/12/28 11:35:25 gilles Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.385 2019/01/03 15:46:07 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -633,14 +633,15 @@ smtp_getnameinfo_cb(void *arg, int gaierrno, const char *host, const char *serv) struct addrinfo hints; if (gaierrno) { - log_warnx("getnameinfo: %s: %s", ss_to_text(&s->ss), - gai_strerror(gaierrno)); (void)strlcpy(s->rdns, "<unknown>", sizeof(s->rdns)); if (gaierrno == EAI_NODATA || gaierrno == EAI_NONAME) s->fcrdns = 0; - else + else { + log_warnx("getnameinfo: %s: %s", ss_to_text(&s->ss), + gai_strerror(gaierrno)); s->fcrdns = -1; + } smtp_lookup_servername(s); return; @@ -662,13 +663,13 @@ smtp_getaddrinfo_cb(void *arg, int gaierrno, struct addrinfo *ai0) char fwd[64], rev[64]; if (gaierrno) { - log_warnx("getaddrinfo: %s: %s", s->rdns, - gai_strerror(gaierrno)); - if (gaierrno == EAI_NODATA || gaierrno == EAI_NONAME) s->fcrdns = 0; - else + else { + log_warnx("getaddrinfo: %s: %s", s->rdns, + gai_strerror(gaierrno)); s->fcrdns = -1; + } } else { strlcpy(rev, ss_to_text(&s->ss), sizeof(rev)); @@ -2684,10 +2685,6 @@ smtp_tx_filtered_dataline(struct smtp_tx *tx, const char *line) if (tx->error) return 0; - /* escape lines starting with a '.' */ - if (line[0] == '.') - line += 1; - /* account for newline */ tx->datain += strlen(line) + 1; if (tx->datain > env->sc_maxsize) { |