Skip to content

Instantly share code, notes, and snippets.

@baudehlo
Created February 18, 2014 23:04
Show Gist options
  • Save baudehlo/9082345 to your computer and use it in GitHub Desktop.
Save baudehlo/9082345 to your computer and use it in GitHub Desktop.
diff --git a/connection.js b/connection.js
index 7a00985..21b7ac1 100644
--- a/connection.js
+++ b/connection.js
@@ -927,12 +927,15 @@ Connection.prototype.rcpt_ok_respond = function (retval, msg) {
}
Connection.prototype.rcpt_respond = function(retval, msg) {
+ var rcpt = this.transaction.rcpt_to[this.transaction.rcpt_to.length - 1];
+ if (retval === constants.ok) {
+ this.transaction.notes.ok_domains[rcpt.host] = true;
+ }
if (retval === constants.cont && this.relaying) {
retval = constants.ok;
}
var self = this;
- var rcpt = this.transaction.rcpt_to[this.transaction.rcpt_to.length - 1];
var dmsg = "recipient " + rcpt.format();
if (retval !== constants.ok) {
this.lognotice(dmsg + ' ' + [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment