diff src/context.cpp @ 310:802e2b779ed1

enable smtp verify logging
author Carl Byington <carl@five-ten-sg.com>
date Sun, 18 Sep 2016 18:32:37 -0700
parents 368572c57013
children f5547e7b3a09
line wrap: on
line diff
--- a/src/context.cpp	Wed Aug 03 08:28:31 2016 -0700
+++ b/src/context.cpp	Sun Sep 18 18:32:37 2016 -0700
@@ -250,14 +250,14 @@
     void SMTP::log(const char *m, int v) {
         char buf[maxlen];
         snprintf(buf, maxlen, m, v);
-        my_syslog(buf);
+        my_syslog(queueid, buf);
     }
 
 
     void SMTP::log(const char *m, const char *v) {
         char buf[maxlen];
         snprintf(buf, maxlen, m, v);
-        my_syslog(buf);
+        my_syslog(queueid, buf);
     }
 #endif
 
@@ -371,11 +371,12 @@
 }
 
 
-bool VERIFY::ok(const char *from, const char *to) {
+bool VERIFY::ok(const char *queueid, const char *from, const char *to) {
     if (host == token_myhostname) return true;
     SMTP *conn = get_connection();
     if (!conn) return true;    // cannot verify right now, we have socket errors
     int rc;
+    conn->set_id(queueid);
     rc = conn->from(from);
     #ifdef VERIFY_DEBUG
         conn->log("verify::ok() from sees %d", rc);