Mercurial > dnsbl
diff src/dnsbl.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 | 13905d36ca82 |
children | f5547e7b3a09 |
line wrap: on
line diff
--- a/src/dnsbl.cpp Wed Aug 03 08:28:31 2016 -0700 +++ b/src/dnsbl.cpp Sun Sep 18 18:32:37 2016 -0700 @@ -748,10 +748,10 @@ //////////////////////////////////////////////// // syslog a message // -void my_syslog(mlfiPriv *priv, const char *text) { +void my_syslog(const char *queueid, const char *text) { char buf[maxlen]; - if (priv) { - snprintf(buf, sizeof(buf), "%s: %s", priv->queueid, text); + if (queueid) { + snprintf(buf, sizeof(buf), "%s: %s", queueid, text); text = buf; } if (use_syslog) { @@ -768,6 +768,11 @@ } } +void my_syslog(mlfiPriv *priv, const char *text) { + if (priv) my_syslog(priv->queueid, text); + else my_syslog((const char *)NULL, text); +} + void my_syslog(mlfiPriv *priv, const string text) { if (debug_syslog > 3) { char buf[maxlen]; @@ -778,7 +783,7 @@ } void my_syslog(const char *text) { - my_syslog(NULL, text); + my_syslog((const char *)NULL, text); } @@ -1338,7 +1343,7 @@ if (ver) { // try to verify this from/to pair of addresses even if it might be explicitly whitelisted const char *loto = to_lower_string(rcptaddr); - bool rc = ver->ok(priv.mailaddr, loto); + bool rc = ver->ok(priv.queueid, priv.mailaddr, loto); free((void*)loto); if (!rc) { smfi_setreply(ctx, (char*)"550", (char*)"5.7.1", (char*)"no such user");