Skip to content

Commit

Permalink
o/hmail: fix transaction notes setting bind_helo (#3363)
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson authored May 20, 2024
1 parent 48f7268 commit 1791a61
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions outbound/hmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,14 @@ class HMailItem extends events.EventEmitter {

this.force_tls = this.get_force_tls(mx)

// Allow transaction notes to set outbound IP
if (!mx.bind && this.todo.notes.outbound_ip) {
mx.bind = this.todo.notes.outbound_ip;
if (this.todo.notes.outbound_ip) {
this.logerror(`notes.outbound_ip is deprecated. Use get_mx.bind instead!`);
if (!mx.bind) mx.bind = this.todo.notes.outbound_ip;
}

// Allow transaction notes to set outbound IP helo
if (!mx.bind_helo){
if (this.todo.notes.outbound_helo) {
mx.bind_helo = this.todo.notes.outbound_helo;
}
else {
mx.bind_helo = net_utils.get_primary_host_name();
}
if (this.todo.notes.outbound_helo) {
mx.bind_helo = this.todo.notes.outbound_helo;
}

const host = mx.path ? mx.path : mx.exchange;
Expand Down

0 comments on commit 1791a61

Please sign in to comment.