-
-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smtp_forward: restore queue_outbound when config asks for it (#3119)
- Loading branch information
Showing
4 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,33 +160,33 @@ exports.get_mx = { | |
|
||
exports.is_outbound_enabled = { | ||
setUp : _setup, | ||
'enable_outbound is true by default' (test) { | ||
'enable_outbound is false by default' (test) { | ||
test.expect(1); | ||
test.equal(this.plugin.is_outbound_enabled(this.plugin.cfg), true); | ||
test.equal(this.plugin.is_outbound_enabled(this.plugin.cfg), false); | ||
test.done(); | ||
}, | ||
'per-domain enable_outbound is true by default' (test) { | ||
'per-domain enable_outbound is false by default' (test) { | ||
test.expect(1); | ||
this.connection.transaction.rcpt_to = [ new Address('<[email protected]>') ]; | ||
const cfg = this.plugin.get_config(this.connection); | ||
test.equal(this.plugin.is_outbound_enabled(cfg), true); | ||
test.equal(this.plugin.is_outbound_enabled(cfg), false); | ||
test.done(); | ||
}, | ||
'per-domain enable_outbound can be set to false' (test) { | ||
'per-domain enable_outbound can be set to true' (test) { | ||
test.expect(1); | ||
this.plugin.cfg['test.com'].enable_outbound = false; | ||
this.plugin.cfg['test.com'].enable_outbound = true; | ||
this.connection.transaction.rcpt_to = [ new Address('<[email protected]>') ]; | ||
const cfg = this.plugin.get_config(this.connection); | ||
test.equal(this.plugin.is_outbound_enabled(cfg), false); | ||
test.equal(this.plugin.is_outbound_enabled(cfg), true); | ||
test.done(); | ||
}, | ||
'per-domain enable_outbound is true even if top level is false' (test) { | ||
'per-domain enable_outbound is false even if top level is false' (test) { | ||
test.expect(1); | ||
this.plugin.cfg.main.enable_outbound = false; // this will be ignored | ||
this.plugin.cfg['test.com'].enable_outbound = true; | ||
this.plugin.cfg['test.com'].enable_outbound = false; | ||
this.connection.transaction.rcpt_to = [ new Address('<[email protected]>') ]; | ||
const cfg = this.plugin.get_config(this.connection); | ||
test.equal(this.plugin.is_outbound_enabled(cfg), true); | ||
test.equal(this.plugin.is_outbound_enabled(cfg), false); | ||
test.done(); | ||
} | ||
} |