Mercurial > dnsbl
comparison src/context.cpp @ 473:5209e92b4885
opendkim headers changed, pass smtp verify 4xy codes back to sender
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 20 Feb 2021 09:46:29 -0800 |
parents | f5b394bec28c |
children |
comparison
equal
deleted
inserted
replaced
472:86a61ed64baf | 473:5209e92b4885 |
---|---|
399 pthread_mutex_unlock(&mutex); | 399 pthread_mutex_unlock(&mutex); |
400 } | 400 } |
401 } | 401 } |
402 | 402 |
403 | 403 |
404 bool VERIFY::ok(const char *queueid, const char *from, const char *to) { | 404 int VERIFY::ok(const char *queueid, const char *from, const char *to) { |
405 if (host == token_myhostname) return true; | 405 if (host == token_myhostname) return true; |
406 SMTP *conn = get_connection(queueid); | 406 SMTP *conn = get_connection(queueid); |
407 if (!conn) { | 407 if (!conn) { |
408 log("unable to verify %s with %s due to socket errors", queueid, to); | 408 log("unable to verify %s with %s due to socket errors", queueid, to); |
409 return true; // cannot verify right now, we have socket errors | 409 return true; // cannot verify right now, we have socket errors |
411 int rc; | 411 int rc; |
412 rc = conn->from(from); | 412 rc = conn->from(from); |
413 conn->log("verify::ok(%d) from sees %d", rc); | 413 conn->log("verify::ok(%d) from sees %d", rc); |
414 if (rc != 250) { | 414 if (rc != 250) { |
415 put_connection(conn); | 415 put_connection(conn); |
416 return (rc >= 500) ? false : true; | 416 return rc; |
417 } | 417 } |
418 rc = conn->rcpt(to); | 418 rc = conn->rcpt(to); |
419 conn->log("verify::ok(%d) rcpt sees %d", rc); | 419 conn->log("verify::ok(%d) rcpt sees %d", rc); |
420 put_connection(conn); | 420 put_connection(conn); |
421 return (rc >= 500) ? false : true; | 421 return rc; |
422 } | 422 } |
423 | 423 |
424 | 424 |
425 //////////////////////////////////////////////// | 425 //////////////////////////////////////////////// |
426 // setup a new smtp verify host | 426 // setup a new smtp verify host |