Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outbound: default 'me' #2813

Merged
merged 4 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@

## NEXT - 20YY-MM-DD

* fix outbound config reloading after outbound has been split off into pieces

### Changes

* outbound: add os.hostname() as default for outbound HELO #2813
* use node v10's mkdir instead of mkdirp #2797
* CI: drop appveyor and Travis #2784
* lint: add 'prefer-template'
* restore TLS version info, set correctly #2723
* update async to version 3.2.0 #2764
* update redis to version 3.0.0 #2759
* remove deprecated max_unrecognized_commands from config #2755
* CI: add ES2017 support, drop node 8 #2740
* fix broken bannering on nested mime parts #2736
* restore TLS version info, set correctly #2723
* better error message when invalid HELO hostname is rejected
* bring STARTTLS "TLS NO-GO" feature in line with Outbound's
* bring STARTTLS "TLS NO-GO" feature in line with Outbound's #2792

### New features

* connection_close_message: added ability to override close connection message replacing `closing connection. Have a jolly good day.`
* tls: add configurable minVersion to tls socket options
* add JSON format for logging
* Allow web interface to be bound to unix socket #2768
* tls: add configurable minVersion to tls socket options #2738
* connection_close_message: added ability to override close connection message replacing `closing connection. Have a jolly good day.` #2730
* add JSON format for logging #2739
* support binding web interface to unix socket

### Fixes

* TLS: don't abort loading certs in config/tls dir when an error is encountered.
Process every cert file and then emit errors. #2729
* fix connection pool not being unique when hosts and ports were equal between domains #2788
* fix outbound config reloading after outbound split #2802
* smtp_forward: remove redundant outbound hook #2796
* smtp_forward: this plugin does not use the queue_outbound hook anymore #2795
* Fix connection pool not being unique when hosts and ports were equal between domains #2789
* fix connection pool not being unique when hosts and ports were equal between domains #2788
* Fix outbound.bounce_message To: header (and add Auto-Submitted) #2782
* Fix support for DKIM signing when forwarding and aliasing is enabled #2776
* Better error message when EHLO hostname does not have a dot #2775
* fix bannering on nested mime parts #2737
* TLS: don't abort loading certs in config/tls dir when an error is encountered. Process every cert file and then emit errors. #2729
* restore TLS version, correctly #2723

## 2.8.25 - 2019-10-11

Expand Down
2 changes: 1 addition & 1 deletion connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Connection {
this.local = { // legacy property locations
ip: null, // c.local_ip
port: null, // c.local_port
host: config.get('me') || os.hostname(),
host: net_utils.get_primary_host_name(),
info: 'Haraka',
};
this.remote = {
Expand Down
8 changes: 4 additions & 4 deletions outbound/hmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class HMailItem extends events.EventEmitter {
mx.bind_helo = self.todo.notes.outbound_helo;
}
else {
mx.bind_helo = config.get('me');
mx.bind_helo = net_utils.get_primary_host_name();
}
}

Expand Down Expand Up @@ -1000,7 +1000,7 @@ class HMailItem extends events.EventEmitter {

const values = {
date: utils.date_to_str(new Date()),
me: config.get('me'),
me: net_utils.get_primary_host_name(),
from,
to,
subject: header.get_decoded('Subject').trim(),
Expand All @@ -1012,7 +1012,7 @@ class HMailItem extends events.EventEmitter {
}
}).join('\n'),
pid: process.pid,
msgid: `<${utils.uuid()}@${config.get('me')}>`,
msgid: `<${utils.uuid()}@${net_utils.get_primary_host_name()}>`,
};

bounce_msg_.forEach(line => {
Expand Down Expand Up @@ -1122,7 +1122,7 @@ class HMailItem extends events.EventEmitter {
if (originalMessageId != '') {
bounce_body.push(`Original-Envelope-Id: ${originalMessageId.replace(/(\r?\n)*$/, '')}${CRLF}`);
}
bounce_body.push(`Reporting-MTA: dns;${config.get('me')}${CRLF}`);
bounce_body.push(`Reporting-MTA: dns;${net_utils.get_primary_host_name()}${CRLF}`);
if (self.todo.queue_time) {
bounce_body.push(`Arrival-Date: ${utils.date_to_str(new Date(self.todo.queue_time))}${CRLF}`);
}
Expand Down
2 changes: 1 addition & 1 deletion outbound/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ exports.send_trans_email = function (transaction, next) {
// add potentially missing headers
if (!transaction.header.get_all('Message-Id').length) {
logger.loginfo("[outbound] Adding missing Message-Id header");
transaction.add_header('Message-Id', `<${transaction.uuid}@${config.get('me')}>`);
transaction.add_header('Message-Id', `<${transaction.uuid}@${net_utils.get_primary_host_name()}>`);
}
if (!transaction.header.get_all('Date').length) {
logger.loginfo("[outbound] Adding missing Date header");
Expand Down