-
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
outbound: get_mx overhaul, logging improvements (#3322)
Fixes #3314 Conceptually, the big changes in this PR do the following: 1. outsource outbound DNS to haraka-net-utils 2. improve outbound logging by using logger in *only* 2 common ways: `logger.info(obj, message)` or `this.loginfo(self, msg...)` 3. In outbound, the control flow is much more linear: - run get_mx hooks - if no plugin offered a MX, get from net_utils.get_mx (which now includes implicit MX) - pass list of MXes to found_mx, which sorts the MXes - net_utils resolves all MX hostnames to IPs (IPv4, IPv6, all at once, for speed) - each MX IP is tried in turn until one succeeds or the list is exhausted 4. Injecting logging functions into classes (Connection, Plugin, HMailItem) is now done via logger.add_log_methods ## Changes: - outbound: minor es6 updates - outbound: logging improvements - was: [-] [core] [outbound] Failed to get socket: Outbound connection error: Error: connect ECONNREFUSED 172.16.16.14:25 - now: [A63B62DF-F...] [outbound] Failed to get socket: connect ECONNREFUSED 172.16.16.14:25 - outbound: remove log prefixes of `[outbound] `, no longer needed - shorter logger syntax: logger.loginfo -> logger.info - logger(connection, plugins, hmail), refactor copying in log functions - logger: don't load outbound (race condition). Instead, set name property - outbound: delete try_deliver_host. Use net_utils to resolve MX hosts to IPs - outbound: remove config setting ipv6_enabled - fix(logger): refactor add_log_methods, don't set extra `loglog*` names - doc(connection): update rfc7001 URL
- Loading branch information
Showing
37 changed files
with
559 additions
and
869 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
timeout=29 | ||
allow_mx_ip=0 | ||
reject_no_mx=1 | ||
allow_mx_ip=false | ||
re_bogus_ip=^(?:0\.0\.0\.0|255\.255\.255\.255|127\.) | ||
|
||
[reject] | ||
no_mx=true |
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 |
---|---|---|
|
@@ -11,8 +11,6 @@ | |
|
||
; maxTempFailures (default: 13) | ||
|
||
; ipv6_enabled (default: false) | ||
|
||
; load_pid_queue | ||
; flush_queue | ||
|
||
|
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
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
Oops, something went wrong.