Mercurial > dnsbl
diff src/context.cpp @ 320:e27c24c1974a
more smtp verify logging
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 17 Dec 2016 09:46:40 -0800 |
parents | e2dc882839f6 |
children | e172dc10fe24 |
line wrap: on
line diff
--- a/src/context.cpp Thu Sep 22 08:49:44 2016 -0700 +++ b/src/context.cpp Sat Dec 17 09:46:40 2016 -0800 @@ -268,6 +268,13 @@ } +void VERIFY::log(const char *m, const char *q, const char *v) { + char buf[maxlen]; + snprintf(buf, maxlen, m, v, host); + my_syslog(q, buf); +} + + void VERIFY::closer() { bool ok = true; while (ok) { @@ -391,7 +398,10 @@ bool VERIFY::ok(const char *queueid, const char *from, const char *to) { if (host == token_myhostname) return true; SMTP *conn = get_connection(queueid); - if (!conn) return true; // cannot verify right now, we have socket errors + if (!conn) { + log("unable to verify %s with %s due to socket errors", queueid, to); + return true; // cannot verify right now, we have socket errors + } int rc; rc = conn->from(from); conn->log("verify::ok(%d) from sees %d", rc);